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
1. create Dockerfile
# cat <<EOF > Dockerfile
ENV FOO BAR
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
description: JBoss EAP 6.4 S2I images.
# oc create -f test-is.yaml -n openshift && oc import-image eap64-extended -n openshift
- Access to the webconsole and click "Show advanced routing, build, and deployment options". It outputs the all environmental values including other layers'.
- Hide other layers' env values.
- 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 *
1. Add new-project
2. Select "jboss-eap64-openshift"
3. Click "Show advanced routing, build, and deployment options Create"
- Deployment Config doesn't show any environment values to configure
- Show env values that the image have. (e.g JBOSS_HOME, JBOSS_IMAGE_NAME for jboss-eap64-openshift image)
- 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 v188.8.131.52 or newer.
Checked against openshift v184.108.40.206
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.