Skip to content

Commit

Permalink
Policy configmap creation was blocked by template function
Browse files Browse the repository at this point in the history
The configmap can't be created due to a template not resolving and the
template won't resolve because the configmap didn't exist.  I likely
had the configmap laying around while testing and didn't do a clean run

Issues:
- https://issues.redhat.com/browse/ACM-11848

Signed-off-by: Gus Parvin <gparvin@redhat.com>
  • Loading branch information
gparvin committed May 23, 2024
1 parent a912880 commit a1ef25f
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions community/CM-Configuration-Management/policy-rosa-autoimport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ spec:
apiVersion: policy.open-cluster-management.io/v1
kind: ConfigurationPolicy
metadata:
name: policy-rosa-autoimport
name: rosa-autoimport-config
spec:
remediationAction: inform
severity: low
object-templates-raw: |
object-templates:
- complianceType: musthave
objectDefinition:
apiVersion: v1
Expand All @@ -33,6 +31,17 @@ spec:
namespace: open-cluster-management-global-set
data:
rosa-filter: ""
remediationAction: enforce
severity: low
- objectDefinition:
apiVersion: policy.open-cluster-management.io/v1
kind: ConfigurationPolicy
metadata:
name: policy-rosa-autoimport
spec:
remediationAction: enforce
severity: low
object-templates-raw: |
{{- /* find the ROSA DiscoveredClusters */ -}}
{{- range $dc := (lookup "discovery.open-cluster-management.io/v1" "DiscoveredCluster" "" "").items }}
{{- /* Check for the flag that indicates the import should be skipped */ -}}
Expand Down Expand Up @@ -65,7 +74,7 @@ spec:
metadata:
name: policy-rosa-managedcluster-status
spec:
remediationAction: inform
remediationAction: enforce
severity: low
object-templates-raw: |
{{- /* Use the same DiscoveredCluster list to check ManagedCluster status */ -}}
Expand Down

0 comments on commit a1ef25f

Please sign in to comment.