Skip to content

Commit 4ca0d19

Browse files
committed
Set the SSA merge strategy on volume projections
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 e8a2d2e commit 4ca0d19

10 files changed

+47
-1
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
@@ -1307,6 +1307,7 @@ spec:
13071307
type: object
13081308
type: object
13091309
type: array
1310+
x-kubernetes-list-type: atomic
13101311
gunicorn:
13111312
description: |-
13121313
Settings for the Gunicorn server.

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ spec:
475475
type: object
476476
type: object
477477
type: array
478+
x-kubernetes-list-type: atomic
478479
global:
479480
additionalProperties:
480481
type: string
@@ -4897,6 +4898,7 @@ spec:
48974898
type: object
48984899
type: object
48994900
type: array
4901+
x-kubernetes-list-type: atomic
49004902
parameters:
49014903
additionalProperties:
49024904
x-kubernetes-int-or-string: true
@@ -6340,6 +6342,7 @@ spec:
63406342
type: object
63416343
type: object
63426344
type: array
6345+
x-kubernetes-list-type: atomic
63436346
global:
63446347
additionalProperties:
63456348
type: string
@@ -12758,6 +12761,7 @@ spec:
1275812761
type: object
1275912762
type: object
1276012763
type: array
12764+
x-kubernetes-list-type: atomic
1276112765
customTLSSecret:
1276212766
description: |-
1276312767
Projected secret containing custom TLS certificates to encrypt output from the exporter
@@ -14284,6 +14288,7 @@ spec:
1428414288
type: object
1428514289
type: object
1428614290
type: array
14291+
x-kubernetes-list-type: atomic
1428714292
global:
1428814293
additionalProperties:
1428914294
type: string
@@ -17720,6 +17725,7 @@ spec:
1772017725
type: object
1772117726
type: object
1772217727
type: array
17728+
x-kubernetes-list-type: atomic
1772317729
ldapBindPassword:
1772417730
description: |-
1772517731
A Secret containing the value for the LDAP_BIND_PASSWORD setting.
@@ -19280,6 +19286,7 @@ spec:
1928019286
type: object
1928119287
type: object
1928219288
type: array
19289+
x-kubernetes-list-type: atomic
1928319290
global:
1928419291
additionalProperties:
1928519292
type: string
@@ -23702,6 +23709,7 @@ spec:
2370223709
type: object
2370323710
type: object
2370423711
type: array
23712+
x-kubernetes-list-type: atomic
2370523713
parameters:
2370623714
additionalProperties:
2370723715
x-kubernetes-int-or-string: true
@@ -25138,6 +25146,7 @@ spec:
2513825146
type: object
2513925147
type: object
2514025148
type: array
25149+
x-kubernetes-list-type: atomic
2514125150
global:
2514225151
additionalProperties:
2514325152
type: string
@@ -31556,6 +31565,7 @@ spec:
3155631565
type: object
3155731566
type: object
3155831567
type: array
31568+
x-kubernetes-list-type: atomic
3155931569
customTLSSecret:
3156031570
description: |-
3156131571
Projected secret containing custom TLS certificates to encrypt output from the exporter
@@ -33082,6 +33092,7 @@ spec:
3308233092
type: object
3308333093
type: object
3308433094
type: array
33095+
x-kubernetes-list-type: atomic
3308533096
global:
3308633097
additionalProperties:
3308733098
type: string
@@ -36512,6 +36523,7 @@ spec:
3651236523
type: object
3651336524
type: object
3651436525
type: array
36526+
x-kubernetes-list-type: atomic
3651536527
ldapBindPassword:
3651636528
description: |-
3651736529
A Secret containing the value for the LDAP_BIND_PASSWORD setting.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import (
1212
type PostgresConfigSpec struct {
1313
// Files to mount under "/etc/postgres".
1414
// ---
15+
// [corev1.ProjectedVolumeSource.Sources]
16+
// +listType=atomic
17+
//
1518
// +optional
1619
Files []corev1.VolumeProjection `json:"files,omitempty"`
1720

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ type InstrumentationConfigSpec struct {
6161
// Files allows the user to mount projected volumes into the collector
6262
// Pod so that files can be referenced by the collector as needed.
6363
// ---
64-
// +kubebuilder:validation:MinItems=1
64+
// [corev1.ProjectedVolumeSource.Sources]
6565
// +listType=atomic
66+
//
67+
// +kubebuilder:validation:MinItems=1
6668
// +optional
6769
Files []corev1.VolumeProjection `json:"files,omitempty"`
6870

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ import (
1212
type PGAdminConfiguration struct {
1313
// Files allows the user to mount projected volumes into the pgAdmin
1414
// container so that files can be referenced by pgAdmin as needed.
15+
// ---
16+
// [corev1.ProjectedVolumeSource.Sources]
17+
// +listType=atomic
18+
//
19+
// +optional
1520
Files []corev1.VolumeProjection `json:"files,omitempty"`
1621

1722
// A Secret containing the value for the LDAP_BIND_PASSWORD setting.

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ type PGBackRestArchive struct {
9393
// under "/etc/pgbackrest/conf.d" alongside any pgBackRest configuration generated by the
9494
// PostgreSQL Operator:
9595
// https://pgbackrest.org/configuration.html
96+
// ---
97+
// [corev1.ProjectedVolumeSource.Sources]
98+
// +listType=atomic
99+
//
96100
// +optional
97101
Configuration []corev1.VolumeProjection `json:"configuration,omitempty"`
98102

@@ -447,6 +451,10 @@ type PGBackRestDataSource struct {
447451
// under "/etc/pgbackrest/conf.d" alongside any pgBackRest configuration generated by the
448452
// PostgreSQL Operator:
449453
// https://pgbackrest.org/configuration.html
454+
// ---
455+
// [corev1.ProjectedVolumeSource.Sources]
456+
// +listType=atomic
457+
//
450458
// +optional
451459
Configuration []corev1.VolumeProjection `json:"configuration,omitempty"`
452460

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ type PGBouncerConfiguration struct {
1818
// PgBouncer to restart, but changes to the file contents are automatically
1919
// reloaded.
2020
// More info: https://www.pgbouncer.org/config.html#include-directive
21+
// ---
22+
// [corev1.ProjectedVolumeSource.Sources]
23+
// +listType=atomic
24+
//
2125
// +optional
2226
Files []corev1.VolumeProjection `json:"files,omitempty"`
2327

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ type ExporterSpec struct {
1919
// any volume projected using this field, it will be loaded using the "extend.query-path" flag:
2020
// https://github.com/prometheus-community/postgres_exporter#flags
2121
// Changing the values of field causes PostgreSQL and the exporter to restart.
22+
// ---
23+
// [corev1.ProjectedVolumeSource.Sources]
24+
// +listType=atomic
25+
//
2226
// +optional
2327
Configuration []corev1.VolumeProjection `json:"configuration,omitempty"`
2428

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ type PostgresAuthenticationSpec struct {
2929
type PostgresConfigSpec struct {
3030
// Files to mount under "/etc/postgres".
3131
// ---
32+
// [corev1.ProjectedVolumeSource.Sources]
33+
// +listType=atomic
34+
//
3235
// +optional
3336
Files []corev1.VolumeProjection `json:"files,omitempty"`
3437

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
@@ -13,6 +13,10 @@ import (
1313
type StandalonePGAdminConfiguration struct {
1414
// Files allows the user to mount projected volumes into the pgAdmin
1515
// container so that files can be referenced by pgAdmin as needed.
16+
// ---
17+
// [corev1.ProjectedVolumeSource.Sources]
18+
// +listType=atomic
19+
//
1620
// +optional
1721
Files []corev1.VolumeProjection `json:"files,omitempty"`
1822

0 commit comments

Comments
 (0)