Skip to content

Commit

Permalink
[kube-prometheus-stack] Expose the container-specific security contex…
Browse files Browse the repository at this point in the history
…t for Prometheus Operator (#1811)

* Expose the container-specific security context settings for Prometheus operator

Signed-off-by: rd5 <[email protected]>

* Bump kube-prometheus-stack chart version to 32.2.2

Signed-off-by: rd5 <[email protected]>

* New feature so raise minor version to 32.3.0

Signed-off-by: rd5 <[email protected]>

Co-authored-by: rd5 <[email protected]>
  • Loading branch information
rdauncey53 and rd5 authored Feb 28, 2022
1 parent bd0a4e9 commit ac52b97
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 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 @@ -23,7 +23,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 33.0.0
version: 33.1.0
appVersion: 0.54.1
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 @@ -112,8 +112,7 @@ spec:
resources:
{{ toYaml .Values.prometheusOperator.resources | indent 12 }}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
{{ toYaml .Values.prometheusOperator.containerSecurityContext | indent 12 }}
{{- if .Values.prometheusOperator.tls.enabled }}
volumeMounts:
- name: tls-secret
Expand Down
7 changes: 7 additions & 0 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,13 @@ prometheusOperator:
runAsNonRoot: true
runAsUser: 65534

## Container-specific security context configuration
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
##
containerSecurityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true

## Prometheus-operator image
##
image:
Expand Down

0 comments on commit ac52b97

Please sign in to comment.