Skip to content
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

Should not be able to add the same secret or config map to an app twice #2226

Closed
spadgett opened this issue Oct 6, 2017 · 6 comments
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/P2
Milestone

Comments

@spadgett
Copy link
Member

spadgett commented Oct 6, 2017

It's doesn't make sense to add the same secret twice.

cc @cdcabrera

@spadgett spadgett added kind/bug Categorizes issue or PR as related to a bug. priority/P2 labels Oct 6, 2017
@spadgett spadgett added this to the 3.7.0 milestone Oct 6, 2017
@jhadvig
Copy link
Member

jhadvig commented Oct 10, 2017

@spadgett do you mean the in the DC's Environment Variables section ? Or BC's Build Secrets section ?

@jhadvig
Copy link
Member

jhadvig commented Oct 10, 2017

@jeff-phillips-18 mind if I take this one ?

@jeff-phillips-18
Copy link
Member

go for it @jhadvig

@jhadvig jhadvig assigned jhadvig and unassigned jeff-phillips-18 Oct 10, 2017
@spadgett
Copy link
Member Author

@jhadvig I mean on the secret or config map page. There's an "Add to Application" button.

@jhadvig
Copy link
Member

jhadvig commented Oct 10, 2017

@spadgett what if the application contains two containers, where one of them already contains the secret/configMap... shouldn't we show the application if at least one of its containers doesn't contain the secret/configMap ?

@spadgett
Copy link
Member Author

shouldn't we show the application if at least one of its containers doesn't contain the secret/configMap ?

Good question. I think so.

openshift-merge-robot added a commit that referenced this issue Oct 17, 2017
Automatic merge from submit-queue.

Should not be able to add the same secret or config map to an application twice

The `Add to Application` modal will only show applications which DC's won't contain the secret/configMap that user wants to add. In case one of the containers won't contain the secret/configMap the application will be shown in the dropbox, but the ref will be added only to the containers that don't contain the it.

Unfortunately if, in case of multiple container DC, user chooses to specify a specific container, the checkbox of the container that already contains the ref wont be pre-selected, cause that could mislead the user that by unchecking the checkbox he could remove the ref from that specific container. Other option would be to pre-select the checkbox and also disable it, but that would require add the disable logic to the `select-container` directive. Wasn't sure if we need that ATM...

@jeff-phillips-18 @spadgett PTAL

Closes #2226
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/P2
Projects
None yet
Development

No branches or pull requests

3 participants