Skip to content

Commit 36ba8ed

Browse files
author
matthias
committed
update to 1.9 (cpo 0.5.0)
1 parent 020c5e3 commit 36ba8ed

File tree

4 files changed

+215
-35
lines changed

4 files changed

+215
-35
lines changed

setup/helm/operator/crds/operatorconfiguration.crd.yaml

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ spec:
6666
type: string
6767
docker_image:
6868
type: string
69-
default: "registry.opensource.zalan.do/acid/spilo-14:2.1-p7"
69+
default: "ghcr.io/zalando/spilo-15:2.1-p9"
7070
enable_crd_registration:
7171
type: boolean
7272
default: true
@@ -165,10 +165,10 @@ spec:
165165
type: string
166166
minimal_major_version:
167167
type: string
168-
default: "9.6"
168+
default: "11"
169169
target_major_version:
170170
type: string
171-
default: "14"
171+
default: "15"
172172
kubernetes:
173173
type: object
174174
properties:
@@ -276,6 +276,9 @@ spec:
276276
pdb_name_format:
277277
type: string
278278
default: "postgres-{cluster}-pdb"
279+
pod_antiaffinity_preferred_during_scheduling:
280+
type: boolean
281+
default: false
279282
pod_antiaffinity_topology_key:
280283
type: string
281284
default: "kubernetes.io/hostname"
@@ -309,6 +312,9 @@ spec:
309312
secret_name_template:
310313
type: string
311314
default: "{username}.{cluster}.credentials.{tprkind}.{tprgroup}"
315+
share_pgsocket_with_sidecars:
316+
type: boolean
317+
default: false
312318
spilo_allow_privilege_escalation:
313319
type: boolean
314320
default: true
@@ -426,9 +432,15 @@ spec:
426432
master_dns_name_format:
427433
type: string
428434
default: "{cluster}.{namespace}.{hostedzone}"
435+
master_legacy_dns_name_format:
436+
type: string
437+
default: "{cluster}.{team}.{hostedzone}"
429438
replica_dns_name_format:
430439
type: string
431440
default: "{cluster}-repl.{namespace}.{hostedzone}"
441+
replica_legacy_dns_name_format:
442+
type: string
443+
default: "{cluster}-repl.{team}.{hostedzone}"
432444
aws_or_gcp:
433445
type: object
434446
properties:
@@ -461,16 +473,38 @@ spec:
461473
logical_backup:
462474
type: object
463475
properties:
476+
logical_backup_azure_storage_account_name:
477+
type: string
478+
logical_backup_azure_storage_container:
479+
type: string
480+
logical_backup_azure_storage_account_key:
481+
type: string
482+
logical_backup_cpu_limit:
483+
type: string
484+
pattern: '^(\d+m|\d+(\.\d{1,3})?)$'
485+
logical_backup_cpu_request:
486+
type: string
487+
pattern: '^(\d+m|\d+(\.\d{1,3})?)$'
464488
logical_backup_docker_image:
465489
type: string
466-
default: "registry.opensource.zalan.do/acid/logical-backup:v1.8.2"
490+
default: "registry.opensource.zalan.do/acid/logical-backup:v1.9.0"
467491
logical_backup_google_application_credentials:
468492
type: string
469493
logical_backup_job_prefix:
470494
type: string
471495
default: "logical-backup-"
496+
logical_backup_memory_limit:
497+
type: string
498+
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
499+
logical_backup_memory_request:
500+
type: string
501+
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
472502
logical_backup_provider:
473503
type: string
504+
enum:
505+
- "az"
506+
- "gcs"
507+
- "s3"
474508
default: "s3"
475509
logical_backup_s3_access_key_id:
476510
type: string
@@ -601,7 +635,7 @@ spec:
601635
default: "pooler"
602636
connection_pooler_image:
603637
type: string
604-
default: "registry.opensource.zalan.do/acid/pgbouncer:master-24"
638+
default: "registry.opensource.zalan.do/acid/pgbouncer:master-26"
605639
connection_pooler_max_db_connections:
606640
type: integer
607641
default: 60
@@ -631,6 +665,12 @@ spec:
631665
type: string
632666
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
633667
default: "100Mi"
668+
patroni:
669+
type: object
670+
properties:
671+
failsafe_mode:
672+
type: boolean
673+
default: false
634674
status:
635675
type: object
636676
additionalProperties:

setup/helm/operator/crds/postgresql.crd.yaml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,121 @@ spec:
213213
items:
214214
type: object
215215
x-kubernetes-preserve-unknown-fields: true
216+
topologySpreadConstraints:
217+
description: 'Topology spread constraints of a Dedicated
218+
repo host pod. Changing this value causes the repo host
219+
to restart. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/'
220+
items:
221+
description: TopologySpreadConstraint specifies how
222+
to spread matching pods among the given topology.
223+
properties:
224+
labelSelector:
225+
description: LabelSelector is used to find matching
226+
pods. Pods that match this label selector are
227+
counted to determine the number of pods in their
228+
corresponding topology domain.
229+
properties:
230+
matchExpressions:
231+
description: matchExpressions is a list of label
232+
selector requirements. The requirements are
233+
ANDed.
234+
items:
235+
description: A label selector requirement
236+
is a selector that contains values, a key,
237+
and an operator that relates the key and
238+
values.
239+
properties:
240+
key:
241+
description: key is the label key that
242+
the selector applies to.
243+
type: string
244+
operator:
245+
description: operator represents a key's
246+
relationship to a set of values. Valid
247+
operators are In, NotIn, Exists and
248+
DoesNotExist.
249+
type: string
250+
values:
251+
description: values is an array of string
252+
values. If the operator is In or NotIn,
253+
the values array must be non-empty.
254+
If the operator is Exists or DoesNotExist,
255+
the values array must be empty. This
256+
array is replaced during a strategic
257+
merge patch.
258+
items:
259+
type: string
260+
type: array
261+
required:
262+
- key
263+
- operator
264+
type: object
265+
type: array
266+
matchLabels:
267+
additionalProperties:
268+
type: string
269+
description: matchLabels is a map of {key,value}
270+
pairs. A single {key,value} in the matchLabels
271+
map is equivalent to an element of matchExpressions,
272+
whose key field is "key", the operator is
273+
"In", and the values array contains only "value".
274+
The requirements are ANDed.
275+
type: object
276+
type: object
277+
maxSkew:
278+
description: 'MaxSkew describes the degree to which
279+
pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`,
280+
it is the maximum permitted difference between
281+
the number of matching pods in the target topology
282+
and the global minimum. For example, in a 3-zone
283+
cluster, MaxSkew is set to 1, and pods with the
284+
same labelSelector spread as 1/1/0: | zone1 |
285+
zone2 | zone3 | | P | P | | - if
286+
MaxSkew is 1, incoming pod can only be scheduled
287+
to zone3 to become 1/1/1; scheduling it onto zone1(zone2)
288+
would make the ActualSkew(2-0) on zone1(zone2)
289+
violate MaxSkew(1). - if MaxSkew is 2, incoming
290+
pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`,
291+
it is used to give higher precedence to topologies
292+
that satisfy it. It''s a required field. Default
293+
value is 1 and 0 is not allowed.'
294+
format: int32
295+
type: integer
296+
topologyKey:
297+
description: TopologyKey is the key of node labels.
298+
Nodes that have a label with this key and identical
299+
values are considered to be in the same topology.
300+
We consider each <key, value> as a "bucket", and
301+
try to put balanced number of pods into each bucket.
302+
It's a required field.
303+
type: string
304+
whenUnsatisfiable:
305+
description: 'WhenUnsatisfiable indicates how to
306+
deal with a pod if it doesn''t satisfy the spread
307+
constraint. - DoNotSchedule (default) tells the
308+
scheduler not to schedule it. - ScheduleAnyway
309+
tells the scheduler to schedule the pod in any
310+
location, but giving higher precedence to topologies
311+
that would help reduce the skew. A constraint
312+
is considered "Unsatisfiable" for an incoming
313+
pod if and only if every possible node assigment
314+
for that pod would violate "MaxSkew" on some topology.
315+
For example, in a 3-zone cluster, MaxSkew is set
316+
to 1, and pods with the same labelSelector spread
317+
as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P |
318+
If WhenUnsatisfiable is set to DoNotSchedule,
319+
incoming pod can only be scheduled to zone2(zone3)
320+
to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3)
321+
satisfies MaxSkew(1). In other words, the cluster
322+
can still be imbalanced, but scheduler won''t
323+
make it *more* imbalanced. It''s a required field.'
324+
type: string
325+
required:
326+
- maxSkew
327+
- topologyKey
328+
- whenUnsatisfiable
329+
type: object
330+
type: array
216331
logicalBackupSchedule:
217332
type: string
218333
pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$'
@@ -221,6 +336,10 @@ spec:
221336
items:
222337
type: string
223338
pattern: '^\ *((Mon|Tue|Wed|Thu|Fri|Sat|Sun):(2[0-3]|[01]?\d):([0-5]?\d)|(2[0-3]|[01]?\d):([0-5]?\d))-((Mon|Tue|Wed|Thu|Fri|Sat|Sun):(2[0-3]|[01]?\d):([0-5]?\d)|(2[0-3]|[01]?\d):([0-5]?\d))\ *$'
339+
masterServiceAnnotations:
340+
type: object
341+
additionalProperties:
342+
type: string
224343
nodeAffinity:
225344
type: object
226345
properties:
@@ -318,6 +437,8 @@ spec:
318437
patroni:
319438
type: object
320439
properties:
440+
failsafe_mode:
441+
type: boolean
321442
initdb:
322443
type: object
323444
additionalProperties:
@@ -398,6 +519,10 @@ spec:
398519
replicaLoadBalancer:
399520
type: boolean
400521
description: deprecated
522+
replicaServiceAnnotations:
523+
type: object
524+
additionalProperties:
525+
type: string
401526
resources:
402527
type: object
403528
properties:
@@ -708,6 +833,27 @@ spec:
708833
type: array
709834
items:
710835
type: string
836+
resources:
837+
type: object
838+
properties:
839+
limits:
840+
type: object
841+
properties:
842+
cpu:
843+
type: string
844+
pattern: '^(\d+m|\d+(\.\d{1,3})?)$'
845+
memory:
846+
type: string
847+
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
848+
requests:
849+
type: object
850+
properties:
851+
cpu:
852+
type: string
853+
pattern: '^(\d+m|\d+(\.\d{1,3})?)$'
854+
memory:
855+
type: string
856+
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
711857
required:
712858
- image
713859
- repos

setup/helm/operator/templates/operator-service-account-rbac-openshift.yaml

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
kind: ServiceAccount
33
metadata:
44
name: postgres-operator
5-
namespace: {{ .Release.Namespace }}
5+
namespace: {{ .Values.operatorSettings.operator_namespace }}
66

77
---
88
apiVersion: rbac.authorization.k8s.io/v1
@@ -210,6 +210,15 @@ rules:
210210
verbs:
211211
- get
212212
- create
213+
# to grant privilege to run privileged pods (not needed by default)
214+
#- apiGroups:
215+
# - extensions
216+
# resources:
217+
# - podsecuritypolicies
218+
# resourceNames:
219+
# - privileged
220+
# verbs:
221+
# - use
213222

214223
---
215224
apiVersion: rbac.authorization.k8s.io/v1
@@ -223,14 +232,7 @@ roleRef:
223232
subjects:
224233
- kind: ServiceAccount
225234
name: postgres-operator
226-
namespace: {{ .Release.Namespace }}
227-
228-
---
229-
apiVersion: v1
230-
kind: ServiceAccount
231-
metadata:
232-
name: postgres-pod
233-
namespace: {{ .Release.Namespace }}
235+
namespace: {{ .Values.operatorSettings.operator_namespace }}
234236

235237
---
236238
apiVersion: rbac.authorization.k8s.io/v1
@@ -270,23 +272,12 @@ rules:
270272
- services
271273
verbs:
272274
- create
273-
- apiGroups:
274-
- ""
275-
resources:
276-
- pods/exec
277-
verbs:
278-
- create
279-
280-
---
281-
apiVersion: rbac.authorization.k8s.io/v1
282-
kind: ClusterRoleBinding
283-
metadata:
284-
name: postgres-pod
285-
roleRef:
286-
apiGroup: rbac.authorization.k8s.io
287-
kind: ClusterRole
288-
name: postgres-pod
289-
subjects:
290-
- kind: ServiceAccount
291-
name: postgres-pod
292-
namespace: {{ .Release.Namespace }}
275+
# to grant privilege to run privileged pods (not needed by default)
276+
#- apiGroups:
277+
# - extensions
278+
# resources:
279+
# - podsecuritypolicies
280+
# resourceNames:
281+
# - privileged
282+
# verbs:
283+
# - use

setup/helm/operator/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ imagePullSecretNames: []
1515

1616
# Define the operator settings to add to the configmap
1717
operatorSettings:
18-
operatorImage: 'docker.io/cybertecpostgresql/cybertec-pg-operator:0.3.0-1'
18+
operatorImage: 'docker.io/cybertecpostgresql/cybertec-pg-operator:0.5.0-2'
1919
namespace: '*'
2020
enable_pod_antiaffinity: 'true'
21+
operator_namespace: 'zalando'
22+
23+

0 commit comments

Comments
 (0)