Bug 2106366

Summary: ProjectHelmChartRepository form doesn't allow the user to make a difference between name and displayname
Product: OpenShift Container Platform Reporter: Christoph Jerolimov <cjerolim>
Component: Dev ConsoleAssignee: Debsmita Santra <dsantra>
Status: CLOSED ERRATA QA Contact: spathak <spathak>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.11CC: dsantra, nmukherj
Target Milestone: ---   
Target Release: 4.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-17 19:52:29 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:
Embargoed:
Attachments:
Description Flags
helm-chart-repo-form.mp4 none

Description Christoph Jerolimov 2022-07-12 13:21:09 UTC
Description of problem:
The new ProjectHelmChartRepository has a form field "Chart repository name" with the helptext "A display name for the Helm Chart repository."

But doesn't allow the user to enter a human-readable name. When entering "IBM Charts" the error shows that it must match a Kubernetes resource name.

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

How reproducible:
Always

Steps to Reproduce:
1. Switch to Developer Perspective
2. Navigate to Add > "Helm Chart repositories"
3. Enter "IBM Charts" as "Chart repository name"

(and if this is fixed https://raw.githubusercontent.com/IBM/charts/master/repo/community/index.yaml as URL)

Actual results:
"Chart repository name" shows an validation error:
"Name must consist of lower-case letters, numbers and hyphens. It must start with a letter and end with a letter or number."

When switching to the YAML output you can see that the "Chart repository name" input is used as `metadata.name` as well as `spec.name`.

`spec.name` is defined in the ProjectHelmChartRepository CRD as: "Optional associated human readable repository name, it can be used by UI for displaying purposes"

Expected results:
Instead of one input field, I would expect (or suggest) to show two input fields.

1. "Name" (required)
   helpText: "Unique resource name for the Helm Chart repository."

2. "Display name" (optional)
   helpText: "A display name for the Helm Chart repository."

The first field should only update `metadata.name`, and the second one `spec.name`.

Additional info:

Comment 1 Christoph Jerolimov 2022-07-12 13:26:24 UTC
Created attachment 1896358 [details]
helm-chart-repo-form.mp4

Comment 2 Christoph Jerolimov 2022-07-27 08:43:04 UTC
Verified on 4.12.0-0.nightly-2022-07-25-055755

Comment 5 errata-xmlrpc 2023-01-17 19:52:29 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 (Moderate: OpenShift Container Platform 4.12.0 bug fix and security 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/RHSA-2022:7399