Bug 1752572 - incorrect case shown for config maps and secrets keys
Summary: incorrect case shown for config maps and secrets keys
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.2.0
Assignee: Samuel Padgett
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-16 16:31 UTC by Chet Hosey
Modified: 2019-10-16 06:41 UTC (History)
4 users (show)

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.
Clone Of:
Environment:
Last Closed: 2019-10-16 06:41:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Overview shows key incorrectly as "CONSOLE-CONFIG.YAML" (11.47 KB, image/png)
2019-09-16 16:31 UTC, Chet Hosey
no flags Details
SecretKeys (227.56 KB, image/png)
2019-09-17 02:35 UTC, Yadan Pei
no flags Details
ConfigMapKeys (260.21 KB, image/png)
2019-09-17 02:36 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2922 0 None None None 2019-10-16 06:41:29 UTC

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


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