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 29, 2024
1 parent ddc5afc commit 264a32a
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.4.0
version: 5.5.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 @@ -645,6 +645,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 264a32a

Please sign in to comment.