Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-elasticsearch-exporter] Re-introduce pod security context toggle #3646

Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ spec:
{{- end }}
{{- include "elasticsearch-exporter.image.pullSecret.name" (dict "images" (list .Values.image) "context" $) | nindent 6 }}
restartPolicy: {{ .Values.restartPolicy }}
{{- with .Values.podSecurityContext }}
{{- if .Values.podSecurityContext.enabled }}
{{- $podSecurityContext := omit .Values.podSecurityContext "enabled" }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- toYaml $podSecurityContext | nindent 8 }}
{{- end }}
{{- with .Values.dnsConfig }}
dnsConfig:
Expand Down
1 change: 1 addition & 0 deletions charts/prometheus-elasticsearch-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ image:
pullSecret: ""

podSecurityContext:
enabled: true
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
Expand Down
Loading