From 705d682b1fa863893b4b3967cd1c70cb31186fa1 Mon Sep 17 00:00:00 2001 From: Sebastian Pohl Date: Mon, 20 Jan 2025 06:10:28 +0100 Subject: [PATCH] feat(cluster): Add support for passing inheritedMetadata to Cluster spec Signed-off-by: Sebastian Pohl --- charts/cluster/templates/cluster.yaml | 3 +++ ..._default_configuration_cluster-assert.yaml | 3 +++ .../01-non_default_configuration_cluster.yaml | 5 +++++ charts/cluster/values.schema.json | Bin 20072 -> 42004 bytes charts/cluster/values.yaml | 10 +++++++++- 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/charts/cluster/templates/cluster.yaml b/charts/cluster/templates/cluster.yaml index 715cf0094..4d15355c5 100644 --- a/charts/cluster/templates/cluster.yaml +++ b/charts/cluster/templates/cluster.yaml @@ -45,6 +45,9 @@ spec: {{- if .Values.cluster.priorityClassName }} priorityClassName: {{ .Values.cluster.priorityClassName }} {{- end }} + inheritedMetadata: + {{- toYaml . | nindent 4 }} + {{ end }} primaryUpdateMethod: {{ .Values.cluster.primaryUpdateMethod }} primaryUpdateStrategy: {{ .Values.cluster.primaryUpdateStrategy }} diff --git a/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml b/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml index b8ff318d5..abcffcfdf 100644 --- a/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml +++ b/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster-assert.yaml @@ -12,6 +12,9 @@ spec: postgresUID: 1001 postgresGID: 1002 instances: 2 + inheritedMetadata: + labels: + azure.workload.identity/use: "true" postgresql: parameters: max_connections: "42" diff --git a/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster.yaml b/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster.yaml index 68ccba903..c5c643cce 100644 --- a/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster.yaml +++ b/charts/cluster/test/postgresql-cluster-configuration/01-non_default_configuration_cluster.yaml @@ -80,6 +80,11 @@ cluster: foo: bar annotations: foo: bar + inheritedMetadata: + annotations: + super.annotation: "super-annotation" + labels: + azure.workload.identity/use: "true" serviceAccountTemplate: metadata: annotations: diff --git a/charts/cluster/values.schema.json b/charts/cluster/values.schema.json index cb181a7378c1edee2deed34ab725cd5c7669e163..eb2bd2a73226b09cb8176b2268e709280704a44a 100644 GIT binary patch literal 42004 zcmeHQOLN;c5XQMP{SO_s$370d^_DnIC(}IKI5}r*S#ch=9&a6AbGi3G6k2NvLe|9)}bx^LWfH-Clu!L8iPy>WAQ;f`J5exqLsYOm?1b(se`?&C4 z8ob99X*Jm9;c~*J$J}JMiOpQiD@%F zC7D}zoUh#hc@jC=MbCR%Y|Q-AbnPaNLyQWqm*e*|TOsGFA@}8h^0~tM2xIh# zAW`FtJwFg+=af6?iXYQ8o#d*1tpT)YRX4qK&)s7q?Uat2SjjBN{vxtJ^HyM-y7ZVV z#udSb7#kWj*y#iEI$-xeH+%=~j>}?7zLRaOYt!i``;4Whe6Aq-eob&ACPUVDs4-ct zCw}H3`<-Zr918MbmtOyZrrki>uiYGeCM?B|kJH$(yw83ZI015vs3M);Eu=So#?V3V z@q!Kl_Z|`t2VIrtAKmTzSMFCMEDy~C$J!QhvdCkMHG?;9+fct+@`z%_C*+%j)r=es zp>3>OBbsc4#8I^!s~xM);B(8W8Y2w6o~grRGkKCL|0J)Dwf8**3o z$$L+$M9{n?W%!sVf%Pg_;WY2GAP$91zi1gxXiMJ4Ml!_gC807TuF`{_+;v5)QPSa= z`$*ml#&}NuzxJQt=fI{~$S%)DW2wCibKkj|ik~lhEP|EmMP`PTdy>~-Lv5J_W5|aM zvD8WX!{I5KoM{mkx24@3D{BR5)zVJp;8}B08@+0;Pf^nZFJQdce@p$Kso7rt_sicO ziSp-JHd5nac$|%jHPmrV6#}duQ?8oA7TliZ-|~Fn-5k4rC}Ra*89WPbJdbm^Prhn6 zhg&bO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