Description of problem: Since env variable could be set from other resource like secret, the value is hidden which could be accept. if user updated the secret (adding/deleting data in key/value pairs), value of env variable should be updated automatically, but now it need to be set again by user. Version-Release number of selected component (if applicable): oc/openshift v1.5.0-alpha.1+04db561-37 How reproducible: Always Steps to Reproduce: 1. Create a secret: cat > secret.yaml << EOF apiVersion: v1 kind: Secret metadata: name: mysecret data: data-1: dmFsdWUtMQ0K data-2: dmFsdWUtMg0KDQo= EOF # oc create -f secret.yaml 2. Create app and set dc env from secret # oc process -f https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json | oc create -f - # oc set env --from=secret/mysecret dc/database 3. Check dc env from CLI and web-console cli: # oc set env dc/database --list web-console: browse/dc/database?tab=environment 4.Add another data of key/value to secret # oc edit secret/mysecret (add another data of key/value ) data: data-1: dmFsdWUtMQ0K data-2: dmFsdWUtMg0KDQo= data-3: dmFsdWUtMg0KDQo= 5. Check the env for dc again (repeat step3) Actual results: 5. From web-console: DATA_1 | Set to the key data-1 in secret mysecret DATA_2 | Set to the key data-1 in secret mysecret From CLI: # DATA_1 from secret mysecret, key data-1 # DATA_2 from secret mysecret, key data-2 Expected results: 5 dc should update the env automatically From web-console: DATA_1 | Set to the key data-1 in secret mysecret DATA_2 | Set to the key data-1 in secret mysecret DATA_3 | Set to the key data-1 in secret mysecret From CLI: # DATA_1 from secret mysecret, key data-1 # DATA_2 from secret mysecret, key data-2 # DATA_3 from secret mysecret, key data-3 Additional info:
This is working as designed, set-env is just a helper that automatically adds the currently existing keys individually to the DC's env. The behavior you are asking for is a new feature that is coming in kube/origin 1.6 where you can add an entire secret/config map as environment and the keys will all automatically be added when the pod is created. We are starting work on what this will behave like in the UI as part of https://trello.com/c/gF238DYE but the work can not be finished until the API changes are available when origin is rebased on kube 1.6