-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
1.12.2
-
5
-
False
-
-
False
-
-
-
GitOps Crimson - Sprint 3262
-
Moderate
Description of problem:
Customer is using RHACM and is managing Policies using OpenShift GitOps. Customer is creating a "PolicyGenerator" object which in turn generates "Placement" objects. These "Placement" objects have multiple label selectors (".spec.predicates[].requiredClusterSelector.labelSelector.matchExpressions[]" field).
The expectation would be that the order of these label selectors is not a difference. However Argo CD shows a difference: ArgoCD-Placements-Diff.png
Prerequisites (if any, like setup, operators/versions):
Red Hat OpenShift GitOps 1.12.2
Steps to Reproduce
- Install cluster with Red Hat OpenShift GitOps 1.12.2
- On a cluster with RHACM, create a PolicyGenerator that has multiple label selectors (3 in this case):
apiVersion: policy.open-cluster-management.io/v1 kind: PolicyGenerator metadata: name: cluster-application-policies placementBindingDefaults: name: binding-policy policyDefaults: namespace: policies-ca remediationAction: inform consolidateManifests: false copyPolicyMetadata: false placement: labelSelector: environment: none ######### policySets: - name: nonprod-example-onprem placement: labelSelector: name: "test-example-onprem-nonprod" purpose: "example" cloud: "VSphere"
- This will result in the following Placement to be created:
apiVersion: cluster.open-cluster-management.io/v1beta1
kind: Placement
metadata:
[..]
spec:
predicates:
- requiredClusterSelector:
labelSelector:
matchExpressions:
- key: cloud
operator: In
values:
- VSphere
- key: name
operator: In
values:
- test-example-onprem-nonprod
- key: purpose
operator: In
values:
- example
Actual results:
Every time `kustomize` runs, the order of the label selectors in the generated "Placements" is different. This results in a diff.
Expected results:
Argo CD does not have a diff for the order of the label selectors.
Reproducibility (Always/Intermittent/Only Once):
Always on customer side
Additional info (Such as Logs, Screenshots, etc):
- Screenshot showing the issue: ArgoCD-Placements-Diff.png
- is caused by
-
ACM-11811 PolicyGenerator does not order Placement Label Selectors consistently
-
- Closed
-