Skip to content

Commit

Permalink
[kube-prometheus-stack] set parameters for podsecurity restricted (#3201
Browse files Browse the repository at this point in the history
)

Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
Signed-off-by: Quentin Bisson <quentin@giantswarm.io>
Co-authored-by: Quentin Bisson <quentin@giantswarm.io>
  • Loading branch information
jcpunk and QuentinBisson committed May 23, 2023
1 parent b28a3e8 commit 6be7a82
Show file tree
Hide file tree
Showing 2 changed files with 26 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 @@ -21,7 +21,7 @@ name: kube-prometheus-stack
sources:
- https://github.com/prometheus-community/helm-charts
- https://github.com/prometheus-operator/kube-prometheus
version: 46.2.0
version: 46.3.0
appVersion: v0.65.1
kubeVersion: ">=1.16.0-0"
home: https://github.com/prometheus-operator/kube-prometheus
Expand Down
27 changes: 25 additions & 2 deletions charts/kube-prometheus-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,8 @@ alertmanager:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 2000
seccompProfile:
type: RuntimeDefault

## ListenLocal makes the Alertmanager server listen on loopback, so that it does not bind against the Pod IP.
## Note this is only for the Alertmanager UI, not the gossip communication.
Expand Down Expand Up @@ -1929,14 +1931,26 @@ prometheusOperator:
runAsGroup: 2000
runAsNonRoot: true
runAsUser: 2000
seccompProfile:
type: RuntimeDefault

# Security context for create job container
createSecretJob:
securityContext: {}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL

# Security context for patch job container
patchWebhookJob:
securityContext: {}
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL

# Use certmanager to generate webhook certs
certManager:
Expand Down Expand Up @@ -2178,13 +2192,18 @@ prometheusOperator:
runAsGroup: 65534
runAsNonRoot: true
runAsUser: 65534
seccompProfile:
type: RuntimeDefault

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

# Enable vertical pod autoscaler support for prometheus-operator
verticalPodAutoscaler:
Expand Down Expand Up @@ -3201,6 +3220,8 @@ prometheus:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 2000
seccompProfile:
type: RuntimeDefault

## Priority class assigned to the Pods
##
Expand Down Expand Up @@ -3832,6 +3853,8 @@ thanosRuler:
runAsNonRoot: true
runAsUser: 1000
fsGroup: 2000
seccompProfile:
type: RuntimeDefault

## ListenLocal makes the ThanosRuler server listen on loopback, so that it does not bind against the Pod IP.
## Note this is only for the ThanosRuler UI, not the gossip communication.
Expand Down

0 comments on commit 6be7a82

Please sign in to comment.