Description of problem: From deploymentconfig page, try to add environment variables and it pop up error. After added environment variables by cli, try to update and delete it, it also pop up error. Version-Release number of selected component (if applicable): Openshift v3.7.0-0.155.0 How reproducible: Always Steps to Reproduce: 1. # oc run mydc --image=aosqe/hello-openshift 2. Go to dc env page "/console/project/myproject/browse/dc/mydc?tab=environment", then add a pair of env variable and click "Save" 3. Added env variable by cli "oc set env dc/mydc -e DCone=dcvalue1 DCtwo=dcvalue2" then refresh browser 4. Try to update, delete, move order for environment variables Actual results: 2. Error message shows as below """ An error occurred updating environment variables for deployment config mydc. Reason: DeploymentConfig "mydc" is invalid: spec.template.spec.containers[0].envFrom: Invalid value: "": must specify one of: `configMapRef` or `secretRef` """ 4. Error message shows in any updating operation as below """ An error occurred updating environment variables for deployment config mydc. Reason: DeploymentConfig "mydc" is invalid: spec.template.spec.containers[0].envFrom: Invalid value: "": must specify one of: `configMapRef` or `secretRef` """ Expected results: Web console should add/update/delete/move order for env variables successfully. Additional info:
https://github.com/openshift/origin-web-console/pull/2275
Commits pushed to master at https://github.com/openshift/origin-web-console https://github.com/openshift/origin-web-console/commit/80b9671b14ebf50a23bd2bb3e4ea7e813a4f072d Bug 1502914 - Compact empty envFrom entries Don't include empty `envFrom` entries when updating environment variables. This causes a validation failure. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1502914 https://github.com/openshift/origin-web-console/commit/de72b67bedeaa3ac67dfd51d818bbc49c4c939af Merge pull request #2275 from spadgett/fix-edit-env Automatic merge from submit-queue. Bug 1502914 - Compact empty envFrom entries Don't include empty `envFrom` entries when updating environment variables. This causes a validation failure. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1502914 @jwforres PTAL
This is verified on Openshift v3.7.0-0.184.0 Environment variables could be updated successfully.