diff --git a/helm/rustfs/templates/statefulset.yaml b/helm/rustfs/templates/statefulset.yaml index 0b8cc4cb9..781216157 100644 --- a/helm/rustfs/templates/statefulset.yaml +++ b/helm/rustfs/templates/statefulset.yaml @@ -52,8 +52,10 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" command: ["/usr/bin/rustfs"] imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- if .Values.securityContext }} securityContext: - runAsUser: 1000 + {{- toYaml .Values.securityContext | nindent 12 }} + {{- end }} ports: - containerPort: {{ .Values.service.ep_port }} name: endpoint diff --git a/helm/rustfs/values.yaml b/helm/rustfs/values.yaml index 7b2220214..68b18fd0f 100644 --- a/helm/rustfs/values.yaml +++ b/helm/rustfs/values.yaml @@ -59,13 +59,12 @@ podSecurityContext: # fsGroup: 2000 securityContext: - {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 + capabilities: + drop: + - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 service: type: NodePort