Skip to content

Commit 07fd11c

Browse files
authored
Merge 25b1393 into 1f41a85
2 parents 1f41a85 + 25b1393 commit 07fd11c

19 files changed

+2264
-7
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
target/**
2+
it/target/**
3+
helpers/certs/out/**
4+
charts/data-space-connector/charts/**

charts/data-space-connector/Chart.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: data-space-connector
33
description: Umbrella Chart for the FIWARE Data Space Connector, combining all essential parts to be used by a participant.
44
type: application
5-
version: 24.2.27
5+
version: 24.5.0
66
dependencies:
77
- name: postgresql
88
condition: postgresql.enabled
@@ -74,3 +74,8 @@ dependencies:
7474
condition: mongodb.enabled
7575
version: 16.5.21
7676
repository: oci://registry-1.docker.io/bitnamicharts
77+
# operators
78+
- name: postgres-operator
79+
condition: postgres-operator.enabled
80+
version: 1.14.0
81+
repository: https://opensource.zalando.com/postgres-operator/charts/postgres-operator
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{{- if .Values.managedPostgres.enabled }}
2+
apiVersion: "acid.zalan.do/v1"
3+
kind: postgresql
4+
metadata:
5+
name: postgres
6+
namespace: {{ $.Release.Namespace | quote }}
7+
labels:
8+
{{- include "dsc.labels" . | nindent 4 }}
9+
spec:
10+
users:
11+
admin: # maintainer
12+
- superuser
13+
- createdb
14+
pap:
15+
- createdb
16+
keycloak:
17+
- createdb
18+
rainbow:
19+
- createdb
20+
scorpio:
21+
- createdb
22+
- superuser # to enable extensions
23+
databases: # db: user
24+
pap: pap
25+
keycloak: keycloak
26+
rainbow: rainbow
27+
ngb: scorpio
28+
patroni:
29+
pg_hba: # Allow connections without ssl as db is not exposed
30+
- local all all trust
31+
- hostssl all all 0.0.0.0/0 md5
32+
- host all all 0.0.0.0/0 md5
33+
preparedDatabases:
34+
ngb:
35+
defaultUsers: true
36+
extensions:
37+
postgis: public
38+
timescaledb: public
39+
{{- toYaml .Values.managedPostgres.config | nindent 2 }}
40+
{{- end }}

charts/data-space-connector/values.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,24 @@ elsi:
435435
# -- password of the key
436436
keyPassword:
437437

438+
## Installation of the postgres-operator - see https://github.com/zalando/postgres-operator
439+
postgres-operator:
440+
# -- should the postgres-operator be installed
441+
enabled: false
442+
443+
## Usage of the postgres-operator - see https://github.com/zalando/postgres-operator
444+
managedPostgres:
445+
# -- should it be enabled? Requires the postgres-operator CRDs to be installed before applying the chart
446+
enabled: false
447+
# -- config as defined in https://github.com/zalando/postgres-operator/blob/master/charts/postgres-operator/crds/postgresqls.yaml
448+
config:
449+
teamId: "dsc"
450+
volume:
451+
size: 1Gi
452+
numberOfInstances: 1
453+
postgresql:
454+
version: "17"
455+
438456
## configuration of the keycloak - see https://github.com/bitnami/charts/tree/main/bitnami/keycloak for details
439457
keycloak:
440458
# -- should it be enabled? set to false if one outside the chart is used.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## Postgres Operator
2+
3+
The postgres-operator can be installed in your cluster as described [here](https://github.com/zalando/postgres-operator/blob/master/docs/quickstart.md#deployment-options). As ```helm template``` does not normally render the necessary CRDs, include the ```--include-crds``` option when updating this operator
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
# Source: postgres-operator/templates/clusterrole-postgres-pod.yaml
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: ClusterRole
5+
metadata:
6+
name: postgres-pod
7+
labels:
8+
app.kubernetes.io/name: postgres-operator
9+
helm.sh/chart: postgres-operator-1.14.0
10+
app.kubernetes.io/managed-by: Helm
11+
app.kubernetes.io/instance: postgres-operator
12+
rules:
13+
# Patroni needs to watch and manage config maps or endpoints
14+
- apiGroups:
15+
- ""
16+
resources:
17+
- endpoints
18+
verbs:
19+
- create
20+
- delete
21+
- deletecollection
22+
- get
23+
- list
24+
- patch
25+
- update
26+
- watch
27+
# Patroni needs to watch pods
28+
- apiGroups:
29+
- ""
30+
resources:
31+
- pods
32+
verbs:
33+
- get
34+
- list
35+
- patch
36+
- update
37+
- watch
38+
# to let Patroni create a headless service
39+
- apiGroups:
40+
- ""
41+
resources:
42+
- services
43+
verbs:
44+
- create
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
---
2+
# Source: postgres-operator/templates/clusterrole.yaml
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: ClusterRole
5+
metadata:
6+
name: postgres-operator
7+
labels:
8+
app.kubernetes.io/name: postgres-operator
9+
helm.sh/chart: postgres-operator-1.14.0
10+
app.kubernetes.io/managed-by: Helm
11+
app.kubernetes.io/instance: postgres-operator
12+
rules:
13+
# all verbs allowed for custom operator resources
14+
- apiGroups:
15+
- acid.zalan.do
16+
resources:
17+
- postgresqls
18+
- postgresqls/status
19+
- operatorconfigurations
20+
verbs:
21+
- create
22+
- delete
23+
- deletecollection
24+
- get
25+
- list
26+
- patch
27+
- update
28+
- watch
29+
# operator only reads PostgresTeams
30+
- apiGroups:
31+
- acid.zalan.do
32+
resources:
33+
- postgresteams
34+
verbs:
35+
- get
36+
- list
37+
- watch
38+
# all verbs allowed for event streams
39+
# to create or get/update CRDs when starting up
40+
- apiGroups:
41+
- apiextensions.k8s.io
42+
resources:
43+
- customresourcedefinitions
44+
verbs:
45+
- get
46+
- create
47+
- patch
48+
- update
49+
# to send events to the CRs
50+
- apiGroups:
51+
- ""
52+
resources:
53+
- events
54+
verbs:
55+
- create
56+
- get
57+
- list
58+
- patch
59+
- update
60+
- watch
61+
# to manage endpoints/configmaps which are also used by Patroni
62+
# to read configuration from ConfigMaps
63+
- apiGroups:
64+
- ""
65+
resources:
66+
- configmaps
67+
verbs:
68+
- get
69+
- apiGroups:
70+
- ""
71+
resources:
72+
- endpoints
73+
verbs:
74+
- create
75+
- delete
76+
- deletecollection
77+
- get
78+
- list
79+
- patch
80+
- update
81+
- watch
82+
# to CRUD secrets for database access
83+
- apiGroups:
84+
- ""
85+
resources:
86+
- secrets
87+
verbs:
88+
- create
89+
- delete
90+
- get
91+
- patch
92+
- update
93+
# to check nodes for node readiness label
94+
- apiGroups:
95+
- ""
96+
resources:
97+
- nodes
98+
verbs:
99+
- get
100+
- list
101+
- watch
102+
# to read or delete existing PVCs. Creation via StatefulSet
103+
- apiGroups:
104+
- ""
105+
resources:
106+
- persistentvolumeclaims
107+
verbs:
108+
- delete
109+
- get
110+
- list
111+
- patch
112+
- update
113+
# to read existing PVs. Creation should be done via dynamic provisioning
114+
- apiGroups:
115+
- ""
116+
resources:
117+
- persistentvolumes
118+
verbs:
119+
- get
120+
- list
121+
# to watch Spilo pods and do rolling updates. Creation via StatefulSet
122+
- apiGroups:
123+
- ""
124+
resources:
125+
- pods
126+
verbs:
127+
- delete
128+
- get
129+
- list
130+
- patch
131+
- update
132+
- watch
133+
# to resize the filesystem in Spilo pods when increasing volume size
134+
- apiGroups:
135+
- ""
136+
resources:
137+
- pods/exec
138+
verbs:
139+
- create
140+
# to CRUD services to point to Postgres cluster instances
141+
- apiGroups:
142+
- ""
143+
resources:
144+
- services
145+
verbs:
146+
- create
147+
- delete
148+
- get
149+
- patch
150+
- update
151+
# to CRUD the StatefulSet which controls the Postgres cluster instances
152+
- apiGroups:
153+
- apps
154+
resources:
155+
- statefulsets
156+
- deployments
157+
verbs:
158+
- create
159+
- delete
160+
- get
161+
- list
162+
- patch
163+
- update
164+
# to CRUD cron jobs for logical backups
165+
- apiGroups:
166+
- batch
167+
resources:
168+
- cronjobs
169+
verbs:
170+
- create
171+
- delete
172+
- get
173+
- list
174+
- patch
175+
- update
176+
# to get namespaces operator resources can run in
177+
- apiGroups:
178+
- ""
179+
resources:
180+
- namespaces
181+
verbs:
182+
- get
183+
# to define PDBs. Update happens via delete/create
184+
- apiGroups:
185+
- policy
186+
resources:
187+
- poddisruptionbudgets
188+
verbs:
189+
- create
190+
- delete
191+
- get
192+
# to create ServiceAccounts in each namespace the operator watches
193+
- apiGroups:
194+
- ""
195+
resources:
196+
- serviceaccounts
197+
verbs:
198+
- get
199+
- create
200+
# to create role bindings to the postgres-pod service account
201+
- apiGroups:
202+
- rbac.authorization.k8s.io
203+
resources:
204+
- rolebindings
205+
verbs:
206+
- get
207+
- create
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
# Source: postgres-operator/templates/clusterrolebinding.yaml
3+
apiVersion: rbac.authorization.k8s.io/v1
4+
kind: ClusterRoleBinding
5+
metadata:
6+
name: postgres-operator
7+
labels:
8+
app.kubernetes.io/name: postgres-operator
9+
helm.sh/chart: postgres-operator-1.14.0
10+
app.kubernetes.io/managed-by: Helm
11+
app.kubernetes.io/instance: postgres-operator
12+
roleRef:
13+
apiGroup: rbac.authorization.k8s.io
14+
kind: ClusterRole
15+
name: postgres-operator
16+
subjects:
17+
- kind: ServiceAccount
18+
name: postgres-operator
19+
namespace: postgres-operator

0 commit comments

Comments
 (0)