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
validate nodeLabels in kubelet #109263
validate nodeLabels in kubelet #109263
Conversation
Welcome @FeLvi-zzz! |
Hi @FeLvi-zzz. 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. |
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.
/ok-to-test
/triage accepted |
Signed-off-by: Soh Takada <34182539+FeLvi-zzz@users.noreply.github.com>
411fb78
to
5ec2aaa
Compare
labels: map[string]string{ | ||
"cloud.google.com/repository": "kubernetes/kubernetes", | ||
}, | ||
}, |
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 case returns error,
invalid node labels: 'kubernetes/kubernetes' - a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
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.
Thanks for an error message as an example here.
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.
Thanks for the PR. It looks good to me but it needs review from the kubelet maintainers. We are also in code freeze for 1.24.
/lgtm |
/assign @klueska |
@klueska |
/assign @mrunalp |
/lgtm Thanks for improving the usability of the system. :-) |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dchen1107, FeLvi-zzz 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 |
What type of PR is this?
/kind bug
What this PR does / why we need it:
add validation in kubelet
--node-labels
flag.Which issue(s) this PR fixes:
Fixes #109262
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: