-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The Subscription and OperatorGroup fields can now utilize templates. The resolver uses the DynamicWatcher already used by the controller, so no additional plumbing was needed for new watches or in order to share a cache. Refs: - https://issues.redhat.com/browse/ACM-10858 Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
- Loading branch information
1 parent
cfe47ca
commit 45275dd
Showing
7 changed files
with
197 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
test/resources/case38_operator_install/operator-policy-with-templates.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: policy.open-cluster-management.io/v1beta1 | ||
kind: OperatorPolicy | ||
metadata: | ||
name: oppol-with-templates | ||
annotations: | ||
policy.open-cluster-management.io/parent-policy-compliance-db-id: "124" | ||
policy.open-cluster-management.io/policy-compliance-db-id: "64" | ||
ownerReferences: | ||
- apiVersion: policy.open-cluster-management.io/v1 | ||
kind: Policy | ||
name: parent-policy | ||
uid: 12345678-90ab-cdef-1234-567890abcdef # must be replaced before creation | ||
spec: | ||
remediationAction: inform | ||
severity: medium | ||
complianceType: musthave | ||
operatorGroup: # optional | ||
name: scoped-operator-group | ||
namespace: operator-policy-testns | ||
targetNamespaces: '{{ (fromConfigMap "operator-policy-testns" "op-config" "namespaces") | toLiteral }}' | ||
subscription: | ||
channel: '{{ (lookup "v1" "ConfigMap" "operator-policy-testns" "op-config").data.channel }}' | ||
name: project-quay | ||
namespace: operator-policy-testns | ||
installPlanApproval: Automatic | ||
source: operatorhubio-catalog | ||
sourceNamespace: olm | ||
startingCSV: quay-operator.v3.8.1 |
7 changes: 7 additions & 0 deletions
7
test/resources/case38_operator_install/template-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: op-config | ||
data: | ||
channel: "fakechannel" | ||
namespaces: '["foo", "bar", "operator-policy-testns"]' |