Skip to content

Commit bb3618d

Browse files
committed
add supoort for initContainers and sidecars
1 parent eeb138f commit bb3618d

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

charts/postgres-operator/templates/customrresourcedefinition.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,18 @@ spec:
124124
type: boolean
125125
enableShmVolume:
126126
type: boolean
127+
init_containers: # deprecated
128+
type: array
129+
nullable: true
130+
items:
131+
type: object
132+
additionalProperties: true
133+
initContainers:
134+
type: array
135+
nullable: true
136+
items:
137+
type: object
138+
additionalProperties: true
127139
logicalBackupSchedule:
128140
type: string
129141
pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$'
@@ -253,6 +265,12 @@ spec:
253265
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
254266
# Note: the value specified here must not be zero or be higher
255267
# than the corresponding limit.
268+
sidecars:
269+
type: array
270+
nullable: true
271+
items:
272+
type: object
273+
additionalProperties: true
256274
spiloFSGroup:
257275
type: integer
258276
standby:

manifests/postgresql.crd.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ spec:
3636
- numberOfInstances
3737
- teamId
3838
- postgresql
39-
additionalProperties: true
4039
properties:
4140
allowedSourceRanges:
4241
type: array
@@ -85,6 +84,18 @@ spec:
8584
type: boolean
8685
enableShmVolume:
8786
type: boolean
87+
init_containers: # deprecated
88+
type: array
89+
nullable: true
90+
items:
91+
type: object
92+
additionalProperties: true
93+
initContainers:
94+
type: array
95+
nullable: true
96+
items:
97+
type: object
98+
additionalProperties: true
8899
logicalBackupSchedule:
89100
type: string
90101
pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$'
@@ -214,6 +225,12 @@ spec:
214225
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
215226
# Note: the value specified here must not be zero or be higher
216227
# than the corresponding limit.
228+
sidecars:
229+
type: array
230+
nullable: true
231+
items:
232+
type: object
233+
additionalProperties: true
217234
spiloFSGroup:
218235
type: integer
219236
standby:

pkg/apis/acid.zalan.do/v1/crds.go

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,29 @@ var PostgresCRDResourceValidation = apiextv1beta1.JSONSchemaProps{
199199
"enableShmVolume": {
200200
Type: "boolean",
201201
},
202+
"init_containers": {
203+
Type: "array",
204+
Description: "Deprecated",
205+
Items: &apiextv1beta1.JSONSchemaPropsOrArray{
206+
Schema: &apiextv1beta1.JSONSchemaProps{
207+
Type: "object",
208+
AdditionalProperties: &apiextv1beta1.JSONSchemaPropsOrBool{
209+
Allows: true,
210+
},
211+
},
212+
},
213+
},
214+
"initContainers": {
215+
Type: "array",
216+
Items: &apiextv1beta1.JSONSchemaPropsOrArray{
217+
Schema: &apiextv1beta1.JSONSchemaProps{
218+
Type: "object",
219+
AdditionalProperties: &apiextv1beta1.JSONSchemaPropsOrBool{
220+
Allows: true,
221+
},
222+
},
223+
},
224+
},
202225
"logicalBackupSchedule": {
203226
Type: "string",
204227
Pattern: "^(\\d+|\\*)(/\\d+)?(\\s+(\\d+|\\*)(/\\d+)?){4}$",
@@ -351,6 +374,17 @@ var PostgresCRDResourceValidation = apiextv1beta1.JSONSchemaProps{
351374
},
352375
},
353376
},
377+
"sidecars": {
378+
Type: "array",
379+
Items: &apiextv1beta1.JSONSchemaPropsOrArray{
380+
Schema: &apiextv1beta1.JSONSchemaProps{
381+
Type: "object",
382+
AdditionalProperties: &apiextv1beta1.JSONSchemaPropsOrBool{
383+
Allows: true,
384+
},
385+
},
386+
},
387+
},
354388
"spiloFSGroup": {
355389
Type: "integer",
356390
},

0 commit comments

Comments
 (0)