Skip to content

Commit

Permalink
[kube-prometheus-stack] Fix issue prometheus-community#1038 (promethe…
Browse files Browse the repository at this point in the history
…us-community#1045)

* [kube-prometheus-stack] fix issue 1038

Make admission Web Hook Jobs securityContext configurable

Signed-off-by: Dmitrii Ermakov <demonihin@gmail.com>

* [kube-prometheus-stack] Fix incorrect formatting

Signed-off-by: Dmitrii Ermakov <demonihin@gmail.com>
  • Loading branch information
ErmakovDmitriy authored Jun 6, 2021
1 parent 434ba32 commit 3071d77
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/kube-prometheus-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 16.2.0
version: 16.3.0
appVersion: 0.48.0
kubeVersion: ">=1.16.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.prometheusOperator.admissionWebhooks.patch.securityContext }}
securityContext:
runAsGroup: 2000
runAsNonRoot: true
runAsUser: 2000
{{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.securityContext | indent 8 }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ spec:
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.prometheusOperator.admissionWebhooks.patch.securityContext }}
securityContext:
runAsGroup: 2000
runAsNonRoot: true
runAsUser: 2000
{{ toYaml .Values.prometheusOperator.admissionWebhooks.patch.securityContext | indent 8 }}
{{- end }}
{{- end }}
10 changes: 10 additions & 0 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,16 @@ prometheusOperator:
nodeSelector: {}
affinity: {}
tolerations: []

## SecurityContext holds pod-level security attributes and common container settings.
## This defaults to non root user with uid 2000 and gid 2000. *v1.PodSecurityContext false
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
securityContext:
runAsGroup: 2000
runAsNonRoot: true
runAsUser: 2000

# Use certmanager to generate webhook certs
certManager:
enabled: false
Expand Down

0 comments on commit 3071d77

Please sign in to comment.