-
Notifications
You must be signed in to change notification settings - Fork 4.7k
allow secrets with "." characters to be used in builds #15946
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
allow secrets with "." characters to be used in builds #15946
Conversation
@bparees this should also fix the aliasing issue. For that, I've also added unit test coverage, and enhanced the extended test (i.e. closing the stable door). |
output: | ||
to: | ||
kind: ImageStreamTag | ||
name: output:latest |
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 take it the lack of a push secret is why we didn't see this issue before..... normally we try to avoid pushing during tests since it wastes time but i guess we can live with one. can you add a comment about why we're pushing here so we don't purge this output in a future test optimization though?
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; done
one nit and lgtm |
1be0dca
to
78bfc0c
Compare
volumeName := namer.GetName(secretName, volumeSuffix, kvalidation.DNS1123LabelMaxLength) | ||
|
||
// coerce from RFC1123 subdomain to RFC1123 label. | ||
volumeName = strings.Replace(volumeName, ".", "-", -1) |
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.
Does it matter that you can no longer distinguish between a-b
and a.b
?
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 particularly. if you really have two secrets like that, we have no way to support it anyway and the pod creation will fail when we try to define two volumes w/ the same name (I would assume). You're stuck regardless.
if we were really worried about it we could try multiple de-duplication replacements, but someone having "my.secret" and "my-secret" and wanting them both in a single build isn't terribly high on my list of worries, especially since this is the first we've even heard of someone trying to use one with a dot in the name.
@jim-minter i suspect this new failure in build extended is legit, probably because we're only doing the env var reference resolution in a single spot and now that you've properly made copies of the env var array, we're doing the reference resolution on the wrong one. |
@bparees thanks for the pointer, you were right, pushed, let's see if it passes now |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bparees, jim-minter The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest |
1 similar comment
/retest |
@jim-minter: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. |
Automatic merge from submit-queue (batch tested with PRs 15942, 15940, 15957, 15858, 15946) |
fixes #15876