Chart: Add securityContext parameter to prometheus deployment

Signed-off-by: Andy Librian <andylibrian@gmail.com>
This commit is contained in:
Andy Librian
2021-04-09 15:03:30 +07:00
parent e6c740d917
commit 7284e55eb0
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: ""