Bug 2017469 - Key value field is not getting updated under Environment Tab in OpenShift Web Console
Summary: Key value field is not getting updated under Environment Tab in OpenShift Web...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.8.z
Assignee: Joe Caiani
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On: 2021595
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-26 14:52 UTC by Suruchi Dharma
Modified: 2021-11-23 11:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2021595 (view as bug list)
Environment:
Last Closed: 2021-11-23 11:33:27 UTC
Target Upstream Version:


Attachments (Terms of Use)
ConfigurationFile, ExpectedOutput, ActualOutput (298.62 KB, application/vnd.oasis.opendocument.text)
2021-10-26 14:52 UTC, Suruchi Dharma
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10419 0 None open [release-4.8] Bug 2017469: key not a valid prop name causing display issue in env editor 2021-11-09 17:38:09 UTC
Red Hat Product Errata RHBA-2021:4716 0 None None None 2021-11-23 11:33:50 UTC

Description Suruchi Dharma 2021-10-26 14:52:46 UTC
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):
4.8

How reproducible:
Always

Steps to Reproduce:
1.Create a new project
2.Create new-app
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.

Actual results:
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.

Expected results:
In OCP 4.8, for environment variables, it is expected to update secret-name and Key automatically after updating in resource's Yaml file.

Additional info:
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.

Comment 1 Jakub Hadvig 2021-10-27 13:42:06 UTC
Also master(4.10) is working as expected.

Comment 4 Yadan Pei 2021-11-12 03:18:05 UTC
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` 
          env:
            - name: envfromsecret
              valueFrom:
                secretKeyRef:
                  name: yapei-secret
                  key: testkey


the final `spec` looks like 
spec:
  strategy:
    type: Rolling
    rollingParams:
      updatePeriodSeconds: 1
      intervalSeconds: 1
      timeoutSeconds: 600
      maxUnavailable: 25%
      maxSurge: 25%
    resources: {}
    activeDeadlineSeconds: 21600
  triggers:
    - type: ConfigChange
  replicas: 3
  revisionHistoryLimit: 10
  test: false
  selector:
    app: httpd
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: httpd
    spec:
      containers:
        - name: httpd
          image: >-
            image-registry.openshift-image-registry.svc:5000/openshift/httpd:latest
          ports:
            - containerPort: 8080
              protocol: TCP
          env:
            - name: envfromsecret
              valueFrom:
                secretKeyRef:
                  name: yapei-secret
                  key: testkey


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

Comment 6 Yadan Pei 2021-11-12 07:32:11 UTC
PR has been verified prior merging, moving to VERIFIED

Comment 9 errata-xmlrpc 2021-11-23 11:33:27 UTC
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.

https://access.redhat.com/errata/RHBA-2021:4716


Note You need to log in before you can comment on or make changes to this bug.