Description of problem: On web console, dc allows "-" but bc does not allow it. Version-Release number of selected component (if applicable): OpenShift Master: v3.11.0-0.11.0 Kubernetes Master: v1.11.0+d4cacc0 OpenShift Web Console: v3.11.0-0.11.0 How reproducible: always Steps to Reproduce: 1. Login on web console, create an app by eg. oc new-app ruby~https://github.com/openshift/ruby-ex.git 2. Go to build config page, add env var, set the key to "test-key", "-key" with values Actual results: 2. Error message pop up "An error occurred updating environment variables for build config ruby-sample-build." Expected results: 2. Key should be added succesfully Additional info:
`-key` not currently a valid env var name for build configs, which have different rules than deployment configs. This is enforced by the API server and not the console. Reassigning to the build component. It looks like env var name validation was relaxed upstream in 1.8. https://github.com/kubernetes/kubernetes/blob/8d7d7a5e0d4d7e75f5a860574346944b8cc0fc43/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go#L305-L306
submitted pull request: https://github.com/openshift/origin/pull/20738
env: - name: test-key value: '-v' - name: '-key' value: '-value' Env variables are added correctly now, verified on Openshift v3.11.51.
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:3743