File tree Expand file tree Collapse file tree 4 files changed +26
-21
lines changed
charts/postgres-operator/templates Expand file tree Collapse file tree 4 files changed +26
-21
lines changed Original file line number Diff line number Diff line change 63
63
- services
64
64
verbs :
65
65
- create
66
+ {{- if toString .Values.configKubernetes.spilo_privileged | eq "true" }}
66
67
# to run privileged pods
67
68
- apiGroups :
68
69
- extensions
72
73
- privileged
73
74
verbs :
74
75
- use
76
+ {{- end }}
75
77
{{ end }}
Original file line number Diff line number Diff line change @@ -228,7 +228,8 @@ rules:
228
228
verbs :
229
229
- get
230
230
- create
231
- # to grant privilege to run privileged pods
231
+ {{- if toString .Values.configKubernetes.spilo_privileged | eq "true" }}
232
+ # to run privileged pods
232
233
- apiGroups :
233
234
- extensions
234
235
resources :
@@ -237,4 +238,5 @@ rules:
237
238
- privileged
238
239
verbs :
239
240
- use
241
+ {{- end }}
240
242
{{ end }}
Original file line number Diff line number Diff line change @@ -203,15 +203,15 @@ rules:
203
203
verbs :
204
204
- get
205
205
- create
206
- # to grant privilege to run privileged pods
207
- - apiGroups :
208
- - extensions
209
- resources :
210
- - podsecuritypolicies
211
- resourceNames :
212
- - privileged
213
- verbs :
214
- - use
206
+ # to grant privilege to run privileged pods (not needed by default)
207
+ # - apiGroups:
208
+ # - extensions
209
+ # resources:
210
+ # - podsecuritypolicies
211
+ # resourceNames:
212
+ # - privileged
213
+ # verbs:
214
+ # - use
215
215
216
216
---
217
217
apiVersion : rbac.authorization.k8s.io/v1
@@ -265,12 +265,12 @@ rules:
265
265
- services
266
266
verbs :
267
267
- create
268
- # to run privileged pods
269
- - apiGroups :
270
- - extensions
271
- resources :
272
- - podsecuritypolicies
273
- resourceNames :
274
- - privileged
275
- verbs :
276
- - use
268
+ # to grant privilege to run privileged pods (not needed by default)
269
+ # - apiGroups:
270
+ # - extensions
271
+ # resources:
272
+ # - podsecuritypolicies
273
+ # resourceNames:
274
+ # - privileged
275
+ # verbs:
276
+ # - use
Original file line number Diff line number Diff line change @@ -453,8 +453,9 @@ func generateContainer(
453
453
VolumeMounts : volumeMounts ,
454
454
Env : envVars ,
455
455
SecurityContext : & v1.SecurityContext {
456
- Privileged : & privilegedMode ,
457
- ReadOnlyRootFilesystem : util .False (),
456
+ AllowPrivilegeEscalation : & privilegedMode ,
457
+ Privileged : & privilegedMode ,
458
+ ReadOnlyRootFilesystem : util .False (),
458
459
},
459
460
}
460
461
}
You can’t perform that action at this time.
0 commit comments