Skip to content

Commit

Permalink
add hardcoded disaster recovery labels to CRDs (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya authored May 1, 2024
1 parent 74d07b2 commit d586a18
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
replicated.com/disaster-recovery: infra
replicated.com/disaster-recovery-chart: embedded-cluster-operator
name: configs.embeddedcluster.replicated.com
spec:
group: embeddedcluster.replicated.com
Expand Down Expand Up @@ -220,6 +223,9 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
replicated.com/disaster-recovery: infra
replicated.com/disaster-recovery-chart: embedded-cluster-operator
name: installations.embeddedcluster.replicated.com
spec:
group: embeddedcluster.replicated.com
Expand Down
2 changes: 2 additions & 0 deletions config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ resources:
#+kubebuilder:scaffold:crdkustomizeresource

patchesStrategicMerge:
- patches/labels_in_installations.yaml
- patches/labels_in_configs.yaml
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix.
# patches here are for enabling the conversion webhook for each CRD
#- patches/webhook_in_installations.yaml
Expand Down
8 changes: 8 additions & 0 deletions config/crd/patches/labels_in_configs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# The following patch adds backup and restore labels to the CRD
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
replicated.com/disaster-recovery: "infra"
replicated.com/disaster-recovery-chart: "embedded-cluster-operator"
name: configs.embeddedcluster.replicated.com
8 changes: 8 additions & 0 deletions config/crd/patches/labels_in_installations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# The following patch adds backup and restore labels to the CRD
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
replicated.com/disaster-recovery: "infra"
replicated.com/disaster-recovery-chart: "embedded-cluster-operator"
name: installations.embeddedcluster.replicated.com

0 comments on commit d586a18

Please sign in to comment.