Bug 1752572

Summary: incorrect case shown for config maps and secrets keys
Product: OpenShift Container Platform Reporter: Chet Hosey <ChetRHosey>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: aos-bugs, ChetRHosey, jokerman, yapei
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the web console would show config map and secret keys with all caps styling in the resource details pages. This is a problem as key names are often file names and case sensitive. The 4.2 web console now shows config map and secret keys in their proper case.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-16 06:41:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Overview shows key incorrectly as "CONSOLE-CONFIG.YAML"
none
SecretKeys
none
ConfigMapKeys none

Description Chet Hosey 2019-09-16 16:31:51 UTC
Created attachment 1615568 [details]
Overview shows key incorrectly as "CONSOLE-CONFIG.YAML"

Description of problem:

Case shown for config map and secrets keys on overview page is misleading.


Version-Release number of selected component (if applicable):

4.1.14


How reproducible:

100%


Steps to Reproduce:
1. Create config map or secret with lowercase or mixed-case key name
2. View Overview page in console


Actual results:

The key name is shown in uppercase regardless of actual capitalization.


Expected results:

The display should use the actual case of the key.


Additional info:

Key names are often case-sensitive at the point of usage. If mapped as a filename or environmental variable, "file.properties" and "FILE.PROPERTIES" are quite different. Displaying the case accurately is less likely to lead to confusion or mistakes.

Comment 1 Samuel Padgett 2019-09-16 17:24:29 UTC
Fixed in 4.2 by https://github.com/openshift/console/pull/1465

Comment 3 Yadan Pei 2019-09-17 02:34:13 UTC
1. Create secret and configmap with upper & lower case keys
$ oc get secret testsecret1 -n yapeitest1 -o yaml
apiVersion: v1
data:
  KEY2: MjIyMjI=
  kEY3: MzMzMzM=
  key1: MTExMTEx
kind: Secret
metadata:
  creationTimestamp: "2019-09-17T02:13:59Z"
  name: testsecret1
  namespace: yapeitest1
  resourceVersion: "34421"
  selfLink: /api/v1/namespaces/yapeitest1/secrets/testsecret1
  uid: cf676d46-d8f0-11e9-9419-023091d48c0e
type: Opaque
$ oc get cm example -n yapeitest1 -o yaml
apiVersion: v1
data:
  example.PROPERTY.2: world
  example.property.1: hello
  example.property.file: |-
    property.1=value-1
    property.2=value-2
    property.3=value-3
kind: ConfigMap
metadata:
  creationTimestamp: "2019-09-17T02:16:06Z"
  name: example
  namespace: yapeitest1
  resourceVersion: "35198"
  selfLink: /api/v1/namespaces/yapeitest1/configmaps/example
  uid: 1b50bb10-d8f1-11e9-9419-023091d48c0e
2. Go to secret/testsecret1 overview, check data, secret keys are shown with actual case 
3. Go to configmap/example Overview, check data, config map keys are shown with actual case 

Verified on 4.2.0-0.nightly-2019-09-16-175247

Comment 4 Yadan Pei 2019-09-17 02:35:45 UTC
Created attachment 1615652 [details]
SecretKeys

Comment 5 Yadan Pei 2019-09-17 02:36:14 UTC
Created attachment 1615653 [details]
ConfigMapKeys

Comment 6 errata-xmlrpc 2019-10-16 06:41:14 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, 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-2019:2922