• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

zalando / postgres-operator / 17069871161

19 Aug 2025 12:40PM UTC coverage: 42.059% (-3.4%) from 45.498%
17069871161

push

github

web-flow
upgrade Go from 1.23.4 to 1.25.0 (#2945)

* upgrade go to 1.25
* add minor version to be Go 1.25.0
* revert the Go version on README to keep the history of the release

5 of 9 new or added lines in 7 files covered. (55.56%)

531 existing lines in 13 files now uncovered.

6493 of 15438 relevant lines covered (42.06%)

15.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pkg/apis/acid.zalan.do/v1/crds.go
1
package v1
2

3
import (
4
        "fmt"
5

6
        apiextv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
7
        metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
8

9
        acidzalando "github.com/zalando/postgres-operator/pkg/apis/acid.zalan.do"
10
        "github.com/zalando/postgres-operator/pkg/util"
11
)
12

13
// CRDResource* define names necesssary for the k8s CRD API
14
const (
15
        PostgresCRDResourceKind   = "postgresql"
16
        PostgresCRDResourcePlural = "postgresqls"
17
        PostgresCRDResourceList   = PostgresCRDResourceKind + "List"
18
        PostgresCRDResouceName    = PostgresCRDResourcePlural + "." + acidzalando.GroupName
19
        PostgresCRDResourceShort  = "pg"
20

21
        OperatorConfigCRDResouceKind    = "OperatorConfiguration"
22
        OperatorConfigCRDResourcePlural = "operatorconfigurations"
23
        OperatorConfigCRDResourceList   = OperatorConfigCRDResouceKind + "List"
24
        OperatorConfigCRDResourceName   = OperatorConfigCRDResourcePlural + "." + acidzalando.GroupName
25
        OperatorConfigCRDResourceShort  = "opconfig"
26
)
27

28
// PostgresCRDResourceColumns definition of AdditionalPrinterColumns for postgresql CRD
29
var PostgresCRDResourceColumns = []apiextv1.CustomResourceColumnDefinition{
30
        {
31
                Name:        "Team",
32
                Type:        "string",
33
                Description: "Team responsible for Postgres cluster",
34
                JSONPath:    ".spec.teamId",
35
        },
36
        {
37
                Name:        "Version",
38
                Type:        "string",
39
                Description: "PostgreSQL version",
40
                JSONPath:    ".spec.postgresql.version",
41
        },
42
        {
43
                Name:        "Pods",
44
                Type:        "integer",
45
                Description: "Number of Pods per Postgres cluster",
46
                JSONPath:    ".spec.numberOfInstances",
47
        },
48
        {
49
                Name:        "Volume",
50
                Type:        "string",
51
                Description: "Size of the bound volume",
52
                JSONPath:    ".spec.volume.size",
53
        },
54
        {
55
                Name:        "CPU-Request",
56
                Type:        "string",
57
                Description: "Requested CPU for Postgres containers",
58
                JSONPath:    ".spec.resources.requests.cpu",
59
        },
60
        {
61
                Name:        "Memory-Request",
62
                Type:        "string",
63
                Description: "Requested memory for Postgres containers",
64
                JSONPath:    ".spec.resources.requests.memory",
65
        },
66
        {
67
                Name:     "Age",
68
                Type:     "date",
69
                JSONPath: ".metadata.creationTimestamp",
70
        },
71
        {
72
                Name:        "Status",
73
                Type:        "string",
74
                Description: "Current sync status of postgresql resource",
75
                JSONPath:    ".status.PostgresClusterStatus",
76
        },
77
}
78

79
// OperatorConfigCRDResourceColumns definition of AdditionalPrinterColumns for OperatorConfiguration CRD
80
var OperatorConfigCRDResourceColumns = []apiextv1.CustomResourceColumnDefinition{
81
        {
82
                Name:        "Image",
83
                Type:        "string",
84
                Description: "Spilo image to be used for Pods",
85
                JSONPath:    ".configuration.docker_image",
86
        },
87
        {
88
                Name:        "Cluster-Label",
89
                Type:        "string",
90
                Description: "Label for K8s resources created by operator",
91
                JSONPath:    ".configuration.kubernetes.cluster_name_label",
92
        },
93
        {
94
                Name:        "Service-Account",
95
                Type:        "string",
96
                Description: "Name of service account to be used",
97
                JSONPath:    ".configuration.kubernetes.pod_service_account_name",
98
        },
99
        {
100
                Name:        "Min-Instances",
101
                Type:        "integer",
102
                Description: "Minimum number of instances per Postgres cluster",
103
                JSONPath:    ".configuration.min_instances",
104
        },
105
        {
106
                Name:     "Age",
107
                Type:     "date",
108
                JSONPath: ".metadata.creationTimestamp",
109
        },
110
}
111

112
var min0 = 0.0
113
var min1 = 1.0
114
var minDisable = -1.0
115

116
// PostgresCRDResourceValidation to check applied manifest parameters
117
var PostgresCRDResourceValidation = apiextv1.CustomResourceValidation{
118
        OpenAPIV3Schema: &apiextv1.JSONSchemaProps{
119
                Type:     "object",
120
                Required: []string{"kind", "apiVersion", "spec"},
121
                Properties: map[string]apiextv1.JSONSchemaProps{
122
                        "kind": {
123
                                Type: "string",
124
                                Enum: []apiextv1.JSON{
125
                                        {
126
                                                Raw: []byte(`"postgresql"`),
127
                                        },
128
                                },
129
                        },
130
                        "apiVersion": {
131
                                Type: "string",
132
                                Enum: []apiextv1.JSON{
133
                                        {
134
                                                Raw: []byte(`"acid.zalan.do/v1"`),
135
                                        },
136
                                },
137
                        },
138
                        "spec": {
139
                                Type:     "object",
140
                                Required: []string{"numberOfInstances", "teamId", "postgresql", "volume"},
141
                                Properties: map[string]apiextv1.JSONSchemaProps{
142
                                        "additionalVolumes": {
143
                                                Type: "array",
144
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
145
                                                        Schema: &apiextv1.JSONSchemaProps{
146
                                                                Type:     "object",
147
                                                                Required: []string{"name", "mountPath", "volumeSource"},
148
                                                                Properties: map[string]apiextv1.JSONSchemaProps{
149
                                                                        "isSubPathExpr": {
150
                                                                                Type: "boolean",
151
                                                                        },
152
                                                                        "name": {
153
                                                                                Type: "string",
154
                                                                        },
155
                                                                        "mountPath": {
156
                                                                                Type: "string",
157
                                                                        },
158
                                                                        "subPath": {
159
                                                                                Type: "string",
160
                                                                        },
161
                                                                        "targetContainers": {
162
                                                                                Type:     "array",
163
                                                                                Nullable: true,
164
                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
165
                                                                                        Schema: &apiextv1.JSONSchemaProps{
166
                                                                                                Type: "string",
167
                                                                                        },
168
                                                                                },
169
                                                                        },
170
                                                                        "volumeSource": {
171
                                                                                Type:                   "object",
172
                                                                                XPreserveUnknownFields: util.True(),
173
                                                                        },
174
                                                                },
175
                                                        },
176
                                                },
177
                                        },
178
                                        "allowedSourceRanges": {
179
                                                Type:     "array",
180
                                                Nullable: true,
181
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
182
                                                        Schema: &apiextv1.JSONSchemaProps{
183
                                                                Type:    "string",
184
                                                                Pattern: "^(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\/(\\d|[1-2]\\d|3[0-2])$",
185
                                                        },
186
                                                },
187
                                        },
188
                                        "clone": {
189
                                                Type:     "object",
190
                                                Required: []string{"cluster"},
191
                                                Properties: map[string]apiextv1.JSONSchemaProps{
192
                                                        "cluster": {
193
                                                                Type: "string",
194
                                                        },
195
                                                        "s3_endpoint": {
196
                                                                Type: "string",
197
                                                        },
198
                                                        "s3_access_key_id": {
199
                                                                Type: "string",
200
                                                        },
201
                                                        "s3_secret_access_key": {
202
                                                                Type: "string",
203
                                                        },
204
                                                        "s3_force_path_style": {
205
                                                                Type: "boolean",
206
                                                        },
207
                                                        "s3_wal_path": {
208
                                                                Type: "string",
209
                                                        },
210
                                                        "timestamp": {
211
                                                                Type:    "string",
212
                                                                Pattern: "^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(([+-]([01][0-9]|2[0-3]):[0-5][0-9]))$",
213
                                                        },
214
                                                        "uid": {
215
                                                                Type:   "string",
216
                                                                Format: "uuid",
217
                                                        },
218
                                                },
219
                                        },
220
                                        "connectionPooler": {
221
                                                Type: "object",
222
                                                Properties: map[string]apiextv1.JSONSchemaProps{
223
                                                        "dockerImage": {
224
                                                                Type: "string",
225
                                                        },
226
                                                        "maxDBConnections": {
227
                                                                Type: "integer",
228
                                                        },
229
                                                        "mode": {
230
                                                                Type: "string",
231
                                                                Enum: []apiextv1.JSON{
232
                                                                        {
233
                                                                                Raw: []byte(`"session"`),
234
                                                                        },
235
                                                                        {
236
                                                                                Raw: []byte(`"transaction"`),
237
                                                                        },
238
                                                                },
239
                                                        },
240
                                                        "numberOfInstances": {
241
                                                                Type:    "integer",
242
                                                                Minimum: &min1,
243
                                                        },
244
                                                        "resources": {
245
                                                                Type: "object",
246
                                                                Properties: map[string]apiextv1.JSONSchemaProps{
247
                                                                        "limits": {
248
                                                                                Type: "object",
249
                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
250
                                                                                        "cpu": {
251
                                                                                                Type:    "string",
252
                                                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$",
253
                                                                                        },
254
                                                                                        "memory": {
255
                                                                                                Type:    "string",
256
                                                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
257
                                                                                        },
258
                                                                                },
259
                                                                        },
260
                                                                        "requests": {
261
                                                                                Type: "object",
262
                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
263
                                                                                        "cpu": {
264
                                                                                                Type:    "string",
265
                                                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$",
266
                                                                                        },
267
                                                                                        "memory": {
268
                                                                                                Type:    "string",
269
                                                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
270
                                                                                        },
271
                                                                                },
272
                                                                        },
273
                                                                },
274
                                                        },
275
                                                        "schema": {
276
                                                                Type: "string",
277
                                                        },
278
                                                        "user": {
279
                                                                Type: "string",
280
                                                        },
281
                                                },
282
                                        },
283
                                        "databases": {
284
                                                Type: "object",
285
                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
286
                                                        Schema: &apiextv1.JSONSchemaProps{
287
                                                                Type: "string",
288
                                                        },
289
                                                },
290
                                        },
291
                                        "dockerImage": {
292
                                                Type: "string",
293
                                        },
294
                                        "enableConnectionPooler": {
295
                                                Type: "boolean",
296
                                        },
297
                                        "enableReplicaConnectionPooler": {
298
                                                Type: "boolean",
299
                                        },
300
                                        "enableLogicalBackup": {
301
                                                Type: "boolean",
302
                                        },
303
                                        "enableMasterLoadBalancer": {
304
                                                Type: "boolean",
305
                                        },
306
                                        "enableMasterPoolerLoadBalancer": {
307
                                                Type: "boolean",
308
                                        },
309
                                        "enableReplicaLoadBalancer": {
310
                                                Type: "boolean",
311
                                        },
312
                                        "enableReplicaPoolerLoadBalancer": {
313
                                                Type: "boolean",
314
                                        },
315
                                        "enableShmVolume": {
316
                                                Type: "boolean",
317
                                        },
318
                                        "env": {
319
                                                Type:     "array",
320
                                                Nullable: true,
321
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
322
                                                        Schema: &apiextv1.JSONSchemaProps{
323
                                                                Type:                   "object",
324
                                                                XPreserveUnknownFields: util.True(),
325
                                                        },
326
                                                },
327
                                        },
328
                                        "init_containers": {
329
                                                Type:        "array",
330
                                                Description: "deprecated",
331
                                                Nullable:    true,
332
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
333
                                                        Schema: &apiextv1.JSONSchemaProps{
334
                                                                Type:                   "object",
335
                                                                XPreserveUnknownFields: util.True(),
336
                                                        },
337
                                                },
338
                                        },
339
                                        "initContainers": {
340
                                                Type:     "array",
341
                                                Nullable: true,
342
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
343
                                                        Schema: &apiextv1.JSONSchemaProps{
344
                                                                Type:                   "object",
345
                                                                XPreserveUnknownFields: util.True(),
346
                                                        },
347
                                                },
348
                                        },
349
                                        "logicalBackupRetention": {
350
                                                Type: "string",
351
                                        },
352
                                        "logicalBackupSchedule": {
353
                                                Type:    "string",
354
                                                Pattern: "^(\\d+|\\*)(/\\d+)?(\\s+(\\d+|\\*)(/\\d+)?){4}$",
355
                                        },
356
                                        "maintenanceWindows": {
357
                                                Type: "array",
358
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
359
                                                        Schema: &apiextv1.JSONSchemaProps{
360
                                                                Type:    "string",
361
                                                                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))\\ *$",
362
                                                        },
363
                                                },
364
                                        },
365
                                        "masterServiceAnnotations": {
366
                                                Type: "object",
367
                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
368
                                                        Schema: &apiextv1.JSONSchemaProps{
369
                                                                Type: "string",
370
                                                        },
371
                                                },
372
                                        },
373
                                        "nodeAffinity": {
374
                                                Type: "object",
375
                                                Properties: map[string]apiextv1.JSONSchemaProps{
376
                                                        "preferredDuringSchedulingIgnoredDuringExecution": {
377
                                                                Type: "array",
378
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
379
                                                                        Schema: &apiextv1.JSONSchemaProps{
380
                                                                                Type:     "object",
381
                                                                                Required: []string{"preference", "weight"},
382
                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
383
                                                                                        "preference": {
384
                                                                                                Type: "object",
385
                                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
386
                                                                                                        "matchExpressions": {
387
                                                                                                                Type: "array",
388
                                                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
389
                                                                                                                        Schema: &apiextv1.JSONSchemaProps{
390
                                                                                                                                Type:     "object",
391
                                                                                                                                Required: []string{"key", "operator"},
392
                                                                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
393
                                                                                                                                        "key": {
394
                                                                                                                                                Type: "string",
395
                                                                                                                                        },
396
                                                                                                                                        "operator": {
397
                                                                                                                                                Type: "string",
398
                                                                                                                                        },
399
                                                                                                                                        "values": {
400
                                                                                                                                                Type: "array",
401
                                                                                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
402
                                                                                                                                                        Schema: &apiextv1.JSONSchemaProps{
403
                                                                                                                                                                Type: "string",
404
                                                                                                                                                        },
405
                                                                                                                                                },
406
                                                                                                                                        },
407
                                                                                                                                },
408
                                                                                                                        },
409
                                                                                                                },
410
                                                                                                        },
411
                                                                                                        "matchFields": {
412
                                                                                                                Type: "array",
413
                                                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
414
                                                                                                                        Schema: &apiextv1.JSONSchemaProps{
415
                                                                                                                                Type:     "object",
416
                                                                                                                                Required: []string{"key", "operator"},
417
                                                                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
418
                                                                                                                                        "key": {
419
                                                                                                                                                Type: "string",
420
                                                                                                                                        },
421
                                                                                                                                        "operator": {
422
                                                                                                                                                Type: "string",
423
                                                                                                                                        },
424
                                                                                                                                        "values": {
425
                                                                                                                                                Type: "array",
426
                                                                                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
427
                                                                                                                                                        Schema: &apiextv1.JSONSchemaProps{
428
                                                                                                                                                                Type: "string",
429
                                                                                                                                                        },
430
                                                                                                                                                },
431
                                                                                                                                        },
432
                                                                                                                                },
433
                                                                                                                        },
434
                                                                                                                },
435
                                                                                                        },
436
                                                                                                },
437
                                                                                        },
438
                                                                                        "weight": {
439
                                                                                                Type:   "integer",
440
                                                                                                Format: "int32",
441
                                                                                        },
442
                                                                                },
443
                                                                        },
444
                                                                },
445
                                                        },
446
                                                        "requiredDuringSchedulingIgnoredDuringExecution": {
447
                                                                Type:     "object",
448
                                                                Required: []string{"nodeSelectorTerms"},
449
                                                                Properties: map[string]apiextv1.JSONSchemaProps{
450
                                                                        "nodeSelectorTerms": {
451
                                                                                Type: "array",
452
                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
453
                                                                                        Schema: &apiextv1.JSONSchemaProps{
454
                                                                                                Type: "object",
455
                                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
456
                                                                                                        "matchExpressions": {
457
                                                                                                                Type: "array",
458
                                                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
459
                                                                                                                        Schema: &apiextv1.JSONSchemaProps{
460
                                                                                                                                Type:     "object",
461
                                                                                                                                Required: []string{"key", "operator"},
462
                                                                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
463
                                                                                                                                        "key": {
464
                                                                                                                                                Type: "string",
465
                                                                                                                                        },
466
                                                                                                                                        "operator": {
467
                                                                                                                                                Type: "string",
468
                                                                                                                                        },
469
                                                                                                                                        "values": {
470
                                                                                                                                                Type: "array",
471
                                                                                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
472
                                                                                                                                                        Schema: &apiextv1.JSONSchemaProps{
473
                                                                                                                                                                Type: "string",
474
                                                                                                                                                        },
475
                                                                                                                                                },
476
                                                                                                                                        },
477
                                                                                                                                },
478
                                                                                                                        },
479
                                                                                                                },
480
                                                                                                        },
481
                                                                                                        "matchFields": {
482
                                                                                                                Type: "array",
483
                                                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
484
                                                                                                                        Schema: &apiextv1.JSONSchemaProps{
485
                                                                                                                                Type:     "object",
486
                                                                                                                                Required: []string{"key", "operator"},
487
                                                                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
488
                                                                                                                                        "key": {
489
                                                                                                                                                Type: "string",
490
                                                                                                                                        },
491
                                                                                                                                        "operator": {
492
                                                                                                                                                Type: "string",
493
                                                                                                                                        },
494
                                                                                                                                        "values": {
495
                                                                                                                                                Type: "array",
496
                                                                                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
497
                                                                                                                                                        Schema: &apiextv1.JSONSchemaProps{
498
                                                                                                                                                                Type: "string",
499
                                                                                                                                                        },
500
                                                                                                                                                },
501
                                                                                                                                        },
502
                                                                                                                                },
503
                                                                                                                        },
504
                                                                                                                },
505
                                                                                                        },
506
                                                                                                },
507
                                                                                        },
508
                                                                                },
509
                                                                        },
510
                                                                },
511
                                                        },
512
                                                },
513
                                        },
514
                                        "numberOfInstances": {
515
                                                Type:    "integer",
516
                                                Minimum: &min0,
517
                                        },
518
                                        "patroni": {
519
                                                Type: "object",
520
                                                Properties: map[string]apiextv1.JSONSchemaProps{
521
                                                        "failsafe_mode": {
522
                                                                Type: "boolean",
523
                                                        },
524
                                                        "initdb": {
525
                                                                Type: "object",
526
                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
527
                                                                        Schema: &apiextv1.JSONSchemaProps{
528
                                                                                Type: "string",
529
                                                                        },
530
                                                                },
531
                                                        },
532
                                                        "loop_wait": {
533
                                                                Type: "integer",
534
                                                        },
535
                                                        "maximum_lag_on_failover": {
536
                                                                Type: "integer",
537
                                                        },
538
                                                        "pg_hba": {
539
                                                                Type: "array",
540
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
541
                                                                        Schema: &apiextv1.JSONSchemaProps{
542
                                                                                Type: "string",
543
                                                                        },
544
                                                                },
545
                                                        },
546
                                                        "retry_timeout": {
547
                                                                Type: "integer",
548
                                                        },
549
                                                        "slots": {
550
                                                                Type: "object",
551
                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
552
                                                                        Schema: &apiextv1.JSONSchemaProps{
553
                                                                                Type: "object",
554
                                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
555
                                                                                        Schema: &apiextv1.JSONSchemaProps{
556
                                                                                                Type: "string",
557
                                                                                        },
558
                                                                                },
559
                                                                        },
560
                                                                },
561
                                                        },
562
                                                        "synchronous_mode": {
563
                                                                Type: "boolean",
564
                                                        },
565
                                                        "synchronous_mode_strict": {
566
                                                                Type: "boolean",
567
                                                        },
568
                                                        "synchronous_node_count": {
569
                                                                Type: "integer",
570
                                                        },
571
                                                        "ttl": {
572
                                                                Type: "integer",
573
                                                        },
574
                                                },
575
                                        },
576
                                        "podAnnotations": {
577
                                                Type: "object",
578
                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
579
                                                        Schema: &apiextv1.JSONSchemaProps{
580
                                                                Type: "string",
581
                                                        },
582
                                                },
583
                                        },
584
                                        "pod_priority_class_name": {
585
                                                Type:        "string",
586
                                                Description: "deprecated",
587
                                        },
588
                                        "podPriorityClassName": {
589
                                                Type: "string",
590
                                        },
591
                                        "postgresql": {
592
                                                Type:     "object",
593
                                                Required: []string{"version"},
594
                                                Properties: map[string]apiextv1.JSONSchemaProps{
595
                                                        "version": {
596
                                                                Type: "string",
597
                                                                Enum: []apiextv1.JSON{
598
                                                                        {
599
                                                                                Raw: []byte(`"13"`),
600
                                                                        },
601
                                                                        {
602
                                                                                Raw: []byte(`"14"`),
603
                                                                        },
604
                                                                        {
605
                                                                                Raw: []byte(`"15"`),
606
                                                                        },
607
                                                                        {
608
                                                                                Raw: []byte(`"16"`),
609
                                                                        },
610
                                                                        {
611
                                                                                Raw: []byte(`"17"`),
612
                                                                        },
613
                                                                },
614
                                                        },
615
                                                        "parameters": {
616
                                                                Type: "object",
617
                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
618
                                                                        Schema: &apiextv1.JSONSchemaProps{
619
                                                                                Type: "string",
620
                                                                        },
621
                                                                },
622
                                                        },
623
                                                },
624
                                        },
625
                                        "preparedDatabases": {
626
                                                Type: "object",
627
                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
628
                                                        Schema: &apiextv1.JSONSchemaProps{
629
                                                                Type: "object",
630
                                                                Properties: map[string]apiextv1.JSONSchemaProps{
631
                                                                        "defaultUsers": {
632
                                                                                Type: "boolean",
633
                                                                        },
634
                                                                        "extensions": {
635
                                                                                Type: "object",
636
                                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
637
                                                                                        Schema: &apiextv1.JSONSchemaProps{
638
                                                                                                Type: "string",
639
                                                                                        },
640
                                                                                },
641
                                                                        },
642
                                                                        "schemas": {
643
                                                                                Type: "object",
644
                                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
645
                                                                                        Schema: &apiextv1.JSONSchemaProps{
646
                                                                                                Type: "object",
647
                                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
648
                                                                                                        "defaultUsers": {
649
                                                                                                                Type: "boolean",
650
                                                                                                        },
651
                                                                                                        "defaultRoles": {
652
                                                                                                                Type: "boolean",
653
                                                                                                        },
654
                                                                                                },
655
                                                                                        },
656
                                                                                },
657
                                                                        },
658
                                                                        "secretNamespace": {
659
                                                                                Type: "string",
660
                                                                        },
661
                                                                },
662
                                                        },
663
                                                },
664
                                        },
665
                                        "replicaLoadBalancer": {
666
                                                Type:        "boolean",
667
                                                Description: "deprecated",
668
                                        },
669
                                        "replicaServiceAnnotations": {
670
                                                Type: "object",
671
                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
672
                                                        Schema: &apiextv1.JSONSchemaProps{
673
                                                                Type: "string",
674
                                                        },
675
                                                },
676
                                        },
677
                                        "resources": {
678
                                                Type: "object",
679
                                                Properties: map[string]apiextv1.JSONSchemaProps{
680
                                                        "limits": {
681
                                                                Type: "object",
682
                                                                Properties: map[string]apiextv1.JSONSchemaProps{
683
                                                                        "cpu": {
684
                                                                                Type:    "string",
685
                                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$",
686
                                                                        },
687
                                                                        "memory": {
688
                                                                                Type:    "string",
689
                                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
690
                                                                        },
691
                                                                        "hugepages-2Mi": {
692
                                                                                Type:    "string",
693
                                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
694
                                                                        },
695
                                                                        "hugepages-1Gi": {
696
                                                                                Type:    "string",
697
                                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
698
                                                                        },
699
                                                                },
700
                                                        },
701
                                                        "requests": {
702
                                                                Type: "object",
703
                                                                Properties: map[string]apiextv1.JSONSchemaProps{
704
                                                                        "cpu": {
705
                                                                                Type:    "string",
706
                                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$",
707
                                                                        },
708
                                                                        "memory": {
709
                                                                                Type:    "string",
710
                                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
711
                                                                        },
712
                                                                        "hugepages-2Mi": {
713
                                                                                Type:    "string",
714
                                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
715
                                                                        },
716
                                                                        "hugepages-1Gi": {
717
                                                                                Type:    "string",
718
                                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
719
                                                                        },
720
                                                                },
721
                                                        },
722
                                                },
723
                                        },
724
                                        "schedulerName": {
725
                                                Type: "string",
726
                                        },
727
                                        "serviceAnnotations": {
728
                                                Type: "object",
729
                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
730
                                                        Schema: &apiextv1.JSONSchemaProps{
731
                                                                Type: "string",
732
                                                        },
733
                                                },
734
                                        },
735
                                        "sidecars": {
736
                                                Type:     "array",
737
                                                Nullable: true,
738
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
739
                                                        Schema: &apiextv1.JSONSchemaProps{
740
                                                                Type:                   "object",
741
                                                                XPreserveUnknownFields: util.True(),
742
                                                        },
743
                                                },
744
                                        },
745
                                        "spiloRunAsUser": {
746
                                                Type: "integer",
747
                                        },
748
                                        "spiloRunAsGroup": {
749
                                                Type: "integer",
750
                                        },
751
                                        "spiloFSGroup": {
752
                                                Type: "integer",
753
                                        },
754
                                        "standby": {
755
                                                Type: "object",
756
                                                Properties: map[string]apiextv1.JSONSchemaProps{
757
                                                        "s3_wal_path": {
758
                                                                Type: "string",
759
                                                        },
760
                                                        "gs_wal_path": {
761
                                                                Type: "string",
762
                                                        },
763
                                                        "standby_host": {
764
                                                                Type: "string",
765
                                                        },
766
                                                        "standby_port": {
767
                                                                Type: "string",
768
                                                        },
769
                                                },
770
                                                OneOf: []apiextv1.JSONSchemaProps{
771
                                                        apiextv1.JSONSchemaProps{Required: []string{"s3_wal_path"}},
772
                                                        apiextv1.JSONSchemaProps{Required: []string{"gs_wal_path"}},
773
                                                        apiextv1.JSONSchemaProps{Required: []string{"standby_host"}},
774
                                                },
775
                                        },
776
                                        "streams": {
777
                                                Type: "array",
778
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
779
                                                        Schema: &apiextv1.JSONSchemaProps{
780
                                                                Type:     "object",
781
                                                                Required: []string{"applicationId", "database", "tables"},
782
                                                                Properties: map[string]apiextv1.JSONSchemaProps{
783
                                                                        "applicationId": {
784
                                                                                Type: "string",
785
                                                                        },
786
                                                                        "batchSize": {
787
                                                                                Type: "integer",
788
                                                                        },
789
                                                                        "database": {
790
                                                                                Type: "string",
791
                                                                        },
792
                                                                        "enableRecovery": {
793
                                                                                Type: "boolean",
794
                                                                        },
795
                                                                        "filter": {
796
                                                                                Type: "object",
797
                                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
798
                                                                                        Schema: &apiextv1.JSONSchemaProps{
799
                                                                                                Type: "string",
800
                                                                                        },
801
                                                                                },
802
                                                                        },
803
                                                                        "tables": {
804
                                                                                Type: "object",
805
                                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
806
                                                                                        Schema: &apiextv1.JSONSchemaProps{
807
                                                                                                Type:     "object",
808
                                                                                                Required: []string{"eventType"},
809
                                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
810
                                                                                                        "eventType": {
811
                                                                                                                Type: "string",
812
                                                                                                        },
813
                                                                                                        "idColumn": {
814
                                                                                                                Type: "string",
815
                                                                                                        },
816
                                                                                                        "payloadColumn": {
817
                                                                                                                Type: "string",
818
                                                                                                        },
819
                                                                                                        "recoveryEventType": {
820
                                                                                                                Type: "string",
821
                                                                                                        },
822
                                                                                                },
823
                                                                                        },
824
                                                                                },
825
                                                                        },
826
                                                                },
827
                                                        },
828
                                                },
829
                                        },
830
                                        "teamId": {
831
                                                Type: "string",
832
                                        },
833
                                        "tls": {
834
                                                Type:     "object",
835
                                                Required: []string{"secretName"},
836
                                                Properties: map[string]apiextv1.JSONSchemaProps{
837
                                                        "secretName": {
838
                                                                Type: "string",
839
                                                        },
840
                                                        "certificateFile": {
841
                                                                Type: "string",
842
                                                        },
843
                                                        "privateKeyFile": {
844
                                                                Type: "string",
845
                                                        },
846
                                                        "caFile": {
847
                                                                Type: "string",
848
                                                        },
849
                                                        "caSecretName": {
850
                                                                Type: "string",
851
                                                        },
852
                                                },
853
                                        },
854
                                        "tolerations": {
855
                                                Type: "array",
856
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
857
                                                        Schema: &apiextv1.JSONSchemaProps{
858
                                                                Type: "object",
859
                                                                Properties: map[string]apiextv1.JSONSchemaProps{
860
                                                                        "key": {
861
                                                                                Type: "string",
862
                                                                        },
863
                                                                        "operator": {
864
                                                                                Type: "string",
865
                                                                                Enum: []apiextv1.JSON{
866
                                                                                        {
867
                                                                                                Raw: []byte(`"Equal"`),
868
                                                                                        },
869
                                                                                        {
870
                                                                                                Raw: []byte(`"Exists"`),
871
                                                                                        },
872
                                                                                },
873
                                                                        },
874
                                                                        "value": {
875
                                                                                Type: "string",
876
                                                                        },
877
                                                                        "effect": {
878
                                                                                Type: "string",
879
                                                                                Enum: []apiextv1.JSON{
880
                                                                                        {
881
                                                                                                Raw: []byte(`"NoExecute"`),
882
                                                                                        },
883
                                                                                        {
884
                                                                                                Raw: []byte(`"NoSchedule"`),
885
                                                                                        },
886
                                                                                        {
887
                                                                                                Raw: []byte(`"PreferNoSchedule"`),
888
                                                                                        },
889
                                                                                },
890
                                                                        },
891
                                                                        "tolerationSeconds": {
892
                                                                                Type: "integer",
893
                                                                        },
894
                                                                },
895
                                                        },
896
                                                },
897
                                        },
898
                                        "useLoadBalancer": {
899
                                                Type:        "boolean",
900
                                                Description: "deprecated",
901
                                        },
902
                                        "users": {
903
                                                Type: "object",
904
                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
905
                                                        Schema: &apiextv1.JSONSchemaProps{
906
                                                                Type:     "array",
907
                                                                Nullable: true,
908
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
909
                                                                        Schema: &apiextv1.JSONSchemaProps{
910
                                                                                Type: "string",
911
                                                                                Enum: []apiextv1.JSON{
912
                                                                                        {
913
                                                                                                Raw: []byte(`"bypassrls"`),
914
                                                                                        },
915
                                                                                        {
916
                                                                                                Raw: []byte(`"BYPASSRLS"`),
917
                                                                                        },
918
                                                                                        {
919
                                                                                                Raw: []byte(`"nobypassrls"`),
920
                                                                                        },
921
                                                                                        {
922
                                                                                                Raw: []byte(`"NOBYPASSRLS"`),
923
                                                                                        },
924
                                                                                        {
925
                                                                                                Raw: []byte(`"createdb"`),
926
                                                                                        },
927
                                                                                        {
928
                                                                                                Raw: []byte(`"CREATEDB"`),
929
                                                                                        },
930
                                                                                        {
931
                                                                                                Raw: []byte(`"nocreatedb"`),
932
                                                                                        },
933
                                                                                        {
934
                                                                                                Raw: []byte(`"NOCREATEDB"`),
935
                                                                                        },
936
                                                                                        {
937
                                                                                                Raw: []byte(`"createrole"`),
938
                                                                                        },
939
                                                                                        {
940
                                                                                                Raw: []byte(`"CREATEROLE"`),
941
                                                                                        },
942
                                                                                        {
943
                                                                                                Raw: []byte(`"nocreaterole"`),
944
                                                                                        },
945
                                                                                        {
946
                                                                                                Raw: []byte(`"NOCREATEROLE"`),
947
                                                                                        },
948
                                                                                        {
949
                                                                                                Raw: []byte(`"inherit"`),
950
                                                                                        },
951
                                                                                        {
952
                                                                                                Raw: []byte(`"INHERIT"`),
953
                                                                                        },
954
                                                                                        {
955
                                                                                                Raw: []byte(`"noinherit"`),
956
                                                                                        },
957
                                                                                        {
958
                                                                                                Raw: []byte(`"NOINHERIT"`),
959
                                                                                        },
960
                                                                                        {
961
                                                                                                Raw: []byte(`"login"`),
962
                                                                                        },
963
                                                                                        {
964
                                                                                                Raw: []byte(`"LOGIN"`),
965
                                                                                        },
966
                                                                                        {
967
                                                                                                Raw: []byte(`"nologin"`),
968
                                                                                        },
969
                                                                                        {
970
                                                                                                Raw: []byte(`"NOLOGIN"`),
971
                                                                                        },
972
                                                                                        {
973
                                                                                                Raw: []byte(`"replication"`),
974
                                                                                        },
975
                                                                                        {
976
                                                                                                Raw: []byte(`"REPLICATION"`),
977
                                                                                        },
978
                                                                                        {
979
                                                                                                Raw: []byte(`"noreplication"`),
980
                                                                                        },
981
                                                                                        {
982
                                                                                                Raw: []byte(`"NOREPLICATION"`),
983
                                                                                        },
984
                                                                                        {
985
                                                                                                Raw: []byte(`"superuser"`),
986
                                                                                        },
987
                                                                                        {
988
                                                                                                Raw: []byte(`"SUPERUSER"`),
989
                                                                                        },
990
                                                                                        {
991
                                                                                                Raw: []byte(`"nosuperuser"`),
992
                                                                                        },
993
                                                                                        {
994
                                                                                                Raw: []byte(`"NOSUPERUSER"`),
995
                                                                                        },
996
                                                                                },
997
                                                                        },
998
                                                                },
999
                                                        },
1000
                                                },
1001
                                        },
1002
                                        "usersIgnoringSecretRotation": {
1003
                                                Type:     "array",
1004
                                                Nullable: true,
1005
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1006
                                                        Schema: &apiextv1.JSONSchemaProps{
1007
                                                                Type: "string",
1008
                                                        },
1009
                                                },
1010
                                        },
1011
                                        "usersWithInPlaceSecretRotation": {
1012
                                                Type:     "array",
1013
                                                Nullable: true,
1014
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1015
                                                        Schema: &apiextv1.JSONSchemaProps{
1016
                                                                Type: "string",
1017
                                                        },
1018
                                                },
1019
                                        },
1020
                                        "usersWithSecretRotation": {
1021
                                                Type:     "array",
1022
                                                Nullable: true,
1023
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1024
                                                        Schema: &apiextv1.JSONSchemaProps{
1025
                                                                Type: "string",
1026
                                                        },
1027
                                                },
1028
                                        },
1029
                                        "volume": {
1030
                                                Type:     "object",
1031
                                                Required: []string{"size"},
1032
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1033
                                                        "isSubPathExpr": {
1034
                                                                Type: "boolean",
1035
                                                        },
1036
                                                        "iops": {
1037
                                                                Type: "integer",
1038
                                                        },
1039
                                                        "selector": {
1040
                                                                Type: "object",
1041
                                                                Properties: map[string]apiextv1.JSONSchemaProps{
1042
                                                                        "matchExpressions": {
1043
                                                                                Type: "array",
1044
                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1045
                                                                                        Schema: &apiextv1.JSONSchemaProps{
1046
                                                                                                Type:     "object",
1047
                                                                                                Required: []string{"key", "operator"},
1048
                                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
1049
                                                                                                        "key": {
1050
                                                                                                                Type: "string",
1051
                                                                                                        },
1052
                                                                                                        "operator": {
1053
                                                                                                                Type: "string",
1054
                                                                                                                Enum: []apiextv1.JSON{
1055
                                                                                                                        {
1056
                                                                                                                                Raw: []byte(`"DoesNotExist"`),
1057
                                                                                                                        },
1058
                                                                                                                        {
1059
                                                                                                                                Raw: []byte(`"Exists"`),
1060
                                                                                                                        },
1061
                                                                                                                        {
1062
                                                                                                                                Raw: []byte(`"In"`),
1063
                                                                                                                        },
1064
                                                                                                                        {
1065
                                                                                                                                Raw: []byte(`"NotIn"`),
1066
                                                                                                                        },
1067
                                                                                                                },
1068
                                                                                                        },
1069
                                                                                                        "values": {
1070
                                                                                                                Type: "array",
1071
                                                                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1072
                                                                                                                        Schema: &apiextv1.JSONSchemaProps{
1073
                                                                                                                                Type: "string",
1074
                                                                                                                        },
1075
                                                                                                                },
1076
                                                                                                        },
1077
                                                                                                },
1078
                                                                                        },
1079
                                                                                },
1080
                                                                        },
1081
                                                                        "matchLabels": {
1082
                                                                                Type:                   "object",
1083
                                                                                XPreserveUnknownFields: util.True(),
1084
                                                                        },
1085
                                                                },
1086
                                                        },
1087
                                                        "size": {
1088
                                                                Type:    "string",
1089
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
1090
                                                        },
1091
                                                        "storageClass": {
1092
                                                                Type: "string",
1093
                                                        },
1094
                                                        "subPath": {
1095
                                                                Type: "string",
1096
                                                        },
1097
                                                        "throughput": {
1098
                                                                Type: "integer",
1099
                                                        },
1100
                                                },
1101
                                        },
1102
                                },
1103
                        },
1104
                        "status": {
1105
                                Type: "object",
1106
                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
1107
                                        Schema: &apiextv1.JSONSchemaProps{
1108
                                                Type: "string",
1109
                                        },
1110
                                },
1111
                        },
1112
                },
1113
        },
1114
}
1115

1116
// OperatorConfigCRDResourceValidation to check applied manifest parameters
1117
var OperatorConfigCRDResourceValidation = apiextv1.CustomResourceValidation{
1118
        OpenAPIV3Schema: &apiextv1.JSONSchemaProps{
1119
                Type:     "object",
1120
                Required: []string{"kind", "apiVersion", "configuration"},
1121
                Properties: map[string]apiextv1.JSONSchemaProps{
1122
                        "kind": {
1123
                                Type: "string",
1124
                                Enum: []apiextv1.JSON{
1125
                                        {
1126
                                                Raw: []byte(`"OperatorConfiguration"`),
1127
                                        },
1128
                                },
1129
                        },
1130
                        "apiVersion": {
1131
                                Type: "string",
1132
                                Enum: []apiextv1.JSON{
1133
                                        {
1134
                                                Raw: []byte(`"acid.zalan.do/v1"`),
1135
                                        },
1136
                                },
1137
                        },
1138
                        "configuration": {
1139
                                Type: "object",
1140
                                Properties: map[string]apiextv1.JSONSchemaProps{
1141
                                        "crd_categories": {
1142
                                                Type:     "array",
1143
                                                Nullable: true,
1144
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1145
                                                        Schema: &apiextv1.JSONSchemaProps{
1146
                                                                Type: "string",
1147
                                                        },
1148
                                                },
1149
                                        },
1150
                                        "docker_image": {
1151
                                                Type: "string",
1152
                                        },
1153
                                        "enable_crd_registration": {
1154
                                                Type: "boolean",
1155
                                        },
1156
                                        "enable_crd_validation": {
1157
                                                Type:        "boolean",
1158
                                                Description: "deprecated",
1159
                                        },
1160
                                        "enable_lazy_spilo_upgrade": {
1161
                                                Type: "boolean",
1162
                                        },
1163
                                        "enable_shm_volume": {
1164
                                                Type: "boolean",
1165
                                        },
1166
                                        "enable_spilo_wal_path_compat": {
1167
                                                Type:        "boolean",
1168
                                                Description: "deprecated",
1169
                                        },
1170
                                        "enable_team_id_clustername_prefix": {
1171
                                                Type: "boolean",
1172
                                        },
1173
                                        "etcd_host": {
1174
                                                Type: "string",
1175
                                        },
1176
                                        "ignore_instance_limits_annotation_key": {
1177
                                                Type: "string",
1178
                                        },
1179
                                        "kubernetes_use_configmaps": {
1180
                                                Type: "boolean",
1181
                                        },
1182
                                        "max_instances": {
1183
                                                Type:        "integer",
1184
                                                Description: "-1 = disabled",
1185
                                                Minimum:     &minDisable,
1186
                                        },
1187
                                        "min_instances": {
1188
                                                Type:        "integer",
1189
                                                Description: "-1 = disabled",
1190
                                                Minimum:     &minDisable,
1191
                                        },
1192
                                        "resync_period": {
1193
                                                Type: "string",
1194
                                        },
1195
                                        "repair_period": {
1196
                                                Type: "string",
1197
                                        },
1198
                                        "set_memory_request_to_limit": {
1199
                                                Type: "boolean",
1200
                                        },
1201
                                        "sidecar_docker_images": {
1202
                                                Type: "object",
1203
                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
1204
                                                        Schema: &apiextv1.JSONSchemaProps{
1205
                                                                Type: "string",
1206
                                                        },
1207
                                                },
1208
                                        },
1209
                                        "sidecars": {
1210
                                                Type:     "array",
1211
                                                Nullable: true,
1212
                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1213
                                                        Schema: &apiextv1.JSONSchemaProps{
1214
                                                                Type:                   "object",
1215
                                                                XPreserveUnknownFields: util.True(),
1216
                                                        },
1217
                                                },
1218
                                        },
1219
                                        "workers": {
1220
                                                Type:    "integer",
1221
                                                Minimum: &min1,
1222
                                        },
1223
                                        "users": {
1224
                                                Type: "object",
1225
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1226
                                                        "additional_owner_roles": {
1227
                                                                Type:     "array",
1228
                                                                Nullable: true,
1229
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1230
                                                                        Schema: &apiextv1.JSONSchemaProps{
1231
                                                                                Type: "string",
1232
                                                                        },
1233
                                                                },
1234
                                                        },
1235
                                                        "enable_password_rotation": {
1236
                                                                Type: "boolean",
1237
                                                        },
1238
                                                        "password_rotation_interval": {
1239
                                                                Type: "integer",
1240
                                                        },
1241
                                                        "password_rotation_user_retention": {
1242
                                                                Type: "integer",
1243
                                                        },
1244
                                                        "replication_username": {
1245
                                                                Type: "string",
1246
                                                        },
1247
                                                        "super_username": {
1248
                                                                Type: "string",
1249
                                                        },
1250
                                                },
1251
                                        },
1252
                                        "major_version_upgrade": {
1253
                                                Type: "object",
1254
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1255
                                                        "major_version_upgrade_mode": {
1256
                                                                Type: "string",
1257
                                                        },
1258
                                                        "major_version_upgrade_team_allow_list": {
1259
                                                                Type: "array",
1260
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1261
                                                                        Schema: &apiextv1.JSONSchemaProps{
1262
                                                                                Type: "string",
1263
                                                                        },
1264
                                                                },
1265
                                                        },
1266
                                                        "minimal_major_version": {
1267
                                                                Type: "string",
1268
                                                        },
1269
                                                        "target_major_version": {
1270
                                                                Type: "string",
1271
                                                        },
1272
                                                },
1273
                                        },
1274
                                        "kubernetes": {
1275
                                                Type: "object",
1276
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1277
                                                        "additional_pod_capabilities": {
1278
                                                                Type: "array",
1279
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1280
                                                                        Schema: &apiextv1.JSONSchemaProps{
1281
                                                                                Type: "string",
1282
                                                                        },
1283
                                                                },
1284
                                                        },
1285
                                                        "cluster_domain": {
1286
                                                                Type: "string",
1287
                                                        },
1288
                                                        "cluster_labels": {
1289
                                                                Type: "object",
1290
                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
1291
                                                                        Schema: &apiextv1.JSONSchemaProps{
1292
                                                                                Type: "string",
1293
                                                                        },
1294
                                                                },
1295
                                                        },
1296
                                                        "cluster_name_label": {
1297
                                                                Type: "string",
1298
                                                        },
1299
                                                        "custom_pod_annotations": {
1300
                                                                Type: "object",
1301
                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
1302
                                                                        Schema: &apiextv1.JSONSchemaProps{
1303
                                                                                Type: "string",
1304
                                                                        },
1305
                                                                },
1306
                                                        },
1307
                                                        "delete_annotation_date_key": {
1308
                                                                Type: "string",
1309
                                                        },
1310
                                                        "delete_annotation_name_key": {
1311
                                                                Type: "string",
1312
                                                        },
1313
                                                        "downscaler_annotations": {
1314
                                                                Type: "array",
1315
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1316
                                                                        Schema: &apiextv1.JSONSchemaProps{
1317
                                                                                Type: "string",
1318
                                                                        },
1319
                                                                },
1320
                                                        },
1321
                                                        "enable_cross_namespace_secret": {
1322
                                                                Type: "boolean",
1323
                                                        },
1324
                                                        "enable_finalizers": {
1325
                                                                Type: "boolean",
1326
                                                        },
1327
                                                        "enable_init_containers": {
1328
                                                                Type: "boolean",
1329
                                                        },
1330
                                                        "enable_owner_references": {
1331
                                                                Type: "boolean",
1332
                                                        },
1333
                                                        "enable_persistent_volume_claim_deletion": {
1334
                                                                Type: "boolean",
1335
                                                        },
1336
                                                        "enable_pod_antiaffinity": {
1337
                                                                Type: "boolean",
1338
                                                        },
1339
                                                        "enable_pod_disruption_budget": {
1340
                                                                Type: "boolean",
1341
                                                        },
1342
                                                        "enable_readiness_probe": {
1343
                                                                Type: "boolean",
1344
                                                        },
1345
                                                        "enable_secrets_deletion": {
1346
                                                                Type: "boolean",
1347
                                                        },
1348
                                                        "enable_sidecars": {
1349
                                                                Type: "boolean",
1350
                                                        },
1351
                                                        "ignored_annotations": {
1352
                                                                Type: "array",
1353
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1354
                                                                        Schema: &apiextv1.JSONSchemaProps{
1355
                                                                                Type: "string",
1356
                                                                        },
1357
                                                                },
1358
                                                        },
1359
                                                        "infrastructure_roles_secret_name": {
1360
                                                                Type: "string",
1361
                                                        },
1362
                                                        "infrastructure_roles_secrets": {
1363
                                                                Type:     "array",
1364
                                                                Nullable: true,
1365
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1366
                                                                        Schema: &apiextv1.JSONSchemaProps{
1367
                                                                                Type:     "object",
1368
                                                                                Required: []string{"secretname", "userkey", "passwordkey"},
1369
                                                                                Properties: map[string]apiextv1.JSONSchemaProps{
1370
                                                                                        "secretname": {
1371
                                                                                                Type: "string",
1372
                                                                                        },
1373
                                                                                        "userkey": {
1374
                                                                                                Type: "string",
1375
                                                                                        },
1376
                                                                                        "passwordkey": {
1377
                                                                                                Type: "string",
1378
                                                                                        },
1379
                                                                                        "rolekey": {
1380
                                                                                                Type: "string",
1381
                                                                                        },
1382
                                                                                        "defaultuservalue": {
1383
                                                                                                Type: "string",
1384
                                                                                        },
1385
                                                                                        "defaultrolevalue": {
1386
                                                                                                Type: "string",
1387
                                                                                        },
1388
                                                                                        "details": {
1389
                                                                                                Type: "string",
1390
                                                                                        },
1391
                                                                                        "template": {
1392
                                                                                                Type: "boolean",
1393
                                                                                        },
1394
                                                                                },
1395
                                                                        },
1396
                                                                },
1397
                                                        },
1398
                                                        "inherited_annotations": {
1399
                                                                Type: "array",
1400
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1401
                                                                        Schema: &apiextv1.JSONSchemaProps{
1402
                                                                                Type: "string",
1403
                                                                        },
1404
                                                                },
1405
                                                        },
1406
                                                        "inherited_labels": {
1407
                                                                Type: "array",
1408
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1409
                                                                        Schema: &apiextv1.JSONSchemaProps{
1410
                                                                                Type: "string",
1411
                                                                        },
1412
                                                                },
1413
                                                        },
1414
                                                        "master_pod_move_timeout": {
1415
                                                                Type: "string",
1416
                                                        },
1417
                                                        "node_readiness_label": {
1418
                                                                Type: "object",
1419
                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
1420
                                                                        Schema: &apiextv1.JSONSchemaProps{
1421
                                                                                Type: "string",
1422
                                                                        },
1423
                                                                },
1424
                                                        },
1425
                                                        "node_readiness_label_merge": {
1426
                                                                Type: "string",
1427
                                                                Enum: []apiextv1.JSON{
1428
                                                                        {
1429
                                                                                Raw: []byte(`"AND"`),
1430
                                                                        },
1431
                                                                        {
1432
                                                                                Raw: []byte(`"OR"`),
1433
                                                                        },
1434
                                                                },
1435
                                                        },
1436
                                                        "oauth_token_secret_name": {
1437
                                                                Type: "string",
1438
                                                        },
1439
                                                        "pdb_name_format": {
1440
                                                                Type: "string",
1441
                                                        },
1442
                                                        "pdb_master_label_selector": {
1443
                                                                Type: "boolean",
1444
                                                        },
1445
                                                        "persistent_volume_claim_retention_policy": {
1446
                                                                Type: "object",
1447
                                                                Properties: map[string]apiextv1.JSONSchemaProps{
1448
                                                                        "when_deleted": {
1449
                                                                                Type: "string",
1450
                                                                                Enum: []apiextv1.JSON{
1451
                                                                                        {
1452
                                                                                                Raw: []byte(`"delete"`),
1453
                                                                                        },
1454
                                                                                        {
1455
                                                                                                Raw: []byte(`"retain"`),
1456
                                                                                        },
1457
                                                                                },
1458
                                                                        },
1459
                                                                        "when_scaled": {
1460
                                                                                Type: "string",
1461
                                                                                Enum: []apiextv1.JSON{
1462
                                                                                        {
1463
                                                                                                Raw: []byte(`"delete"`),
1464
                                                                                        },
1465
                                                                                        {
1466
                                                                                                Raw: []byte(`"retain"`),
1467
                                                                                        },
1468
                                                                                },
1469
                                                                        },
1470
                                                                },
1471
                                                        },
1472
                                                        "pod_antiaffinity_preferred_during_scheduling": {
1473
                                                                Type: "boolean",
1474
                                                        },
1475
                                                        "pod_antiaffinity_topology_key": {
1476
                                                                Type: "string",
1477
                                                        },
1478
                                                        "pod_environment_configmap": {
1479
                                                                Type: "string",
1480
                                                        },
1481
                                                        "pod_environment_secret": {
1482
                                                                Type: "string",
1483
                                                        },
1484
                                                        "pod_management_policy": {
1485
                                                                Type: "string",
1486
                                                                Enum: []apiextv1.JSON{
1487
                                                                        {
1488
                                                                                Raw: []byte(`"ordered_ready"`),
1489
                                                                        },
1490
                                                                        {
1491
                                                                                Raw: []byte(`"parallel"`),
1492
                                                                        },
1493
                                                                },
1494
                                                        },
1495
                                                        "pod_priority_class_name": {
1496
                                                                Type: "string",
1497
                                                        },
1498
                                                        "pod_role_label": {
1499
                                                                Type: "string",
1500
                                                        },
1501
                                                        "pod_service_account_definition": {
1502
                                                                Type: "string",
1503
                                                        },
1504
                                                        "pod_service_account_name": {
1505
                                                                Type: "string",
1506
                                                        },
1507
                                                        "pod_service_account_role_binding_definition": {
1508
                                                                Type: "string",
1509
                                                        },
1510
                                                        "pod_terminate_grace_period": {
1511
                                                                Type: "string",
1512
                                                        },
1513
                                                        "secret_name_template": {
1514
                                                                Type: "string",
1515
                                                        },
1516
                                                        "share_pgsocket_with_sidecars": {
1517
                                                                Type: "boolean",
1518
                                                        },
1519
                                                        "spilo_runasuser": {
1520
                                                                Type: "integer",
1521
                                                        },
1522
                                                        "spilo_runasgroup": {
1523
                                                                Type: "integer",
1524
                                                        },
1525
                                                        "spilo_fsgroup": {
1526
                                                                Type: "integer",
1527
                                                        },
1528
                                                        "spilo_privileged": {
1529
                                                                Type: "boolean",
1530
                                                        },
1531
                                                        "spilo_allow_privilege_escalation": {
1532
                                                                Type: "boolean",
1533
                                                        },
1534
                                                        "storage_resize_mode": {
1535
                                                                Type: "string",
1536
                                                                Enum: []apiextv1.JSON{
1537
                                                                        {
1538
                                                                                Raw: []byte(`"ebs"`),
1539
                                                                        },
1540
                                                                        {
1541
                                                                                Raw: []byte(`"mixed"`),
1542
                                                                        },
1543
                                                                        {
1544
                                                                                Raw: []byte(`"pvc"`),
1545
                                                                        },
1546
                                                                        {
1547
                                                                                Raw: []byte(`"off"`),
1548
                                                                        },
1549
                                                                },
1550
                                                        },
1551
                                                        "toleration": {
1552
                                                                Type: "object",
1553
                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
1554
                                                                        Schema: &apiextv1.JSONSchemaProps{
1555
                                                                                Type: "string",
1556
                                                                        },
1557
                                                                },
1558
                                                        },
1559
                                                        "watched_namespace": {
1560
                                                                Type: "string",
1561
                                                        },
1562
                                                },
1563
                                        },
1564
                                        "patroni": {
1565
                                                Type: "object",
1566
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1567
                                                        "enable_patroni_failsafe_mode": {
1568
                                                                Type: "boolean",
1569
                                                        },
1570
                                                },
1571
                                        },
1572
                                        "postgres_pod_resources": {
1573
                                                Type: "object",
1574
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1575
                                                        "default_cpu_limit": {
1576
                                                                Type:    "string",
1577
                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$|^$",
1578
                                                        },
1579
                                                        "default_cpu_request": {
1580
                                                                Type:    "string",
1581
                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$|^$",
1582
                                                        },
1583
                                                        "default_memory_limit": {
1584
                                                                Type:    "string",
1585
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$|^$",
1586
                                                        },
1587
                                                        "default_memory_request": {
1588
                                                                Type:    "string",
1589
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$|^$",
1590
                                                        },
1591
                                                        "max_cpu_request": {
1592
                                                                Type:    "string",
1593
                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$|^$",
1594
                                                        },
1595
                                                        "max_memory_request": {
1596
                                                                Type:    "string",
1597
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$|^$",
1598
                                                        },
1599
                                                        "min_cpu_limit": {
1600
                                                                Type:    "string",
1601
                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$|^$",
1602
                                                        },
1603
                                                        "min_memory_limit": {
1604
                                                                Type:    "string",
1605
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$|^$",
1606
                                                        },
1607
                                                },
1608
                                        },
1609
                                        "timeouts": {
1610
                                                Type: "object",
1611
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1612
                                                        "patroni_api_check_interval": {
1613
                                                                Type: "string",
1614
                                                        },
1615
                                                        "patroni_api_check_timeout": {
1616
                                                                Type: "string",
1617
                                                        },
1618
                                                        "pod_label_wait_timeout": {
1619
                                                                Type: "string",
1620
                                                        },
1621
                                                        "pod_deletion_wait_timeout": {
1622
                                                                Type: "string",
1623
                                                        },
1624
                                                        "ready_wait_interval": {
1625
                                                                Type: "string",
1626
                                                        },
1627
                                                        "ready_wait_timeout": {
1628
                                                                Type: "string",
1629
                                                        },
1630
                                                        "resource_check_interval": {
1631
                                                                Type: "string",
1632
                                                        },
1633
                                                        "resource_check_timeout": {
1634
                                                                Type: "string",
1635
                                                        },
1636
                                                },
1637
                                        },
1638
                                        "load_balancer": {
1639
                                                Type: "object",
1640
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1641
                                                        "custom_service_annotations": {
1642
                                                                Type: "object",
1643
                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
1644
                                                                        Schema: &apiextv1.JSONSchemaProps{
1645
                                                                                Type: "string",
1646
                                                                        },
1647
                                                                },
1648
                                                        },
1649
                                                        "db_hosted_zone": {
1650
                                                                Type: "string",
1651
                                                        },
1652
                                                        "enable_master_load_balancer": {
1653
                                                                Type: "boolean",
1654
                                                        },
1655
                                                        "enable_master_pooler_load_balancer": {
1656
                                                                Type: "boolean",
1657
                                                        },
1658
                                                        "enable_replica_load_balancer": {
1659
                                                                Type: "boolean",
1660
                                                        },
1661
                                                        "enable_replica_pooler_load_balancer": {
1662
                                                                Type: "boolean",
1663
                                                        },
1664
                                                        "external_traffic_policy": {
1665
                                                                Type: "string",
1666
                                                                Enum: []apiextv1.JSON{
1667
                                                                        {
1668
                                                                                Raw: []byte(`"Cluster"`),
1669
                                                                        },
1670
                                                                        {
1671
                                                                                Raw: []byte(`"Local"`),
1672
                                                                        },
1673
                                                                },
1674
                                                        },
1675
                                                        "master_dns_name_format": {
1676
                                                                Type: "string",
1677
                                                        },
1678
                                                        "master_legacy_dns_name_format": {
1679
                                                                Type: "string",
1680
                                                        },
1681
                                                        "replica_dns_name_format": {
1682
                                                                Type: "string",
1683
                                                        },
1684
                                                        "replica_legacy_dns_name_format": {
1685
                                                                Type: "string",
1686
                                                        },
1687
                                                },
1688
                                        },
1689
                                        "aws_or_gcp": {
1690
                                                Type: "object",
1691
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1692
                                                        "additional_secret_mount": {
1693
                                                                Type: "string",
1694
                                                        },
1695
                                                        "additional_secret_mount_path": {
1696
                                                                Type: "string",
1697
                                                        },
1698
                                                        "aws_region": {
1699
                                                                Type: "string",
1700
                                                        },
1701
                                                        "enable_ebs_gp3_migration": {
1702
                                                                Type: "boolean",
1703
                                                        },
1704
                                                        "enable_ebs_gp3_migration_max_size": {
1705
                                                                Type: "integer",
1706
                                                        },
1707
                                                        "gcp_credentials": {
1708
                                                                Type: "string",
1709
                                                        },
1710
                                                        "kube_iam_role": {
1711
                                                                Type: "string",
1712
                                                        },
1713
                                                        "log_s3_bucket": {
1714
                                                                Type: "string",
1715
                                                        },
1716
                                                        "wal_s3_bucket": {
1717
                                                                Type: "string",
1718
                                                        },
1719
                                                },
1720
                                        },
1721
                                        "logical_backup": {
1722
                                                Type: "object",
1723
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1724
                                                        "logical_backup_azure_storage_account_name": {
1725
                                                                Type: "string",
1726
                                                        },
1727
                                                        "logical_backup_azure_storage_container": {
1728
                                                                Type: "string",
1729
                                                        },
1730
                                                        "logical_backup_azure_storage_account_key": {
1731
                                                                Type: "string",
1732
                                                        },
1733
                                                        "logical_backup_cpu_limit": {
1734
                                                                Type:    "string",
1735
                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$",
1736
                                                        },
1737
                                                        "logical_backup_cpu_request": {
1738
                                                                Type:    "string",
1739
                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$",
1740
                                                        },
1741
                                                        "logical_backup_docker_image": {
1742
                                                                Type: "string",
1743
                                                        },
1744
                                                        "logical_backup_google_application_credentials": {
1745
                                                                Type: "string",
1746
                                                        },
1747
                                                        "logical_backup_job_prefix": {
1748
                                                                Type: "string",
1749
                                                        },
1750
                                                        "logical_backup_memory_limit": {
1751
                                                                Type:    "string",
1752
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
1753
                                                        },
1754
                                                        "logical_backup_memory_request": {
1755
                                                                Type:    "string",
1756
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
1757
                                                        },
1758
                                                        "logical_backup_provider": {
1759
                                                                Type: "string",
1760
                                                                Enum: []apiextv1.JSON{
1761
                                                                        {
1762
                                                                                Raw: []byte(`"az"`),
1763
                                                                        },
1764
                                                                        {
1765
                                                                                Raw: []byte(`"gcs"`),
1766
                                                                        },
1767
                                                                        {
1768
                                                                                Raw: []byte(`"s3"`),
1769
                                                                        },
1770
                                                                },
1771
                                                        },
1772
                                                        "logical_backup_s3_access_key_id": {
1773
                                                                Type: "string",
1774
                                                        },
1775
                                                        "logical_backup_s3_bucket": {
1776
                                                                Type: "string",
1777
                                                        },
1778
                                                        "logical_backup_s3_bucket_prefix": {
1779
                                                                Type: "string",
1780
                                                        },
1781
                                                        "logical_backup_s3_endpoint": {
1782
                                                                Type: "string",
1783
                                                        },
1784
                                                        "logical_backup_s3_region": {
1785
                                                                Type: "string",
1786
                                                        },
1787
                                                        "logical_backup_s3_secret_access_key": {
1788
                                                                Type: "string",
1789
                                                        },
1790
                                                        "logical_backup_s3_sse": {
1791
                                                                Type: "string",
1792
                                                        },
1793
                                                        "logical_backup_s3_retention_time": {
1794
                                                                Type: "string",
1795
                                                        },
1796
                                                        "logical_backup_schedule": {
1797
                                                                Type:    "string",
1798
                                                                Pattern: "^(\\d+|\\*)(/\\d+)?(\\s+(\\d+|\\*)(/\\d+)?){4}$",
1799
                                                        },
1800
                                                        "logical_backup_cronjob_environment_secret": {
1801
                                                                Type: "string",
1802
                                                        },
1803
                                                },
1804
                                        },
1805
                                        "debug": {
1806
                                                Type: "object",
1807
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1808
                                                        "debug_logging": {
1809
                                                                Type: "boolean",
1810
                                                        },
1811
                                                        "enable_database_access": {
1812
                                                                Type: "boolean",
1813
                                                        },
1814
                                                },
1815
                                        },
1816
                                        "teams_api": {
1817
                                                Type: "object",
1818
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1819
                                                        "enable_admin_role_for_users": {
1820
                                                                Type: "boolean",
1821
                                                        },
1822
                                                        "enable_postgres_team_crd": {
1823
                                                                Type: "boolean",
1824
                                                        },
1825
                                                        "enable_postgres_team_crd_superusers": {
1826
                                                                Type: "boolean",
1827
                                                        },
1828
                                                        "enable_team_member_deprecation": {
1829
                                                                Type: "boolean",
1830
                                                        },
1831
                                                        "enable_team_superuser": {
1832
                                                                Type: "boolean",
1833
                                                        },
1834
                                                        "enable_teams_api": {
1835
                                                                Type: "boolean",
1836
                                                        },
1837
                                                        "pam_configuration": {
1838
                                                                Type: "string",
1839
                                                        },
1840
                                                        "pam_role_name": {
1841
                                                                Type: "string",
1842
                                                        },
1843
                                                        "postgres_superuser_teams": {
1844
                                                                Type: "array",
1845
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1846
                                                                        Schema: &apiextv1.JSONSchemaProps{
1847
                                                                                Type: "string",
1848
                                                                        },
1849
                                                                },
1850
                                                        },
1851
                                                        "protected_role_names": {
1852
                                                                Type: "array",
1853
                                                                Items: &apiextv1.JSONSchemaPropsOrArray{
1854
                                                                        Schema: &apiextv1.JSONSchemaProps{
1855
                                                                                Type: "string",
1856
                                                                        },
1857
                                                                },
1858
                                                        },
1859
                                                        "role_deletion_suffix": {
1860
                                                                Type: "string",
1861
                                                        },
1862
                                                        "team_admin_role": {
1863
                                                                Type: "string",
1864
                                                        },
1865
                                                        "team_api_role_configuration": {
1866
                                                                Type: "object",
1867
                                                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
1868
                                                                        Schema: &apiextv1.JSONSchemaProps{
1869
                                                                                Type: "string",
1870
                                                                        },
1871
                                                                },
1872
                                                        },
1873
                                                        "teams_api_url": {
1874
                                                                Type: "string",
1875
                                                        },
1876
                                                },
1877
                                        },
1878
                                        "logging_rest_api": {
1879
                                                Type: "object",
1880
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1881
                                                        "api_port": {
1882
                                                                Type: "integer",
1883
                                                        },
1884
                                                        "cluster_history_entries": {
1885
                                                                Type: "integer",
1886
                                                        },
1887
                                                        "ring_log_lines": {
1888
                                                                Type: "integer",
1889
                                                        },
1890
                                                },
1891
                                        },
1892
                                        "scalyr": {
1893
                                                Type: "object",
1894
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1895
                                                        "scalyr_api_key": {
1896
                                                                Type: "string",
1897
                                                        },
1898
                                                        "scalyr_cpu_limit": {
1899
                                                                Type:    "string",
1900
                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$",
1901
                                                        },
1902
                                                        "scalyr_cpu_request": {
1903
                                                                Type:    "string",
1904
                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$",
1905
                                                        },
1906
                                                        "scalyr_image": {
1907
                                                                Type: "string",
1908
                                                        },
1909
                                                        "scalyr_memory_limit": {
1910
                                                                Type:    "string",
1911
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
1912
                                                        },
1913
                                                        "scalyr_memory_request": {
1914
                                                                Type:    "string",
1915
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
1916
                                                        },
1917
                                                        "scalyr_server_url": {
1918
                                                                Type: "string",
1919
                                                        },
1920
                                                },
1921
                                        },
1922
                                        "connection_pooler": {
1923
                                                Type: "object",
1924
                                                Properties: map[string]apiextv1.JSONSchemaProps{
1925
                                                        "connection_pooler_default_cpu_limit": {
1926
                                                                Type:    "string",
1927
                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$",
1928
                                                        },
1929
                                                        "connection_pooler_default_cpu_request": {
1930
                                                                Type:    "string",
1931
                                                                Pattern: "^(\\d+m|\\d+(\\.\\d{1,3})?)$",
1932
                                                        },
1933
                                                        "connection_pooler_default_memory_limit": {
1934
                                                                Type:    "string",
1935
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
1936
                                                        },
1937
                                                        "connection_pooler_default_memory_request": {
1938
                                                                Type:    "string",
1939
                                                                Pattern: "^(\\d+(e\\d+)?|\\d+(\\.\\d+)?(e\\d+)?[EPTGMK]i?)$",
1940
                                                        },
1941
                                                        "connection_pooler_image": {
1942
                                                                Type: "string",
1943
                                                        },
1944
                                                        "connection_pooler_max_db_connections": {
1945
                                                                Type: "integer",
1946
                                                        },
1947
                                                        "connection_pooler_mode": {
1948
                                                                Type: "string",
1949
                                                                Enum: []apiextv1.JSON{
1950
                                                                        {
1951
                                                                                Raw: []byte(`"session"`),
1952
                                                                        },
1953
                                                                        {
1954
                                                                                Raw: []byte(`"transaction"`),
1955
                                                                        },
1956
                                                                },
1957
                                                        },
1958
                                                        "connection_pooler_number_of_instances": {
1959
                                                                Type:    "integer",
1960
                                                                Minimum: &min1,
1961
                                                        },
1962
                                                        "connection_pooler_schema": {
1963
                                                                Type: "string",
1964
                                                        },
1965
                                                        "connection_pooler_user": {
1966
                                                                Type: "string",
1967
                                                        },
1968
                                                },
1969
                                        },
1970
                                },
1971
                        },
1972
                        "status": {
1973
                                Type: "object",
1974
                                AdditionalProperties: &apiextv1.JSONSchemaPropsOrBool{
1975
                                        Schema: &apiextv1.JSONSchemaProps{
1976
                                                Type: "string",
1977
                                        },
1978
                                },
1979
                        },
1980
                },
1981
        },
1982
}
1983

1984
func buildCRD(name, kind, plural, list, short string,
1985
        categories []string,
1986
        columns []apiextv1.CustomResourceColumnDefinition,
1987
        validation apiextv1.CustomResourceValidation) *apiextv1.CustomResourceDefinition {
×
1988
        return &apiextv1.CustomResourceDefinition{
×
1989
                TypeMeta: metav1.TypeMeta{
×
1990
                        APIVersion: fmt.Sprintf("%s/%s", apiextv1.GroupName, apiextv1.SchemeGroupVersion.Version),
×
1991
                        Kind:       "CustomResourceDefinition",
×
1992
                },
×
1993
                ObjectMeta: metav1.ObjectMeta{
×
1994
                        Name: name,
×
1995
                },
×
1996
                Spec: apiextv1.CustomResourceDefinitionSpec{
×
1997
                        Group: SchemeGroupVersion.Group,
×
1998
                        Names: apiextv1.CustomResourceDefinitionNames{
×
1999
                                Kind:       kind,
×
2000
                                ListKind:   list,
×
2001
                                Plural:     plural,
×
2002
                                Singular:   kind,
×
2003
                                ShortNames: []string{short},
×
2004
                                Categories: categories,
×
2005
                        },
×
2006
                        Scope: apiextv1.NamespaceScoped,
×
2007
                        Versions: []apiextv1.CustomResourceDefinitionVersion{
×
2008
                                {
×
2009
                                        Name:    SchemeGroupVersion.Version,
×
2010
                                        Served:  true,
×
2011
                                        Storage: true,
×
2012
                                        Subresources: &apiextv1.CustomResourceSubresources{
×
2013
                                                Status: &apiextv1.CustomResourceSubresourceStatus{},
×
2014
                                        },
×
2015
                                        AdditionalPrinterColumns: columns,
×
2016
                                        Schema:                   &validation,
×
2017
                                },
×
2018
                        },
×
2019
                },
×
2020
        }
×
2021
}
×
2022

2023
// PostgresCRD returns CustomResourceDefinition built from PostgresCRDResource
2024
func PostgresCRD(crdCategories []string) *apiextv1.CustomResourceDefinition {
×
2025
        return buildCRD(PostgresCRDResouceName,
×
2026
                PostgresCRDResourceKind,
×
2027
                PostgresCRDResourcePlural,
×
2028
                PostgresCRDResourceList,
×
2029
                PostgresCRDResourceShort,
×
2030
                crdCategories,
×
2031
                PostgresCRDResourceColumns,
×
2032
                PostgresCRDResourceValidation)
×
2033
}
×
2034

2035
// ConfigurationCRD returns CustomResourceDefinition built from OperatorConfigCRDResource
2036
func ConfigurationCRD(crdCategories []string) *apiextv1.CustomResourceDefinition {
×
2037
        return buildCRD(OperatorConfigCRDResourceName,
×
2038
                OperatorConfigCRDResouceKind,
×
2039
                OperatorConfigCRDResourcePlural,
×
2040
                OperatorConfigCRDResourceList,
×
2041
                OperatorConfigCRDResourceShort,
×
2042
                crdCategories,
×
2043
                OperatorConfigCRDResourceColumns,
×
2044
                OperatorConfigCRDResourceValidation)
×
2045
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc