File tree 6 files changed +27
-10
lines changed
6 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 54
54
{{- end }}
55
55
resources :
56
56
{{ toYaml .Values.resources | indent 10 }}
57
+ securityContext :
58
+ {{ toYaml .Values.securityContext | indent 10 }}
57
59
{{- if .Values.imagePullSecrets }}
58
60
imagePullSecrets :
59
61
{{ toYaml .Values.imagePullSecrets | indent 8 }}
Original file line number Diff line number Diff line change @@ -359,18 +359,24 @@ resources:
359
359
cpu : 100m
360
360
memory : 250Mi
361
361
362
+ securityContext :
363
+ runAsUser : 1000
364
+ runAsNonRoot : true
365
+ readOnlyRootFilesystem : true
366
+ allowPrivilegeEscalation : false
367
+
362
368
# Affinity for pod assignment
363
369
# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
364
370
affinity : {}
365
371
366
- # Tolerations for pod assignment
367
- # Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
368
- tolerations : []
369
-
370
372
# Node labels for pod assignment
371
373
# Ref: https://kubernetes.io/docs/user-guide/node-selection/
372
374
nodeSelector : {}
373
375
376
+ # Tolerations for pod assignment
377
+ # Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
378
+ tolerations : []
379
+
374
380
controllerID :
375
381
# Specifies whether a controller ID should be defined for the operator
376
382
# Note, all postgres manifest must then contain the following annotation to be found by this operator
Original file line number Diff line number Diff line change @@ -354,18 +354,24 @@ resources:
354
354
cpu : 100m
355
355
memory : 250Mi
356
356
357
+ securityContext :
358
+ runAsUser : 1000
359
+ runAsNonRoot : true
360
+ readOnlyRootFilesystem : true
361
+ allowPrivilegeEscalation : false
362
+
357
363
# Affinity for pod assignment
358
364
# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
359
365
affinity : {}
360
366
361
- # Tolerations for pod assignment
362
- # Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
363
- tolerations : []
364
-
365
367
# Node labels for pod assignment
366
368
# Ref: https://kubernetes.io/docs/user-guide/node-selection/
367
369
nodeSelector : {}
368
370
371
+ # Tolerations for pod assignment
372
+ # Ref: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
373
+ tolerations : []
374
+
369
375
controllerID :
370
376
# Specifies whether a controller ID should be defined for the operator
371
377
# Note, all postgres manifest must then contain the following annotation to be found by this operator
Original file line number Diff line number Diff line change 45
45
size : 1Gi
46
46
# storageClass: my-sc
47
47
# iops: 1000 # for EBS gp3
48
- # throughput: 250 # in MB/s for EBS gp3
48
+ # throughput: 250 # in MB/s for EBS gp3
49
49
additionalVolumes :
50
50
- name : empty
51
51
mountPath : /opt/empty
Original file line number Diff line number Diff line change 32
32
runAsUser : 1000
33
33
runAsNonRoot : true
34
34
readOnlyRootFilesystem : true
35
+ allowPrivilegeEscalation : false
35
36
env :
36
37
# provided additional ENV vars can overwrite individual config map entries
37
38
- name : CONFIG_MAP_NAME
Original file line number Diff line number Diff line change @@ -280,6 +280,9 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
280
280
},
281
281
},
282
282
},
283
+ SecurityContext : & v1.SecurityContext {
284
+ AllowPrivilegeEscalation : util .False (),
285
+ },
283
286
}
284
287
285
288
podTemplate := & v1.PodTemplateSpec {
@@ -289,7 +292,6 @@ func (c *Cluster) generateConnectionPoolerPodTemplate(role PostgresRole) (
289
292
Annotations : c .annotationsSet (c .generatePodAnnotations (spec )),
290
293
},
291
294
Spec : v1.PodSpec {
292
- ServiceAccountName : c .OpConfig .PodServiceAccountName ,
293
295
TerminationGracePeriodSeconds : & gracePeriod ,
294
296
Containers : []v1.Container {poolerContainer },
295
297
// TODO: add tolerations to scheduler pooler on the same node
You can’t perform that action at this time.
0 commit comments