Skip to content

Commit 47dd415

Browse files
author
openshift-service-mesh-bot
committed
Automator: merge upstream changes to openshift-service-mesh/istio@master
* upstream/master: Automator: update istio/client-go@master dependency in istio/istio@master (#58361) Automator: update proxy@master in istio/istio@master (#58358) tests: add integration tests for BackendTLSPolicy applied to ServiceEntry (#58242) Prevent route resource status conflict in multi-revision installs (#58292) add release-note for warmup aggression change (#58339)
2 parents 73e12de + 148ac5f commit 47dd415

File tree

13 files changed

+264
-25
lines changed

13 files changed

+264
-25
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ require (
9393
gopkg.in/yaml.v2 v2.4.0
9494
gopkg.in/yaml.v3 v3.0.1
9595
helm.sh/helm/v3 v3.18.6
96-
istio.io/api v1.28.0-alpha.0.0.20251118133802-3d6b80ec2d1e
97-
istio.io/client-go v1.28.0-alpha.0.0.20251118134000-fa71d5732509
96+
istio.io/api v1.28.0-alpha.0.0.20251120193503-cb15a6cf0002
97+
istio.io/client-go v1.28.0-alpha.0.0.20251120193902-c79fe2483377
9898
k8s.io/api v0.34.1
9999
k8s.io/apiextensions-apiserver v0.34.1
100100
k8s.io/apimachinery v0.34.1

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -574,10 +574,10 @@ gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
574574
gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8=
575575
helm.sh/helm/v3 v3.18.6 h1:S/2CqcYnNfLckkHLI0VgQbxgcDaU3N4A/46E3n9wSNY=
576576
helm.sh/helm/v3 v3.18.6/go.mod h1:L/dXDR2r539oPlFP1PJqKAC1CUgqHJDLkxKpDGrWnyg=
577-
istio.io/api v1.28.0-alpha.0.0.20251118133802-3d6b80ec2d1e h1:qfJY+yQTjm0AWhPXITGSAGCLkujfBGh0Hu3RuXQeyq4=
578-
istio.io/api v1.28.0-alpha.0.0.20251118133802-3d6b80ec2d1e/go.mod h1:BD3qv/ekm16kvSgvSpuiDawgKhEwG97wx849CednJSg=
579-
istio.io/client-go v1.28.0-alpha.0.0.20251118134000-fa71d5732509 h1:U0SrRSda3au07r6b4ZbHa+NeKXkV4mVofPvTlQMF7oA=
580-
istio.io/client-go v1.28.0-alpha.0.0.20251118134000-fa71d5732509/go.mod h1:G0jE4yjFmzhXjlTAi6/TYvE8jjFaWM34EpR9OfIb4Ac=
577+
istio.io/api v1.28.0-alpha.0.0.20251120193503-cb15a6cf0002 h1:GmCiNi/TnMKpKIu0r5WSTir1W/Mc+2D9HI/dMp+7zPA=
578+
istio.io/api v1.28.0-alpha.0.0.20251120193503-cb15a6cf0002/go.mod h1:BD3qv/ekm16kvSgvSpuiDawgKhEwG97wx849CednJSg=
579+
istio.io/client-go v1.28.0-alpha.0.0.20251120193902-c79fe2483377 h1:ghagEGUxUsjpvbgR6Llr8xaN3kObAk2zJbnWquRhP+s=
580+
istio.io/client-go v1.28.0-alpha.0.0.20251120193902-c79fe2483377/go.mod h1:K9qmUWxQPP5Ltt7fbTmDqHaSUm9iMF5co3dvZsl++P0=
581581
k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM=
582582
k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk=
583583
k8s.io/apiextensions-apiserver v0.34.1 h1:NNPBva8FNAPt1iSVwIE0FsdrVriRXMsaWFMqJbII2CI=

istio.deps

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name": "PROXY_REPO_SHA",
55
"repoName": "proxy",
66
"file": "",
7-
"lastStableSHA": "c3cad09527225b6a98dbf46ce81d066c580e038f"
7+
"lastStableSHA": "be818c1ad983cfe7b2a7316718076ccc7554d046"
88
},
99
{
1010
"_comment": "",

manifests/charts/base/files/crd-all.gen.yaml

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pilot/pkg/config/kube/gateway/backend_policies.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ func DestinationRuleCollection(
133133
opts krt.OptionsBuilder,
134134
) krt.Collection[*config.Config] {
135135
trafficPolicyStatus, backendTrafficPolicies := BackendTrafficPolicyCollection(trafficPolicies, references, domainSuffix, opts)
136-
status.RegisterStatus(c.status, trafficPolicyStatus, GetStatus)
136+
status.RegisterStatus(c.status, trafficPolicyStatus, GetStatus, c.tagWatcher.AccessUnprotected())
137137

138138
// TODO: BackendTrafficPolicy should also probably use ancestorCollection. However, its still up for debate in the
139139
// Gateway API community if having the Gateway as an ancestor ref is required or not; we would prefer it to not be if possible.
140140
// Until conformance requires it, for now we skip it.
141141
ancestorCollection := ancestors.AsCollection(append(opts.WithName("AncestorBackend"), TypedNamespacedNameIndexCollectionFunc)...)
142142
tlsPolicyStatus, backendTLSPolicies := BackendTLSPolicyCollection(tlsPolicies, ancestorCollection, references, domainSuffix, opts)
143-
status.RegisterStatus(c.status, tlsPolicyStatus, GetStatus)
143+
status.RegisterStatus(c.status, tlsPolicyStatus, GetStatus, c.tagWatcher.AccessUnprotected())
144144

145145
// We need to merge these by hostname into a single DR
146146
allPolicies := krt.JoinCollection([]krt.Collection[BackendPolicy]{backendTrafficPolicies, backendTLSPolicies})

pilot/pkg/config/kube/gateway/controller.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func NewController(
238238
httpRoutesByInferencePool := krt.NewIndex(inputs.HTTPRoutes, "inferencepool-route", indexHTTPRouteByInferencePool)
239239

240240
GatewayClassStatus, GatewayClasses := GatewayClassesCollection(inputs.GatewayClasses, opts)
241-
status.RegisterStatus(c.status, GatewayClassStatus, GetStatus)
241+
status.RegisterStatus(c.status, GatewayClassStatus, GetStatus, c.tagWatcher.AccessUnprotected())
242242

243243
ReferenceGrants := BuildReferenceGrants(ReferenceGrantsCollection(inputs.ReferenceGrants, opts))
244244
ListenerSetStatus, ListenerSets := ListenerSetCollection(
@@ -254,7 +254,7 @@ func NewController(
254254
c.tagWatcher,
255255
opts,
256256
)
257-
status.RegisterStatus(c.status, ListenerSetStatus, GetStatus)
257+
status.RegisterStatus(c.status, ListenerSetStatus, GetStatus, c.tagWatcher.AccessUnprotected())
258258

259259
// GatewaysStatus is not fully complete until its join with route attachments to report attachedRoutes.
260260
// Do not register yet.
@@ -289,7 +289,7 @@ func NewController(
289289
controllers.WithMaxAttempts(5))
290290

291291
if features.EnableGatewayAPIInferenceExtension {
292-
status.RegisterStatus(c.status, InferencePoolStatus, GetStatus)
292+
status.RegisterStatus(c.status, InferencePoolStatus, GetStatus, c.tagWatcher.AccessUnprotected())
293293
}
294294

295295
RouteParents := BuildRouteParents(Gateways)
@@ -309,25 +309,25 @@ func NewController(
309309
routeInputs,
310310
opts,
311311
)
312-
status.RegisterStatus(c.status, tcpRoutes.Status, GetStatus)
312+
status.RegisterStatus(c.status, tcpRoutes.Status, GetStatus, c.tagWatcher.AccessUnprotected())
313313
tlsRoutes := TLSRouteCollection(
314314
inputs.TLSRoutes,
315315
routeInputs,
316316
opts,
317317
)
318-
status.RegisterStatus(c.status, tlsRoutes.Status, GetStatus)
318+
status.RegisterStatus(c.status, tlsRoutes.Status, GetStatus, c.tagWatcher.AccessUnprotected())
319319
httpRoutes := HTTPRouteCollection(
320320
inputs.HTTPRoutes,
321321
routeInputs,
322322
opts,
323323
)
324-
status.RegisterStatus(c.status, httpRoutes.Status, GetStatus)
324+
status.RegisterStatus(c.status, httpRoutes.Status, GetStatus, c.tagWatcher.AccessUnprotected())
325325
grpcRoutes := GRPCRouteCollection(
326326
inputs.GRPCRoutes,
327327
routeInputs,
328328
opts,
329329
)
330-
status.RegisterStatus(c.status, grpcRoutes.Status, GetStatus)
330+
status.RegisterStatus(c.status, grpcRoutes.Status, GetStatus, c.tagWatcher.AccessUnprotected())
331331

332332
RouteAttachments := krt.JoinCollection([]krt.Collection[RouteAttachment]{
333333
tcpRoutes.RouteAttachments,
@@ -360,7 +360,7 @@ func NewController(
360360
)
361361

362362
GatewayFinalStatus := FinalGatewayStatusCollection(GatewaysStatus, RouteAttachments, RouteAttachmentsIndex, opts)
363-
status.RegisterStatus(c.status, GatewayFinalStatus, GetStatus)
363+
status.RegisterStatus(c.status, GatewayFinalStatus, GetStatus, c.tagWatcher.AccessUnprotected())
364364

365365
VirtualServices := krt.JoinCollection([]krt.Collection[*config.Config]{
366366
tcpRoutes.VirtualServices,

pilot/pkg/config/kube/gateway/status_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestStatusCollections(t *testing.T) {
4848
fakeCol := krt.NewStaticCollection[Status](nil, []Status{obj1}, krt.WithStop(stop))
4949
status.RegisterStatus(c.status, fakeCol, func(i *v1.ConfigMap) string {
5050
return ""
51-
})
51+
}, c.tagWatcher.AccessUnprotected())
5252

5353
sq1 := &TestStatusQueue{state: map[status.Resource]any{}}
5454
setAndWait(t, c, sq1)

pilot/pkg/config/kube/ingress/controller.go

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import (
3737
"istio.io/istio/pkg/kube/kclient"
3838
"istio.io/istio/pkg/kube/krt"
3939
"istio.io/istio/pkg/log"
40+
"istio.io/istio/pkg/revisions"
4041
"istio.io/istio/pkg/util/sets"
4142
)
4243

@@ -93,7 +94,8 @@ type Controller struct {
9394
// outputs contains all the output collections for this controller.
9495
outputs Outputs
9596

96-
status *status.StatusCollections
97+
status *status.StatusCollections
98+
tagWatcher krt.RecomputeProtected[revisions.TagWatcher]
9799
}
98100

99101
type Inputs struct {
@@ -119,12 +121,17 @@ func NewController(
119121
stop := make(chan struct{})
120122
opts := krt.NewOptionsBuilder(stop, "ingress", options.KrtDebugger)
121123

124+
tw := revisions.NewTagWatcher(client, options.Revision, options.SystemNamespace)
122125
c := &Controller{
123126
client: client,
124127
stop: stop,
125128
status: &status.StatusCollections{},
126129
xdsUpdater: xdsUpdater,
130+
tagWatcher: krt.NewRecomputeProtected(tw, false, opts.WithName("tagWatcher")...),
127131
}
132+
tw.AddHandler(func(s sets.String) {
133+
c.tagWatcher.TriggerRecomputation()
134+
})
128135

129136
c.inputs = Inputs{
130137
IngressClasses: krt.NewInformer[*knetworking.IngressClass](client, opts.WithName("informer/IngressClasses")...),
@@ -167,7 +174,7 @@ func NewController(
167174
)
168175
status.RegisterStatus(c.status, Status, func(ingress *knetworking.Ingress) knetworking.IngressStatus {
169176
return ingress.Status
170-
})
177+
}, c.tagWatcher.AccessUnprotected())
171178

172179
_, RuleHostIndex := RuleCollection(
173180
SupportedIngresses,
@@ -225,6 +232,14 @@ func (c *Controller) SetStatusWrite(enabled bool, statusManager *status.Manager)
225232

226233
func (c *Controller) Run(stop <-chan struct{}) {
227234
log.Infof("Starting ingress controller")
235+
236+
tw := c.tagWatcher.AccessUnprotected()
237+
go tw.Run(stop)
238+
go func() {
239+
kube.WaitForCacheSync("ingress tag watcher", stop, tw.HasSynced)
240+
c.tagWatcher.MarkSynced()
241+
}()
242+
228243
<-stop
229244
close(c.stop)
230245
}

pilot/pkg/status/collections.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ import (
2121
"strconv"
2222
"sync"
2323

24+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
25+
2426
schematypes "istio.io/istio/pkg/config/schema/kubetypes"
2527
"istio.io/istio/pkg/kube/controllers"
2628
"istio.io/istio/pkg/kube/krt"
2729
"istio.io/istio/pkg/log"
30+
"istio.io/istio/pkg/revisions"
2831
"istio.io/istio/pkg/slices"
2932
)
3033

@@ -72,7 +75,12 @@ func (s *StatusCollections) SetQueue(queue Queue) []krt.Syncer {
7275
// krt.ObjectWithStatus, in theory, can contain anything in the "object" field. This function requires it to contain
7376
// the current live *status*, and a passed in getStatus to extract it from the object.
7477
// It will then compare the live status to the desired status to determine whether to write or not.
75-
func RegisterStatus[I controllers.Object, IS any](s *StatusCollections, statusCol krt.StatusCollection[I, IS], getStatus func(I) IS) {
78+
func RegisterStatus[I controllers.Object, IS any](
79+
s *StatusCollections,
80+
statusCol krt.StatusCollection[I, IS],
81+
getStatus func(I) IS,
82+
tagWatcher revisions.TagWatcher,
83+
) {
7684
reg := func(statusWriter Queue) krt.HandlerRegistration {
7785
h := statusCol.Register(func(o krt.Event[krt.ObjectWithStatus[I, IS]]) {
7886
l := o.Latest()
@@ -85,6 +93,10 @@ func RegisterStatus[I controllers.Object, IS any](s *StatusCollections, statusCo
8593
log.Debugf("suppress change for %v %v", l.ResourceName(), l.Obj.GetResourceVersion())
8694
return
8795
}
96+
if !tagWatcher.IsMine(metav1.ObjectMeta{Namespace: l.Obj.GetNamespace(), Name: l.Obj.GetName(), Labels: l.Obj.GetLabels()}) {
97+
log.Debugf("suppress change for %v %v because it does not belong to my revision", l.ResourceName(), l.Obj.GetResourceVersion())
98+
return
99+
}
88100
status := &l.Status
89101
if o.Event == controllers.EventDelete {
90102
// if the object is being deleted, we should not reset status

releasenotes/notes/57734.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
apiVersion: release-notes/v2
2+
kind: bug-fix
3+
area: traffic-management
4+
5+
issue:
6+
- https://github.com/istio/istio/issues/57734
7+
8+
releaseNotes:
9+
- |
10+
**Fixed** status conflicts on Route resources when multiple istio revisions are installed.

0 commit comments

Comments
 (0)