Skip to content

Rework Secrets in BuildConfig to use ObjectReference #2347

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
May 21, 2015

Conversation

mfojtik
Copy link
Contributor

@mfojtik mfojtik commented May 19, 2015

No description provided.

@mfojtik
Copy link
Contributor Author

mfojtik commented May 19, 2015

Fixes: #2326

@mfojtik
Copy link
Contributor Author

mfojtik commented May 19, 2015

[test]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/2323/)

@mfojtik
Copy link
Contributor Author

mfojtik commented May 19, 2015

@bparees @smarterclayton @liggitt PTAL

I will do follow up (change ObjectReference to LocalObjectReference or whatever will land in upstream).

@bparees
Copy link
Contributor

bparees commented May 19, 2015

lgtm.

@mfojtik
Copy link
Contributor Author

mfojtik commented May 20, 2015

@bparees just realized that I have to do validation for this.

@mfojtik mfojtik force-pushed the secrets-references branch from 9fd2dbc to 1b752af Compare May 20, 2015 09:13
@mfojtik
Copy link
Contributor Author

mfojtik commented May 20, 2015

@deads2k @bparees I reworked this to use the LocalObjectReference

@mfojtik mfojtik force-pushed the secrets-references branch from 1b752af to aa4c2ea Compare May 20, 2015 09:15
@deads2k
Copy link
Contributor

deads2k commented May 20, 2015

@smarterclayton you mentioned a rebase. That would obviate the need for the upstream patch. ETA?

// the authentication for pulling the Docker images from the private Docker
// registries
PullSecretName string `json:"pullSecretName,omitempty"`
PullSecret *kapi.LocalObjectReference `json:"pullSecret,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Add the requirement on the type of Secrets that are allowed to the comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea, I will also add description

@deads2k
Copy link
Contributor

deads2k commented May 20, 2015

I think the only thing I'm worried about is validating the secret (#2347 (comment) and #2347 (comment)). After you've got that, lgtm

// the base64 encoded credentials. Supported auth methods are: ssh-privatekey.
SourceSecretName string `json:"sourceSecretName,omitempty" description:"supported auth methods are: ssh-privatekey`
SourceSecret *kapi.LocalObjectReference `json:"sourceSecret,omitempty" description:"supported auth methods are: ssh-privatekey"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't think we could make changes like this... shouldn't this stay a string and be changed to a LocalObjectReference in conversion?

Copy link
Contributor

Choose a reason for hiding this comment

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

It wasn't in long enough to qualify for API stability guarantees

On May 20, 2015, at 9:03 PM, Jordan Liggitt notifications@github.com wrote:

In pkg/build/api/v1beta1/types.go:

// the base64 encoded credentials. Supported auth methods are: ssh-privatekey.
  • SourceSecretName string json:"sourceSecretName,omitempty" description:"supported auth methods are: ssh-privatekey
  • SourceSecret *kapi.LocalObjectReference json:"sourceSecret,omitempty" description:"supported auth methods are: ssh-privatekey"
    I didn't think we could make changes like this... shouldn't this stay a string and be changed to a LocalObjectReference in conversion?


Reply to this email directly or view it on GitHub.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, didn't know how long it had been there

@mfojtik mfojtik force-pushed the secrets-references branch from 7058667 to edc50df Compare May 21, 2015 13:20
@mfojtik
Copy link
Contributor Author

mfojtik commented May 21, 2015

@liggitt validation updated with Prefix(), thanks!

@mfojtik
Copy link
Contributor Author

mfojtik commented May 21, 2015

@deads2k to validate the secret, the Secret has to exist, right? What if I use PullSecret to reference a Secret that does not exists (yet)?

@deads2k
Copy link
Contributor

deads2k commented May 21, 2015

to validate the secret, the Secret has to exist, right? What if I use PullSecret to reference a Secret that does not exists (yet)?

I'm not talking about validating during the creation. I'd like to see the check done at the point of usage. Otherwise, you're mounting a secret that won't work.

@mfojtik
Copy link
Contributor Author

mfojtik commented May 21, 2015

@deads2k gotcha

@mfojtik mfojtik force-pushed the secrets-references branch from edc50df to 659c7a3 Compare May 21, 2015 14:36
@mfojtik mfojtik force-pushed the secrets-references branch from 659c7a3 to a35be73 Compare May 21, 2015 15:55
@mfojtik
Copy link
Contributor Author

mfojtik commented May 21, 2015

@deads2k the last issue that remains open here is validation of the Secret content and type that we agreed to no do during this sprint (or do it as follow-up). PTAL

@mfojtik mfojtik force-pushed the secrets-references branch 2 times, most recently from 7d32011 to 38b90de Compare May 21, 2015 16:25
@mfojtik
Copy link
Contributor Author

mfojtik commented May 21, 2015

I can't reproduce the Jenkins failure locally:

π ~/go/src/github.com/openshift/origin ./hack/test-go.sh pkg/build/api/v1
ok      github.com/openshift/origin/pkg/build/api/v1    0.009s

@mfojtik mfojtik force-pushed the secrets-references branch from 38b90de to 35aa9d9 Compare May 21, 2015 18:22
@mfojtik
Copy link
Contributor Author

mfojtik commented May 21, 2015

@deads2k fixed conversions, this should be now green a good to go.

@deads2k
Copy link
Contributor

deads2k commented May 21, 2015

Trello card for validation: https://trello.com/c/9nCfbdn4/583-validate-secrets-in-buildconfig-future-build

[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/2046/) (Image: devenv-fedora_1591)

@openshift-bot
Copy link
Contributor

Evaluated for origin up to 35aa9d9

openshift-bot pushed a commit that referenced this pull request May 21, 2015
@openshift-bot openshift-bot merged commit 94118ac into openshift:master May 21, 2015
@mfojtik mfojtik deleted the secrets-references branch August 25, 2015 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants