Skip to content

Commit

Permalink
Merge pull request #1 from MatthewsREIS/metadata
Browse files Browse the repository at this point in the history
Added support for cluster spec inheritedMetadata property
  • Loading branch information
codelite7 authored Sep 24, 2024
2 parents 0bfb297 + 2eab955 commit 23d082c
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 23d082c

Please sign in to comment.