Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[prometheus-mongodb-exporter] Allow to configure pod security context #5088

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/prometheus-mongodb-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ maintainers:
name: prometheus-mongodb-exporter
sources:
- https://github.com/percona/mongodb_exporter
version: 3.10.0
version: 3.11.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# Test customize podSecurityContext

mongodb:
uri: mongodb://localhost:9216

podSecurityContext:
seccompProfile:
type: RuntimeDefault
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ spec:
{{- end }}
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- tpl (toYaml .) $ | nindent 8 }}
Expand Down
9 changes: 8 additions & 1 deletion charts/prometheus-mongodb-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,17 @@ resources: {}
# cpu: 100m
# memory: 128Mi

# Customize securityContext of the pod.
# See https://kubernetes.io/docs/concepts/policy/security-context/ for more.
podSecurityContext: {}
# seccompProfile:
# type: RuntimeDefault

securityContext:
allowPrivilegeEscalation: false
capabilities:
drop: ["all"]
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
Expand Down
Loading