Bug 1529467
| Summary: | Should prevent user from adding configmap/secret data as env when configmap/secret has invalid format key | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Yadan Pei <yapei> |
| Component: | Management Console | Assignee: | Jakub Hadvig <jhadvig> |
| Status: | CLOSED ERRATA | QA Contact: | Yadan Pei <yapei> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.9.0 | CC: | aos-bugs, jforrest, jokerman, mmccomas, spadgett, yapei |
| Target Milestone: | --- | ||
| Target Release: | 3.9.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
Adding a config-map with invalid key name to a DC, in the deploymnet's environment tab.
Consequence:
The invalid config key wont be added after saving.
Fix:
Warn user that only valid key from the picked config-map will be added to the DC after saving.
Result:
User is aware of the fact that only valid keys of the picekd config-map will be added to the DC
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-03-28 14:17:25 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Yadan Pei
2017-12-28 08:58:31 UTC
We don't prevent the keys from being added client side, it happens at the point the env is set up for the pod on the kubelet. I hesitate to prevent them from adding the secret / config map, we generally err on the side of letting it happen but warning them. In this case it could still be valid for them to inject the Secret / config map, then modify the secret / config map afterward to have valid content. The way this feature works it will pull whatever the current state of the object is at the time the pod is created to determine what variables it can inject. It might be worth updating the warning to be clear in this case that all of the keys are invalid environment variables. +1 for updating the warning message and let know the user that some of the env vars are invalid. There could be a use case where user would want to add an invalid env var wiih intention, but change it later. Will update the the message Thanks all, update warning message also reasonable Message updated in https://github.com/openshift/origin-web-console/pull/2617 Checked on v3.9.0-0.20.0 When configmap/secret data includes invalid key, use is not allowed to add them as environment variables, warning info shows "...contains keys that are not valid environment variable names. Only ... keys with valid names will be added as environment variables." Please help move to ON_QA, then QE could verify Sorry, missed one check in “Add to Application” dialog On ConfigMap/Secret page, when click "Add to Application" and select secret/configmap which has invalid key, the Save button is not disabled. Really sorry for the mistake, I mixed with some other envs. Here is the latest update, no behavior changes, only warning message updated "...contains keys that are not valid environment variable names. Only ... keys with valid names will be added as environment variables" as discussed. Checked on v3.9.0-0.22.0 Warning message changes to Secret/Config map <secret_name>/<configmap_name> contains keys that are not valid environment variable names. Only secret/config map keys with valid names will be added as environment variables. I think it's clear to user with warning info above, Move to VERIFIED Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0489 |