diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 37ba52c..f473f12 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -43,9 +43,7 @@ spec: {{- end }} {{- end }} spec: - {{- if .Values.serviceAccount.create }} serviceAccountName: {{ include "pgdog.serviceAccountName" . }} - {{- end }} {{- if .Values.priorityClassName }} priorityClassName: {{ .Values.priorityClassName }} {{- end }} @@ -60,6 +58,10 @@ spec: imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: pgdog {{- if .Values.image.name }} @@ -131,6 +133,10 @@ spec: {{- with .Values.extraVolumeMounts }} {{- toYaml . | nindent 12 }} {{- end }} + {{- with .Values.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} {{- if .Values.prometheusPort }} - name: prom image: prom/prometheus diff --git a/values.yaml b/values.yaml index f8ad71b..57b6687 100644 --- a/values.yaml +++ b/values.yaml @@ -644,3 +644,6 @@ prometheusCollector: tolerations: [] # affinity rules for pod scheduling affinity: {} + +securityContext: {} +podSecurityContext: {} \ No newline at end of file