-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
KEP-4427: Relaxed DNS search validation: Initial draft #4428
Conversation
sethev
commented
Jan 22, 2024
- One-line PR description: Initial draft of KEP for relaxed DNS search string validation
- Issue link: Relaxed DNS search string validation #4427
- Other comments:
Welcome @sethev! |
Hi @sethev. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
KEP freeze is looming - ping me here when this is ready for re-review. |
@thockin ready for re-review |
Allowing underscores in the search string allows integration with legacy workloads without allowing anyone to define | ||
these names within Kubernetes. Since having underscores in a name creates other issues (such as inability to obtain a publicly trusted TLS certificate), | ||
search strings seem like the only area where this is likely to occur. |
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.
Based on the updated text, the reason we want this specific change is not about "searching" vs "defining", it's about "hostnames in DNS" vs "non-hostnames in DNS". Theoretically, some future Kubernetes feature might result in CoreDNS creating SRV records based on Kubernetes API fields, and in that case, we might want to allow using underscores in those fields, right?
So the reason we want to change searches
and we don't want to change anything else is because searches
is (currently) the only API field whose value gets used for things related to non-hostname DNS data.
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.
Yes, i agree with that reasoning. If a future feature introduces that case, I could see having a discussion about whether allowing underscores there encourages good practices, since then the defining vs using distinction would come in (the RFC does point out that sticking to the hostname rules leads to fewer problems, which matches my experience as well).
Co-authored-by: Dan Winship <danwinship@redhat.com>
Co-authored-by: Dan Winship <danwinship@redhat.com>
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 LGTM on the feature, but the PRR and metadata sections need to be finished.
/retest |
@thockin added file to prod-readiness folder (https://github.com/kubernetes/enhancements/pull/4428/files#diff-c3468f7eae017dc2068f76e5a37fa99d19a59f686ecad81e51936210387ab61b) |
keps/prod-readiness/4427.yaml
Outdated
@@ -0,0 +1,3 @@ | |||
kep-number: 4427 | |||
alpha: | |||
approver: "@thockin" |
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.
sorry, I am not PRR approver - @jpbetz @johnbelamaric @wojtek-t or @deads2k - can one of you serve? This one should be easy.
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.
Yes, go ahead and put my GitHub handle here and I'll review.
/lgtm except PRR reviewer |
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.
Once integration test list is updated and my other minor comments are reviewed I'm happy to approve for PRR
###### Does enabling the feature change any default behavior? | ||
|
||
No, there is no change to default behavior. | ||
This is a change to validation. |
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.
nit: validation is behavior, so this is a yes, but we're ratcheting in a widening of validation, which is OK
Added validation will be covered by unit tests along with unit tests covering the behavior | ||
when the gate is enabled or disabled. | ||
|
||
##### Integration tests |
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.
This is where the most important tests should be written. The apiserver can be started in integration with feature flags set and we have confidence that those tests mirror what will happen in production. Let's list out the test cases we need to validate the ratcheting here:
- feature gate on
- feature gate off
- feature gate on, name with_ written, feature gate off, updates still work that change other fields or that change name to something without _, (what if the name is changed to a new value with _?)
- ...
|
||
###### How can someone using this feature know that it is working for their instance? | ||
|
||
N/A. This is a validation change. |
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.
Very minor point here, but they could write a resource with _ and see that the write succeeds.
/hold cancel |
@jpbetz @danwinship @thockin updated integration test scenarios and corrected the PRR reviewer. |
/lgtm |
|
||
### Risks and Mitigations | ||
|
||
The change is opt-in, since it requires configuring a search string with an underscore. So there is no risk beyond |
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.
any libc or muslc possible problems?
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.
Not beyond what already exists (which is that different implementations of libc may have different length restrictions for the total - all search string lengths added together). I checked glibc and muslc and they don't validate anything besides the length when parsing resolv.conf (same is true of golang's resolver).
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jpbetz, sethev, thockin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |