Skip to content

add a secret ref for webhook secrets#10

Merged
deads2k merged 1 commit intoopenshift:masterfrom
bparees:webhook_secrets
Nov 29, 2017
Merged

add a secret ref for webhook secrets#10
deads2k merged 1 commit intoopenshift:masterfrom
bparees:webhook_secrets

Conversation

@bparees
Copy link
Copy Markdown
Contributor

@bparees bparees commented Nov 28, 2017

@bparees
Copy link
Copy Markdown
Contributor Author

bparees commented Nov 28, 2017

@deads2k ptal/merge. needed for openshift/origin#17314


// SecretLocalReference contains information that points to the local secret being used
type SecretLocalReference struct {
// Name is the name of the resource being referenced
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"name of the secret in the same namespace being reference"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@deads2k
Copy link
Copy Markdown
Contributor

deads2k commented Nov 28, 2017

Lifting my comments from the earlier thread:

General thoughts:

  1. This prescribes the key, but doesn't add a type. Adding types (but not requiring them) can help users categorize their secrets. That could happen as a later step.
  2. Being prescriptive to reduce choice simplifies the API, but as you noted it can make discoverability harder. If you created a secretKey which defaulted to WebHookSecretKey would be a backwards compatible change that allows people to avoid specifying if they wish, but may help discoverability. This could happen later if we actually do have problems. I personally like being prescriptive.
  3. It is now possible to have a webhook configuration which is invalid at runtime. With other resources, we use controllers to reflect this in status. A similar approach could be taken here or you could write-back status from the rest handler.

This looks like a good starting point to me. We can grow on this in a few directions if we end up needing to.

@bparees any thoughts on how to manage the status aspect? A small controller seems like an option.

@smarterclayton how do you generally feel about controllers watching the validity of references over time and updating status in general? It seems consistent with other approaches and reasonably discoverable. It would simplify status reporting the CLI and the webconsole too.

@deads2k
Copy link
Copy Markdown
Contributor

deads2k commented Nov 28, 2017

@deads2k ptal/merge. needed for openshift/origin#17314

Travis seems stuck. I'll see if it unsticks or if we must summon @stevekuznetsov and get some real CI.

@bparees
Copy link
Copy Markdown
Contributor Author

bparees commented Nov 28, 2017

@bparees any thoughts on how to manage the status aspect? A small controller seems like an option.

we already have secret refs (And imagestream refs) elsewhere in the buildconfig that aren't validated. A general buildconfig controller that validated all the refs in the buildconfig and provided status(or events?) isn't a bad idea, but won't be part of this specific refactor.

@bparees
Copy link
Copy Markdown
Contributor Author

bparees commented Nov 28, 2017

seems to have passed travis after my update.

@bparees
Copy link
Copy Markdown
Contributor Author

bparees commented Nov 29, 2017

@deads2k anything else?

@bparees
Copy link
Copy Markdown
Contributor Author

bparees commented Nov 29, 2017

/assign @deads2k

@bparees
Copy link
Copy Markdown
Contributor Author

bparees commented Nov 29, 2017

(I suppose expecting we have bots setup for this repo would be too much)

@deads2k
Copy link
Copy Markdown
Contributor

deads2k commented Nov 29, 2017

we already have secret refs (And imagestream refs) elsewhere in the buildconfig that aren't validated. A general buildconfig controller that validated all the refs in the buildconfig and provided status(or events?) isn't a bad idea, but won't be part of this specific refactor.

I agree. Just wanted to know about general general concept.

/lgtm

@openshift-ci-robot
Copy link
Copy Markdown

@deads2k: changing LGTM is restricted to assignees, and assigning you to the PR failed.

Details

In response to this:

we already have secret refs (And imagestream refs) elsewhere in the buildconfig that aren't validated. A general buildconfig controller that validated all the refs in the buildconfig and provided status(or events?) isn't a bad idea, but won't be part of this specific refactor.

I agree. Just wanted to know about general general concept.

/lgtm

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.

@deads2k
Copy link
Copy Markdown
Contributor

deads2k commented Nov 29, 2017

(I suppose expecting we have bots setup for this repo would be too much)

Welcome to the wild west. I'll fix that :)

@deads2k deads2k merged commit e27edf8 into openshift:master Nov 29, 2017
@stevekuznetsov
Copy link
Copy Markdown
Contributor

Yeah there is no way to give the bots access to all repos, and they need write access to a repo to do anything meaningful to it, so just ask me or someone else who can edit those configs to add them.

openshift-merge-robot added a commit to openshift/origin that referenced this pull request Dec 21, 2017
Automatic merge from submit-queue.

add a secretref for webhook secrets

fixes bug https://bugzilla.redhat.com/show_bug.cgi?id=1504819

api changes are now here: openshift/api#10
@bparees bparees deleted the webhook_secrets branch January 2, 2018 16:38
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.

4 participants