Skip to content

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

Merged
merged 2 commits into from
Aug 26, 2017

Conversation

jim-minter
Copy link
Contributor

fixes #15876

@openshift-merge-robot openshift-merge-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 23, 2017
@jim-minter
Copy link
Contributor Author

@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
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes; done

@bparees
Copy link
Contributor

bparees commented Aug 23, 2017

one nit and lgtm

@jim-minter jim-minter force-pushed the issue15876 branch 2 times, most recently from 1be0dca to 78bfc0c Compare August 24, 2017 00:19
@openshift-merge-robot openshift-merge-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 24, 2017
volumeName := namer.GetName(secretName, volumeSuffix, kvalidation.DNS1123LabelMaxLength)

// coerce from RFC1123 subdomain to RFC1123 label.
volumeName = strings.Replace(volumeName, ".", "-", -1)
Copy link
Contributor

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?

Copy link
Contributor

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.

@bparees
Copy link
Contributor

bparees commented Aug 24, 2017

@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.

@jim-minter
Copy link
Contributor Author

@bparees thanks for the pointer, you were right, pushed, let's see if it passes now

@bparees
Copy link
Contributor

bparees commented Aug 24, 2017

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 24, 2017
@openshift-merge-robot
Copy link
Contributor

[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 /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 24, 2017
@bparees
Copy link
Contributor

bparees commented Aug 25, 2017

/retest

1 similar comment
@jim-minter
Copy link
Contributor Author

/retest

@openshift-ci-robot
Copy link

@jim-minter: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins/extended_builds 5e2badf link /test extended_builds

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.

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 15942, 15940, 15957, 15858, 15946)

@openshift-merge-robot openshift-merge-robot merged commit 71cb99e into openshift:master Aug 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build fails to start if a name of a source secret contains a dot
5 participants