Skip to content

Commit 84748ed

Browse files
svcAPLBotAni1357
andauthored
chore(chart-deps): update cloudnative-pg to version 0.23.0 (#1880)
Co-authored-by: Ani Argjiri <[email protected]>
1 parent 75fc895 commit 84748ed

14 files changed

+1498
-334
lines changed

chart/chart-index/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
version: v1.16.2
1212
repository: https://charts.jetstack.io
1313
- name: cloudnative-pg
14-
version: 0.22.1
14+
version: 0.23.0
1515
repository: https://cloudnative-pg.github.io/charts
1616
- name: external-dns
1717
version: 6.20.4

charts/cloudnative-pg/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apiVersion: v2
2-
appVersion: 1.24.1
2+
appVersion: 1.25.0
33
dependencies:
44
- alias: monitoring
55
condition: monitoring.grafanaDashboard.create
@@ -22,4 +22,4 @@ name: cloudnative-pg
2222
sources:
2323
- https://github.com/cloudnative-pg/charts
2424
type: application
25-
version: 0.22.1
25+
version: 0.23.0

charts/cloudnative-pg/README.md

+6-2
Large diffs are not rendered by default.
+5-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11

22
CloudNativePG operator should be installed in namespace "{{ .Release.Namespace }}".
3-
You can now create a PostgreSQL cluster with 3 nodes in the current namespace as follows:
3+
You can now create a PostgreSQL cluster with 3 nodes as follows:
44

55
cat <<EOF | kubectl apply -f -
66
# Example of PostgreSQL cluster
77
apiVersion: postgresql.cnpg.io/v1
88
kind: Cluster
99
metadata:
1010
name: cluster-example
11+
{{if not .Values.config.clusterWide -}}
12+
namespace: {{ .Release.Namespace }}
13+
{{- end }}
1114
spec:
1215
instances: 3
1316
storage:
1417
size: 1Gi
1518
EOF
1619

17-
kubectl get cluster
20+
kubectl get -A cluster
1821

charts/cloudnative-pg/templates/_helpers.tpl

+239
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
{{/*
2+
Allow the release namespace to be overridden for multi-namespace deployments in combined charts
3+
*/}}
4+
{{- define "cloudnative-pg.namespace" -}}
5+
{{- if .Values.namespaceOverride -}}
6+
{{- .Values.namespaceOverride -}}
7+
{{- else -}}
8+
{{- .Release.Namespace -}}
9+
{{- end -}}
10+
{{- end -}}
11+
112
{{/*
213
Expand the name of the chart.
314
*/}}
@@ -60,3 +71,231 @@ Create the name of the service account to use
6071
{{- default "default" .Values.serviceAccount.name }}
6172
{{- end }}
6273
{{- end }}
74+
75+
{{/*
76+
Define the common set of rules that can be applied either with
77+
namespace scope or clusterwide
78+
*/}}
79+
{{- define "cloudnative-pg.commonRules" }}
80+
- apiGroups:
81+
- ""
82+
resources:
83+
- configmaps
84+
- secrets
85+
- services
86+
verbs:
87+
- create
88+
- delete
89+
- get
90+
- list
91+
- patch
92+
- update
93+
- watch
94+
- apiGroups:
95+
- ""
96+
resources:
97+
- configmaps/status
98+
- secrets/status
99+
verbs:
100+
- get
101+
- patch
102+
- update
103+
- apiGroups:
104+
- ""
105+
resources:
106+
- events
107+
verbs:
108+
- create
109+
- patch
110+
- apiGroups:
111+
- ""
112+
resources:
113+
- persistentvolumeclaims
114+
- pods
115+
- pods/exec
116+
verbs:
117+
- create
118+
- delete
119+
- get
120+
- list
121+
- patch
122+
- watch
123+
- apiGroups:
124+
- ""
125+
resources:
126+
- pods/status
127+
verbs:
128+
- get
129+
- apiGroups:
130+
- ""
131+
resources:
132+
- serviceaccounts
133+
verbs:
134+
- create
135+
- get
136+
- list
137+
- patch
138+
- update
139+
- watch
140+
- apiGroups:
141+
- apps
142+
resources:
143+
- deployments
144+
verbs:
145+
- create
146+
- delete
147+
- get
148+
- list
149+
- patch
150+
- update
151+
- watch
152+
- apiGroups:
153+
- batch
154+
resources:
155+
- jobs
156+
verbs:
157+
- create
158+
- delete
159+
- get
160+
- list
161+
- patch
162+
- watch
163+
- apiGroups:
164+
- coordination.k8s.io
165+
resources:
166+
- leases
167+
verbs:
168+
- create
169+
- get
170+
- update
171+
- apiGroups:
172+
- monitoring.coreos.com
173+
resources:
174+
- podmonitors
175+
verbs:
176+
- create
177+
- delete
178+
- get
179+
- list
180+
- patch
181+
- watch
182+
- apiGroups:
183+
- policy
184+
resources:
185+
- poddisruptionbudgets
186+
verbs:
187+
- create
188+
- delete
189+
- get
190+
- list
191+
- patch
192+
- update
193+
- watch
194+
- apiGroups:
195+
- postgresql.cnpg.io
196+
resources:
197+
- backups
198+
- clusters
199+
- databases
200+
- poolers
201+
- publications
202+
- scheduledbackups
203+
- subscriptions
204+
verbs:
205+
- create
206+
- delete
207+
- get
208+
- list
209+
- patch
210+
- update
211+
- watch
212+
- apiGroups:
213+
- postgresql.cnpg.io
214+
resources:
215+
- backups/status
216+
- databases/status
217+
- publications/status
218+
- scheduledbackups/status
219+
- subscriptions/status
220+
verbs:
221+
- get
222+
- patch
223+
- update
224+
- apiGroups:
225+
- postgresql.cnpg.io
226+
resources:
227+
- imagecatalogs
228+
verbs:
229+
- get
230+
- list
231+
- watch
232+
- apiGroups:
233+
- postgresql.cnpg.io
234+
resources:
235+
- clusters/finalizers
236+
- poolers/finalizers
237+
verbs:
238+
- update
239+
- apiGroups:
240+
- postgresql.cnpg.io
241+
resources:
242+
- clusters/status
243+
- poolers/status
244+
verbs:
245+
- get
246+
- patch
247+
- update
248+
- watch
249+
- apiGroups:
250+
- rbac.authorization.k8s.io
251+
resources:
252+
- rolebindings
253+
- roles
254+
verbs:
255+
- create
256+
- get
257+
- list
258+
- patch
259+
- update
260+
- watch
261+
- apiGroups:
262+
- snapshot.storage.k8s.io
263+
resources:
264+
- volumesnapshots
265+
verbs:
266+
- create
267+
- get
268+
- list
269+
- patch
270+
- watch
271+
{{- end }}
272+
273+
{{/*
274+
Define the set of rules that must be applied clusterwide
275+
*/}}
276+
{{- define "cloudnative-pg.clusterwideRules" }}
277+
- apiGroups:
278+
- ""
279+
resources:
280+
- nodes
281+
verbs:
282+
- get
283+
- list
284+
- watch
285+
- apiGroups:
286+
- admissionregistration.k8s.io
287+
resources:
288+
- mutatingwebhookconfigurations
289+
- validatingwebhookconfigurations
290+
verbs:
291+
- get
292+
- patch
293+
- apiGroups:
294+
- postgresql.cnpg.io
295+
resources:
296+
- clusterimagecatalogs
297+
verbs:
298+
- get
299+
- list
300+
- watch
301+
{{- end }}

charts/cloudnative-pg/templates/config.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,21 @@ apiVersion: v1
1919
kind: ConfigMap
2020
metadata:
2121
name: {{ .Values.config.name }}
22+
namespace: {{ include "cloudnative-pg.namespace" . }}
2223
labels:
2324
{{- include "cloudnative-pg.labels" . | nindent 4 }}
2425
{{- with .Values.commonAnnotations }}
2526
annotations:
2627
{{- toYaml . | nindent 4 }}
2728
{{- end }}
2829
data:
30+
{{- if .Values.config.clusterWide -}}
2931
{{- toYaml .Values.config.data | nindent 2 }}
32+
{{- else -}}
33+
{{- $watchNamespaceMap := dict "WATCH_NAMESPACE" .Release.Namespace -}}
34+
{{- $fullConfiguration := merge .Values.config.data $watchNamespaceMap -}}
35+
{{- toYaml $fullConfiguration | nindent 2 }}
36+
{{- end -}}
3037
{{- else }}
3138
apiVersion: v1
3239
kind: Secret
@@ -40,6 +47,12 @@ metadata:
4047
{{- toYaml . | nindent 4 }}
4148
{{- end }}
4249
stringData:
50+
{{- if .Values.config.clusterWide -}}
4351
{{- toYaml .Values.config.data | nindent 2 }}
52+
{{- else -}}
53+
{{- $watchNamespaceMap := dict "WATCH_NAMESPACE" .Release.Namespace -}}
54+
{{- $fullConfiguration := merge .Values.config.data $watchNamespaceMap -}}
55+
{{- toYaml $fullConfiguration | nindent 2 }}
56+
{{- end -}}
4457
{{- end }}
4558
{{- end }}

0 commit comments

Comments
 (0)