Skip to content

Commit

Permalink
feat: add securityContext for o11y.prometheus,fix alibaba/higress#727 f…
Browse files Browse the repository at this point in the history
  • Loading branch information
OnlyPiglet committed Feb 25, 2024
1 parent 056686d commit e5aad32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions helm/templates/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ spec:
memory: {{ $config.resources.limits.memory }}
restartPolicy: Always
serviceAccountName: {{ $appName }}
{{- if .Values.o11y.prometheus.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.o11y.prometheus.securityContext.fsGroup }}
runAsUser: {{ .Values.o11y.prometheus.securityContext.runAsUser }}
{{- end }}
volumes:
- name: data
persistentVolumeClaim:
Expand Down
5 changes: 4 additions & 1 deletion helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ o11y:
limits:
cpu: 500m
memory: 2Gi

securityContext:
enabled: true
runAsUser: 0
fsGroup: 0
pvc:
rwxSupported: true

0 comments on commit e5aad32

Please sign in to comment.