Skip to content

Commit

Permalink
Add template label to CRD
Browse files Browse the repository at this point in the history
Required for the policy framework to distribute OperatorPolicies.

Signed-off-by: Justin Kulikauskas <jkulikau@redhat.com>
  • Loading branch information
JustinKuli committed Jan 30, 2024
1 parent 4e78199 commit 097b7c8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions deploy/crds/kustomize_operatorpolicy/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ patches:
version: v1
kind: CustomResourceDefinition
name: operatorpolicies.policy.open-cluster-management.io
- path: template-label.json
target:
group: apiextensions.k8s.io
version: v1
kind: CustomResourceDefinition
name: operatorpolicies.policy.open-cluster-management.io
7 changes: 7 additions & 0 deletions deploy/crds/kustomize_operatorpolicy/template-label.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"op":"add",
"path":"/metadata/labels",
"value": {"policy.open-cluster-management.io/policy-type": "template"}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.1
creationTimestamp: null
labels:
policy.open-cluster-management.io/policy-type: template
name: operatorpolicies.policy.open-cluster-management.io
spec:
group: policy.open-cluster-management.io
Expand Down

0 comments on commit 097b7c8

Please sign in to comment.