diff --git a/helm/rustfs/templates/deployment.yaml b/helm/rustfs/templates/deployment.yaml index d804857f0..1a2672b3b 100644 --- a/helm/rustfs/templates/deployment.yaml +++ b/helm/rustfs/templates/deployment.yaml @@ -57,11 +57,10 @@ spec: {{- end }} initContainers: - name: init-step - image: busybox - imagePullPolicy: {{ .Values.image.pullPolicy }} + image: "{{ .Values.initStep.image.repository }}:{{ .Values.initStep.image.tag }}" + imagePullPolicy: {{ .Values.initStep.image.pullPolicy }} securityContext: - runAsUser: 0 - runAsGroup: 0 + {{- toYaml .Values.initStep.containerSecurityContext | nindent 12 }} command: - sh - -c diff --git a/helm/rustfs/templates/statefulset.yaml b/helm/rustfs/templates/statefulset.yaml index 9a5230bb8..5fcfcc7da 100644 --- a/helm/rustfs/templates/statefulset.yaml +++ b/helm/rustfs/templates/statefulset.yaml @@ -68,11 +68,10 @@ spec: {{- end }} initContainers: - name: init-step - image: busybox - imagePullPolicy: {{ .Values.image.pullPolicy }} + image: "{{ .Values.initStep.image.repository }}:{{ .Values.initStep.image.tag }}" + imagePullPolicy: {{ .Values.initStep.image.pullPolicy }} securityContext: - runAsUser: 0 - runAsGroup: 0 + {{- toYaml .Values.initStep.containerSecurityContext | nindent 12 }} env: - name: REPLICA_COUNT value: {{ .Values.replicaCount | quote }} diff --git a/helm/rustfs/values.yaml b/helm/rustfs/values.yaml index 42299d2c3..5159b4787 100644 --- a/helm/rustfs/values.yaml +++ b/helm/rustfs/values.yaml @@ -177,4 +177,16 @@ storageclass: dataStorageSize: 256Mi logStorageSize: 256Mi +# Init container parameters. +initStep: + image: + repository: busybox + pullPolicy: IfNotPresent + tag: "latest" + containerSecurityContext: + runAsUser: 0 + runAsGroup: 0 + + + extraManifests: []