Skip to content

Commit

Permalink
Added support for cluster spec inheritedMetadata property
Browse files Browse the repository at this point in the history
Added inheritedMetadata to cluster.yaml
Added inheritedMetadata to values.yaml with default value with commented example and references
Added inheritedMetadata to values.schema.json

Signed-off-by: Zack Stevens <[email protected]>
  • Loading branch information
codelite7 committed Sep 24, 2024
1 parent 63b1efa commit 6ccba2e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/cluster/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,7 @@ spec:
{{- end }}
{{ include "cluster.bootstrap" . | nindent 2 }}
{{ include "cluster.backup" . | nindent 2 }}
{{- with .Values.cluster.inheritedMetadata }}
inheritedMetadata:
{{- toYaml . | nindent 4 }}
{{ end }}
17 changes: 17 additions & 0 deletions charts/cluster/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,23 @@
"imagePullSecrets": {
"type": "array"
},
"inheritedMetadata": {
"type": "object",
"properties": {
"annotations": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"initdb": {
"type": "object"
},
Expand Down
11 changes: 11 additions & 0 deletions charts/cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,17 @@ cluster:

additionalLabels: {}
annotations: {}
# -- metadata to be inherited by all resources related to a Cluster, annotations and labels defined here will be
# added to all cluster resources if they match the operator's INHERITED_ANNOTATIONS or INHERITED_LABELS
# See: https://cloudnative-pg.io/documentation/current/cloudnative-pg.v1/#postgresql-cnpg-io-v1-EmbeddedObjectMetadata
# See: https://cloudnative-pg.io/documentation/current/operator_conf/#defining-an-operator-config-map
inheritedMetadata: {}
# annotations:
# my.custom: annotation
# another.custom: annotation
# labels:
# my.custom: label
# another.custom: label


backups:
Expand Down

0 comments on commit 6ccba2e

Please sign in to comment.