-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: sort resources when building MeshContext #5391
Conversation
Signed-off-by: Ilya Lobkov <[email protected]>
Signed-off-by: Ilya Lobkov <[email protected]>
Signed-off-by: Ilya Lobkov <[email protected]>
Signed-off-by: Ilya Lobkov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really not convinced doing the sorting in the store is the right approach. To me sorting what matters in the mesh_context_builder
is sufficient and more predictible
Only |
Signed-off-by: Ilya Lobkov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except one minor comment
Signed-off-by: Ilya Lobkov <[email protected]>
@Mergifyio backport release-2.0 |
✅ Backports have been created
|
Signed-off-by: Ilya Lobkov <[email protected]> (cherry picked from commit ff4463e) # Conflicts: # pkg/core/resources/store/options.go # pkg/xds/server/v3/snapshot_generator_test.go
@Mergifyio backport release-1.8 release-1.7 release-1.6 release-1.5 |
Signed-off-by: Ilya Lobkov <[email protected]> (cherry picked from commit ff4463e) # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/generator.go # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go
Signed-off-by: Ilya Lobkov <[email protected]> (cherry picked from commit ff4463e) # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/gateway_route_generator_test.go # pkg/plugins/runtime/gateway/generator.go # pkg/plugins/runtime/gateway/testdata/tcp/tcp-route-no-egress.yaml # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go
Signed-off-by: Ilya Lobkov <[email protected]> (cherry picked from commit ff4463e) # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/gateway_route_generator_test.go # pkg/plugins/runtime/gateway/generator.go # pkg/plugins/runtime/gateway/testdata/tcp/tcp-route-no-egress.yaml # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/context/mesh_context_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go
Signed-off-by: Ilya Lobkov <[email protected]> (cherry picked from commit ff4463e) # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/gateway_route_generator_test.go # pkg/plugins/runtime/gateway/generator.go # pkg/plugins/runtime/gateway/testdata/tcp/tcp-route-no-egress.yaml # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/context/mesh_context_builder.go # pkg/xds/server/v3/components.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go # pkg/xds/server/v3/testdata/dataplane.input.yaml # pkg/xds/sync/ingress_proxy_builder.go
✅ Backports have been created
|
Signed-off-by: Ilya Lobkov <[email protected]> # Conflicts: # pkg/core/resources/store/options.go # pkg/xds/server/v3/snapshot_generator_test.go
Signed-off-by: Ilya Lobkov <[email protected]> # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/generator.go # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go
fix: sort resources when building MeshContext (#5391) Signed-off-by: Ilya Lobkov <[email protected]> # Conflicts: # pkg/core/resources/store/options.go # pkg/xds/server/v3/snapshot_generator_test.go Co-authored-by: Ilya Lobkov <[email protected]>
Signed-off-by: Ilya Lobkov <[email protected]> # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/generator.go # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go
fix: sort resources when building MeshContext (#5391) Signed-off-by: Ilya Lobkov <[email protected]> # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/generator.go # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go Co-authored-by: Ilya Lobkov <[email protected]>
Signed-off-by: Ilya Lobkov <[email protected]> # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/generator.go # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go
fix: sort resources when building MeshContext (#5391) Signed-off-by: Ilya Lobkov <[email protected]> # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/generator.go # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go Co-authored-by: Ilya Lobkov <[email protected]>
Signed-off-by: Ilya Lobkov <[email protected]> # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/generator.go # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go
fix: sort resources when building MeshContext (#5391) Signed-off-by: Ilya Lobkov <[email protected]> # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/generator.go # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go Co-authored-by: Ilya Lobkov <[email protected]>
fix: sort resources when building MeshContext (#5391) Signed-off-by: Ilya Lobkov <[email protected]> # Conflicts: # pkg/core/resources/store/options.go # pkg/plugins/runtime/gateway/generator.go # pkg/test/resources/builders/dataplane_builder.go # pkg/xds/server/v3/reconcile.go # pkg/xds/server/v3/snapshot_generator_test.go Co-authored-by: Ilya Lobkov <[email protected]>
Kuma passes
/cluster/transport_socket_matches
without sorting. This creates changes in CDS and unnecessary updates.There are 2 approaches we can take to guarantee a stable snapshot:
ClientSideTLS
andProvidedEndpointClusterConfigurer
Today we have pieces of both approaches. For example, we sort endpoints in
ProvidedEndpointClusterConfigurer
but we sort the list of external services before passing them to Ingress and Egress generators.I like the second approach a little bit more, I think if we provide stable input for generators and restrict using
maps
ingenerators
package (for example, requiring using OrderedMap) we can guarantee a stable output.Current PR adds sorting of external services for MeshGateway and DPP generators.
Checklist prior to review
syscall.Mkfifo
have equivalent implementation on the other OS --UPGRADE.md
? --> Changelog:
entry here or add aci/
label to run fewer/more tests?