-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
dns v2 - both empty string and default should be allowed for namespace and partition in CE #21230
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jmurret
added
the
backport/1.19
This release series is longer active on CE, use backport/ent/1.19
label
May 28, 2024
…e and partition in Ce
jmurret
force-pushed
the
jm/dns-v2-tenancy-validation
branch
from
May 28, 2024 20:22
5d12cb5
to
329bdc1
Compare
zalimeni
approved these changes
May 28, 2024
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.
One minor comment, otherwise LGTM - thank you!
zalimeni
reviewed
May 28, 2024
Comment on lines
+11
to
+28
// NonEmptyDefaultPartitionName is the name of the default partition that is | ||
// not empty. An example of this being supplied is when a partition is specified | ||
// in the request for DNS by consul-dataplane. This has been added to support | ||
// DNS v1.5, which needs to be compatible with the original DNS subsystem which | ||
// supports partition being "default" or empty. Otherwise, use DefaultPartitionName. | ||
NonEmptyDefaultPartitionName = "default" | ||
|
||
// DefaultNamespaceName is used to mimic the behavior in consul/structs/intention.go, | ||
// where we define IntentionDefaultNamespace as 'default' and so we use the same here. | ||
// This is a little bit strange; one might want it to be "" like DefaultPartitionName. | ||
DefaultNamespaceName = "default" | ||
|
||
// Reviewer Note: This is a little bit strange; one might want it to be "" like partition name | ||
// However in consul/structs/intention.go we define IntentionDefaultNamespace as 'default' and so | ||
// we use the same here | ||
const DefaultNamespaceName = "default" | ||
// EmptyNamespaceName is the name of the default partition that is an empty string. | ||
// An example of this being supplied is when a namespace is specifiedDNS v1. | ||
// EmptyNamespaceName has been added to support DNS v1.5, which needs to be | ||
// compatible with the original DNS subsystem which supports partition being "default" or empty. | ||
// Otherwise, use DefaultNamespaceName. | ||
EmptyNamespaceName = "" |
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.
👏🏻
zalimeni
approved these changes
May 28, 2024
4 tasks
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
tenancy was being validated on DNS queries from consul-dataplane to only allow partition to be set to an empty string. It was not allow
default
in either case.Testing & Reproduction steps
Links
PR Checklist