-
Notifications
You must be signed in to change notification settings - Fork 339
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 the managed-by-label getting populated with invalid value. #1334
base: master
Are you sure you want to change the base?
Fix the managed-by-label getting populated with invalid value. #1334
Conversation
Signed-off-by: Vamsi Krishna Siddu <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vamsikrishna-siddu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @vamsikrishna-siddu! |
Hi @vamsikrishna-siddu. Thanks for your PR. I'm waiting for a kubernetes-csi 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-sigs/prow repository. |
/cc @awels |
@vamsikrishna-siddu: GitHub didn't allow me to request PR reviews from the following users: awels. Note that only kubernetes-csi members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
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-sigs/prow repository. |
Please sign the CLA Authorization first. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
There will be a case when the length of the node name is equals to 53 and base length becomes zero. This will make the prefix value to be empty and the label will be generated starting with '-' which is invalid label.
Ex: nodename is
worker1.ocp-virt2-s390x.s390g.lab.eng.rdu2.redhat.com
generated label name:
-53f40b57-worker1.ocp-virt1-s390x.s390g.lab.eng.rdu2.redhat.com
This is causing the issue for the hostpath provisioner while generating csistoragecapacity objects.
W0116 09:21:22.515275 1 reflector.go:547] k8s.io/client-go/informers/factory.go:160: failed to list *v1.CSIStorageCapacity: unable to parse requirement: values[0][csi.storage.k8s.io/managed-by]: Invalid value: "-53f40b57-worker1.ocp-virt1-s390x.s390g.lab.eng.rdu2.redhat.com": 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])?')
Which issue(s) this PR fixes:
Fixes #1333
Special notes for your reviewer:
Does this PR introduce a user-facing change?: