Created attachment 1837243 [details]
ConfigurationFile, ExpectedOutput, ActualOutput
Description of problem:
For resources like DeploymentConfig/Daemonset, values are not updated properly in Openshift Console. Need to update Key value manually for environment variable in resource's Environment Tab.
In OCP 4.7, after updating resource's (DeploymentConfig/Daemonset, etc) Yaml file, for environment variable, Secret-name and Key gets updated automatically. We can check this in resource's Environment Tab on Openshift Console.
In OCP 4.8, even after updating in resource's (DeploymentConfig/Daemonset, etc) Yaml file, For Environment variables, only secret-name is visible, key is not getting updated in resource's Environment Tab on openshift console. We need to update Key manually.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.Create a new project
3.Create a secret. Update Keys under `data:` .
4.Create a resource (DeploymentConfig, DaemonSet,etc)
5.In resource's yaml file, under `spec:` add `env:` and mention `secretKeyRef` with secret-name and Key.
6.Check Openshift Console -> Workload -> <Select Resource> -> Environment Tab -> Single values (env) -> check if secret-name and Key are updated properly.
In OCP 4.8, even after updating in resource's Yaml file, For Environment variables, only secret-name is visible, key is not getting updated in Environment Tab on openshift console. We need to update Key manually.
In OCP 4.8, for environment variables, it is expected to update secret-name and Key automatically after updating in resource's Yaml file.
In OCP 4.7, After updating resource's Yaml file, for environment variable, Secret-name and Key gets updated automatically in Environment Tab on Openshift Console.
I have attached the screenshot from OCP 4.7 (working). And output from OCP 4.8 (non-working). Also YAML file for DeploymentConfig with mentioned environment variables.
Note: All pods are running, there is no effect on cluster resources.
Also master(4.10) is working as expected.
1. Create project and resource(DeploymentConfig)
2. Goes to Workloads -> DeploymentConfigs -> your DeploymentConfig -> YAML tab, edit resource YAML and add env reference snippet(following) into `spec.template.spec.containers`
- name: envfromsecret
the final `spec` looks like
- type: ConfigChange
- name: httpd
- containerPort: 8080
- name: envfromsecret
3. Go back to resource `Environment` tab, check `Single values (env)` section, Key value field is properly updated, tested on a cluster created by cluster-bot
PR has been verified prior merging, moving 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 (OpenShift Container Platform 4.8.21 bug fix update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.