Created attachment 1178399 [details] screenshot for the "Actual results" in comment#0 Description of problem: === - New application from extended docker image via web console create deploymentConfig with other layers environmental values How reproducible: === 1. create Dockerfile # cat <<EOF > Dockerfile FROM registry.access.redhat.com/jboss-eap-6/eap64-openshift:latest ENV FOO BAR EOF 2. Build image and push to the docker hub. # docker build -t docker.io/<ACCOUNT>/eap64-extended . && docker push docker.io/<ACOCOUNT>/eap64-extended 3. Create imagestream and iimport image # cat <<EOF > test-is.yaml apiVersion: v1 kind: ImageStream metadata: annotations: openshift.io/image.dockerRepositoryCheck: 2016-06-27T00:38:39Z creationTimestamp: null name: eap64-extended spec: dockerImageRepository: docker.io/nak3/eap64-extended tags: - annotations: description: JBoss EAP 6.4 S2I images. iconClass: icon-jboss sampleContextDir: kitchensink sampleRef: 6.4.x sampleRepo: https://github.com/jboss-developer/jboss-eap-quickstarts.git supports: eap:6.4,javaee:6,java:8,xpaas:1.3 tags: builder,eap,javaee,java,jboss,xpaas version: "latest" name: "latest" status: dockerImageRepository: "" EOF # oc create -f test-is.yaml -n openshift && oc import-image eap64-extended -n openshift Actual results: - Access to the webconsole and click "Show advanced routing, build, and deployment options". It outputs the all environmental values including other layers'. Expected results: === - Hide other layers' env values. Additional info: === - If I created the application with oc new-app, deploymentConfig woudln't add the values.
new-app doesn't add them to the deployment config explicitly but the environment variables are there at runtime anyway because they are defined on the image itself, including env vars from previous layers. new-app let's you override the variables' values using the -e flag, the web console does it by displaying them to you in the list. We have no plans to change this behavior in the web console because we are intentionally letting you know those variables exist and what they are set to. If you want to remove environment variables you need to unset them as part of the image being built.
Thank you for the answer. But then, it brings one unclear thing. Default imagestream (e.g jboss-eap64-openshift) doesn't show any env value, like JBOSS_HOME, JBOSS_IMAGE_NAME and so on. So, although I agree with your design below, how to see these variables that are set on the default builder image via webconsole? > We have no plans to change this behavior in the web console because we are intentionally letting you know those variables exist and what they are set to.
Thanks for bringing up this issue, the Env appears on one subobject in the API response in one case and a different subobject in the other case. We are looking into it.
We need to switch to always pulling dockerImageMetadata.Config.Env instead of dockerImageMetadata.ContainerConfig.Env
* Update subject and here is the correct issue and reproduce steps * Reproduce steps === 1. Add new-project 2. Select "jboss-eap64-openshift" 3. Click "Show advanced routing, build, and deployment options Create" Actual results: === - Deployment Config doesn't show any environment values to configure Expected results: === - Show env values that the image have. (e.g JBOSS_HOME, JBOSS_IMAGE_NAME for jboss-eap64-openshift image) Workaround === - Extend the image and use the image
Fixed in Origin, we did end up changing the behavior, it will not save the env from the image, it now shows you the exist in a read only state and the user can choose to override those values if they want to explicitly set them to something different. See details in https://github.com/openshift/origin-web-console/pull/161#issuecomment-233457077
I'm not understanding how this is supposed to make it to OpenShift Container Platform.
@tdawson we only mark it as MODIFIED if the console change has been vendored back into the origin repo.
This has been merged and is in OSE v3.3.0.17 or newer.
Checked against openshift v3.3.0.18 kubernetes v1.3.0+507d3a7 etcd 2.3.0+git This is verification steps 1. Create a new project 2. Select "jboss-eap64-openshift:1.4" 3. Click "Show advanced routing, build, and deployment options" 4. In Deployment Configuration section, click "Show/Hide image environment variables" could toggle the display of existing environment variables Existing environment variables is shown as readonly and user could overwrite them by defining to different value
This works as expected I think, 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-2016:1933