Bug 2061260

Summary: The value of the policyset placement should be filtered space when input cluster label expression
Product: Red Hat Advanced Cluster Management for Kubernetes Reporter: yahliu
Component: ConsoleAssignee: James Talton <jtalton>
Status: CLOSED ERRATA QA Contact: Xiang Yin <xiyin>
Severity: medium Docs Contact: Christopher Dawson <cdawson>
Priority: unspecified    
Version: rhacm-2.5CC: dho
Target Milestone: ---Flags: bot-tracker-sync: rhacm-2.5+
Target Release: rhacm-2.5   
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-06-09 02:09:07 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
cluster selector none

Description yahliu 2022-03-07 07:59:42 UTC
Created attachment 1864305 [details]
cluster selector

Created attachment 1864305 [details]
cluster selector

Description of problem:

The value of the policyset placement should be filtered space(before/after) when input cluster label expression

Version-Release number of selected component (if applicable):
2.5.0-DOWNSTREAM-2022-03-03-12-02-15

How reproducible:
Always

Steps to Reproduce:
1. Login ACM UI and go to policyset creation page 
2. Click "Create policy set" button and step by step to create
3. Select New placement and input "Cluster label expression"
4. The Values can't trigger space(before/after) 

Actual results:
The values can't be filtered the space

Expected results:
The value of the policyset placement should be filtered space(before/after)

Additional info:

From the back-end: 

```
spec:
  clusterSelector:
    matchExpressions:
    - key: feature.open-cluster-management.io/addon-config-policy-controller
      operator: In
      values:
      - ' available'   <<=========== The space still be in the values so impact the clusterselector is invalid and the policyset no status.  
````

Comment 1 yahliu 2022-03-17 06:45:51 UTC
Retest 2.5.0-DOWNSTREAM-2022-03-14-18-18-07 build. The UX design was changed and the new design is working as expected.

Comment 4 errata-xmlrpc 2022-06-09 02:09:07 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 (Important: Red Hat Advanced Cluster Management 2.5 security updates, images, 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:4956