Skip to content

Commit d4f0ff1

Browse files
committed
Add name and version Labels to CRD during generation
Adds the name and version labels, i.e. app.kubernetes.io/name: pgo app.kubernetes.io/version: 5.1.2 to the PostgresCluster CRD generation process and update the current CRD to match. This will align all of our CRDs across install method.
1 parent 956d35d commit d4f0ff1

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

build/crd/kustomization.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,14 @@ patchesJson6902:
2929
kind: CustomResourceDefinition
3030
name: postgresclusters.postgres-operator.crunchydata.com
3131
path: validation.yaml
32+
- target:
33+
group: apiextensions.k8s.io
34+
version: v1
35+
kind: CustomResourceDefinition
36+
name: postgresclusters.postgres-operator.crunchydata.com
37+
patch: |-
38+
- op: add
39+
path: "/metadata/labels"
40+
value:
41+
app.kubernetes.io/name: pgo
42+
app.kubernetes.io/version: 5.1.2

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ metadata:
44
annotations:
55
controller-gen.kubebuilder.io/version: v0.8.0
66
creationTimestamp: null
7+
labels:
8+
app.kubernetes.io/name: pgo
9+
app.kubernetes.io/version: 5.1.2
710
name: postgresclusters.postgres-operator.crunchydata.com
811
spec:
912
group: postgres-operator.crunchydata.com

0 commit comments

Comments
 (0)