-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix private destination rules in root namespace #25962
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 private destination rules in root namespace #25962
Conversation
Skipping CI for Draft Pull Request. |
a2a0bfe
to
28b4611
Compare
pilot/pkg/model/push_context.go
Outdated
@@ -1298,6 +1307,14 @@ func (ps *PushContext) initDestinationRules(env *Environment) error { | |||
return nil | |||
} | |||
|
|||
func makeProcessedDestRules() *processedDestRules { |
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.
s/makeProcessedDestRules/newProcessedDestRules
pilot/pkg/model/push_context.go
Outdated
if configs[i].Namespace == ps.Mesh.RootNamespace { | ||
ps.mergeDestinationRule(rootNamespaceLocalDestRules, configs[i], exportToMap) |
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.
Shouldn't this apply for private DRs?
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.
Hmm yes it seems this is backwards. Not sure how the test passes.. let me revist
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.
The test was wrong - just updated the test+code
28b4611
to
167be9a
Compare
@howardjohn: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
Fixes #25253
Opening for early comments - still need tests.
One thing we may consider is adding a map of only private DR (or maybe even a special case for just root namespace...). This way we can distinguish between
*.local
rules meant as "global" andexportTo=.
rules meant for istio-system and resolveNOTE: This does mean that we are effectively giving destination rules in other namespace precedence over private dest rules in the config root namespace
cc @rshriram @hzxuzhonghu