Skip to content

Commit

Permalink
Add metrics.securityContext and metrics.podSecurityContext
Browse files Browse the repository at this point in the history
Signed-off-by: jessebot <[email protected]>
  • Loading branch information
jessebot committed Jul 26, 2024
1 parent bf6cc4a commit e82757a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/nextcloud/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: nextcloud
version: 5.3.2
version: 5.4.0
appVersion: 29.0.4
description: A file sharing server that puts the control and security of your own data back into your hands.
keywords:
Expand Down
9 changes: 7 additions & 2 deletions charts/nextcloud/templates/metrics/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ spec:
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.metrics.securityContext }}
securityContext:
runAsUser: 1000
runAsNonRoot: true
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.metrics.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
15 changes: 15 additions & 0 deletions charts/nextcloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,21 @@ metrics:
prometheus.io/port: "9205"
labels: {}

# security context for the metrics CONTAINER in the pod
securityContext:
runAsUser: 1000
runAsNonRoot: true
# allowPrivilegeEscalation: false
# capabilities:
# drop:
# - ALL

# security context for the metrics POD
podSecurityContext: {}
# runAsNonRoot: true
# seccompProfile:
# type: RuntimeDefault

## Prometheus Operator ServiceMonitor configuration
##
serviceMonitor:
Expand Down

0 comments on commit e82757a

Please sign in to comment.