Bug 2104961

Summary: Subscription UI does not allow binding to label with empty value
Product: Red Hat Advanced Cluster Management for Kubernetes Reporter: Ian Miller <imiller>
Component: App LifecycleAssignee: Xiangjing Li <xiangli>
Status: CLOSED ERRATA QA Contact: Almen Ng <almng>
Severity: medium Docs Contact: bswope <bswope>
Priority: unspecified    
Version: rhacm-2.5CC: iamin, magchen
Target Milestone: ---Flags: bot-tracker-sync: rhacm-2.5.z+
bot-tracker-sync: rhacm-2.6+
Target Release: rhacm-2.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-13 20:06:28 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:

Description Ian Miller 2022-07-07 15:06:39 UTC
Description of the problem: When creating a subscription via the Web UI/console the "Deploy application resources only on clusters matching specified labels" option allows the user to specify a label=value for binding to clusters. When the desired label on the clusters has the empty string for a value there is no way to specify this via the UI. The "value" field is a required field and the subscription cannot be created without it. For example, if I have a label on my ManagedCluster of:
app1: ""

Placing "" for the label value in the UI results in (copied from the YAML view on the same page):
spec:
  clusterSelector:
    matchLabels:
      'app1': '""'

Release version: 2.5.1

Operator snapshot version:

OCP version: 4.10.20

Browser Info: Chrome

Steps to reproduce:
1. Create application
2. Select by label
3. Attempt to leave label value empty

Actual results: Application does not create (label value required)

Expected results: Application can be created with label value of empty string

Additional info:

Comment 2 Ishmam Amin 2022-08-23 13:30:07 UTC
Expected Result is reached in ROSA environment

Comment 7 errata-xmlrpc 2022-09-13 20:06:28 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 (Critical: Red Hat Advanced Cluster Management 2.5.2 security fixes and bug fixes), 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:6507