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

Signed-off-by: Gus Parvin <[email protected]>
  • Loading branch information
gparvin authored and openshift-merge-bot[bot] committed May 23, 2024
1 parent 88e602a commit 050142d
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 050142d

Please sign in to comment.