Skip to content

Commit e8a2d2e

Browse files
committed
Set the SSA merge strategy on Pod tolerations
The "ListsMustHaveSSATags" checker identifies this issue. This change is backward compatible because unmarked lists are atomic. See: https://docs.k8s.io/reference/using-api/server-side-apply#custom-resources-and-server-side-apply
1 parent 0f5a962 commit e8a2d2e

10 files changed

+62
-0
lines changed

config/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,7 @@ spec:
25412541
type: string
25422542
type: object
25432543
type: array
2544+
x-kubernetes-list-type: atomic
25442545
users:
25452546
description: |-
25462547
pgAdmin users that are managed via the PGAdmin spec. Users can still

config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,6 +1124,7 @@ spec:
11241124
type: string
11251125
type: object
11261126
type: array
1127+
x-kubernetes-list-type: atomic
11271128
transferMethod:
11281129
description: |-
11291130
The method pg_upgrade should use to transfer files to the new cluster.

config/crd/bases/postgres-operator.crunchydata.com_postgresclusters.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,6 +1526,7 @@ spec:
15261526
type: string
15271527
type: object
15281528
type: array
1529+
x-kubernetes-list-type: atomic
15291530
ttlSecondsAfterFinished:
15301531
description: |-
15311532
Limit the lifetime of a Job that has finished.
@@ -2771,6 +2772,7 @@ spec:
27712772
type: string
27722773
type: object
27732774
type: array
2775+
x-kubernetes-list-type: atomic
27742776
topologySpreadConstraints:
27752777
description: |-
27762778
Topology spread constraints of a Dedicated repo host pod. Changing this
@@ -4384,6 +4386,7 @@ spec:
43844386
type: string
43854387
type: object
43864388
type: array
4389+
x-kubernetes-list-type: atomic
43874390
volumes:
43884391
description: Volumes to add to Restore Job Pods
43894392
properties:
@@ -6771,6 +6774,7 @@ spec:
67716774
type: string
67726775
type: object
67736776
type: array
6777+
x-kubernetes-list-type: atomic
67746778
volumes:
67756779
description: Volumes to add to Restore Job Pods
67766780
properties:
@@ -7887,6 +7891,7 @@ spec:
78877891
type: string
78887892
type: object
78897893
type: array
7894+
x-kubernetes-list-type: atomic
78907895
volumes:
78917896
description: Volumes to add to Restore Job Pods
78927897
properties:
@@ -11031,6 +11036,7 @@ spec:
1103111036
type: string
1103211037
type: object
1103311038
type: array
11039+
x-kubernetes-list-type: atomic
1103411040
topologySpreadConstraints:
1103511041
description: |-
1103611042
Topology spread constraints of a PostgreSQL pod. Changing this value causes
@@ -16035,6 +16041,7 @@ spec:
1603516041
type: string
1603616042
type: object
1603716043
type: array
16044+
x-kubernetes-list-type: atomic
1603816045
topologySpreadConstraints:
1603916046
description: |-
1604016047
Topology spread constraints of a PgBouncer pod. Changing this value causes
@@ -18142,6 +18149,7 @@ spec:
1814218149
type: string
1814318150
type: object
1814418151
type: array
18152+
x-kubernetes-list-type: atomic
1814518153
topologySpreadConstraints:
1814618154
description: |-
1814718155
Topology spread constraints of a pgAdmin pod. Changing this value causes
@@ -20323,6 +20331,7 @@ spec:
2032320331
type: string
2032420332
type: object
2032520333
type: array
20334+
x-kubernetes-list-type: atomic
2032620335
ttlSecondsAfterFinished:
2032720336
description: |-
2032820337
Limit the lifetime of a Job that has finished.
@@ -21568,6 +21577,7 @@ spec:
2156821577
type: string
2156921578
type: object
2157021579
type: array
21580+
x-kubernetes-list-type: atomic
2157121581
topologySpreadConstraints:
2157221582
description: |-
2157321583
Topology spread constraints of a Dedicated repo host pod. Changing this
@@ -23181,6 +23191,7 @@ spec:
2318123191
type: string
2318223192
type: object
2318323193
type: array
23194+
x-kubernetes-list-type: atomic
2318423195
volumes:
2318523196
description: Volumes to add to Restore Job Pods
2318623197
properties:
@@ -25561,6 +25572,7 @@ spec:
2556125572
type: string
2556225573
type: object
2556325574
type: array
25575+
x-kubernetes-list-type: atomic
2556425576
volumes:
2556525577
description: Volumes to add to Restore Job Pods
2556625578
properties:
@@ -26677,6 +26689,7 @@ spec:
2667726689
type: string
2667826690
type: object
2667926691
type: array
26692+
x-kubernetes-list-type: atomic
2668026693
volumes:
2668126694
description: Volumes to add to Restore Job Pods
2668226695
properties:
@@ -29821,6 +29834,7 @@ spec:
2982129834
type: string
2982229835
type: object
2982329836
type: array
29837+
x-kubernetes-list-type: atomic
2982429838
topologySpreadConstraints:
2982529839
description: |-
2982629840
Topology spread constraints of a PostgreSQL pod. Changing this value causes
@@ -34825,6 +34839,7 @@ spec:
3482534839
type: string
3482634840
type: object
3482734841
type: array
34842+
x-kubernetes-list-type: atomic
3482834843
topologySpreadConstraints:
3482934844
description: |-
3483034845
Topology spread constraints of a PgBouncer pod. Changing this value causes
@@ -36926,6 +36941,7 @@ spec:
3692636941
type: string
3692736942
type: object
3692836943
type: array
36944+
x-kubernetes-list-type: atomic
3692936945
topologySpreadConstraints:
3693036946
description: |-
3693136947
Topology spread constraints of a pgAdmin pod. Changing this value causes

pkg/apis/postgres-operator.crunchydata.com/v1/postgrescluster_types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ type PostgresClusterDataSource struct {
320320

321321
// Tolerations of the pgBackRest restore Job.
322322
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
323+
// ---
324+
// [corev1.PodSpec.Tolerations]
325+
// +listType=atomic
326+
//
323327
// +optional
324328
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
325329

@@ -518,6 +522,10 @@ type PostgresInstanceSetSpec struct {
518522

519523
// Tolerations of a PostgreSQL pod. Changing this value causes PostgreSQL to restart.
520524
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
525+
// ---
526+
// [corev1.PodSpec.Tolerations]
527+
// +listType=atomic
528+
//
521529
// +optional
522530
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
523531

pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgadmin_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ type PGAdminPodSpec struct {
8484

8585
// Tolerations of a pgAdmin pod. Changing this value causes pgAdmin to restart.
8686
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
87+
// ---
88+
// [corev1.PodSpec.Tolerations]
89+
// +listType=atomic
90+
//
8791
// +optional
8892
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
8993

pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgbackrest_types.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ type BackupJobs struct {
167167

168168
// Tolerations of pgBackRest backup Job pods.
169169
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
170+
// ---
171+
// [corev1.PodSpec.Tolerations]
172+
// +listType=atomic
173+
//
170174
// +optional
171175
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
172176

@@ -227,6 +231,10 @@ type PGBackRestRepoHost struct {
227231

228232
// Tolerations of a PgBackRest repo host pod. Changing this value causes a restart.
229233
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
234+
// ---
235+
// [corev1.PodSpec.Tolerations]
236+
// +listType=atomic
237+
//
230238
// +optional
231239
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
232240

@@ -480,6 +488,10 @@ type PGBackRestDataSource struct {
480488

481489
// Tolerations of the pgBackRest restore Job.
482490
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
491+
// ---
492+
// [corev1.PodSpec.Tolerations]
493+
// +listType=atomic
494+
//
483495
// +optional
484496
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
485497

pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgbouncer_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ type PGBouncerPodSpec struct {
130130
// Tolerations of a PgBouncer pod. Changing this value causes PgBouncer to
131131
// restart.
132132
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
133+
// ---
134+
// [corev1.PodSpec.Tolerations]
135+
// +listType=atomic
136+
//
133137
// +optional
134138
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
135139

pkg/apis/postgres-operator.crunchydata.com/v1beta1/pgupgrade_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ type PGUpgradeSpec struct {
6767

6868
// Tolerations of the PGUpgrade pod.
6969
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
70+
// ---
71+
// [corev1.PodSpec.Tolerations]
72+
// +listType=atomic
73+
//
7074
// +optional
7175
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
7276

pkg/apis/postgres-operator.crunchydata.com/v1beta1/postgrescluster_types.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ type PostgresClusterDataSource struct {
306306

307307
// Tolerations of the pgBackRest restore Job.
308308
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
309+
// ---
310+
// [corev1.PodSpec.Tolerations]
311+
// +listType=atomic
312+
//
309313
// +optional
310314
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
311315

@@ -504,6 +508,10 @@ type PostgresInstanceSetSpec struct {
504508

505509
// Tolerations of a PostgreSQL pod. Changing this value causes PostgreSQL to restart.
506510
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
511+
// ---
512+
// [corev1.PodSpec.Tolerations]
513+
// +listType=atomic
514+
//
507515
// +optional
508516
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
509517

pkg/apis/postgres-operator.crunchydata.com/v1beta1/standalone_pgadmin_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ type PGAdminSpec struct {
142142

143143
// Tolerations of the PGAdmin pod.
144144
// More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration
145+
// ---
146+
// [corev1.PodSpec.Tolerations]
147+
// +listType=atomic
148+
//
145149
// +optional
146150
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
147151

0 commit comments

Comments
 (0)