Merge pull request #881 from andylibrian/charts-prometheus-security-context

Chart: Add securityContext parameter to prometheus deployment
This commit is contained in:
Stefan Prodan
2021-04-28 14:57:51 +03:00
committed by GitHub
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -255,6 +255,10 @@ spec:
mountPath: /etc/prometheus
- name: data-volume
mountPath: /prometheus/data
{{- if .Values.prometheus.securityContext.enabled }}
securityContext:
{{ toYaml .Values.prometheus.securityContext.context | indent 12 }}
{{- end }}
{{- if .Values.prometheus.pullSecret }}
imagePullSecrets:
- name: {{ .Values.prometheus.pullSecret }}
+6
View File
@@ -127,6 +127,12 @@ prometheus:
image: docker.io/prom/prometheus:v2.23.0
pullSecret:
retention: 2h
# when enabled, it will add a security context for the prometheus pod
securityContext:
enabled: false
context:
readOnlyRootFilesystem: true
runAsUser: 10001
kubeconfigQPS: ""
kubeconfigBurst: ""