github.com/argoproj/argo-cd@v1.8.7/util/helm/testdata/minio/templates/statefulset.yaml (about) 1 {{- if eq .Values.mode "distributed" }} 2 {{ $nodeCount := .Values.replicas | int }} 3 apiVersion: apps/v1beta1 4 kind: StatefulSet 5 metadata: 6 name: {{ template "minio.fullname" . }} 7 labels: 8 app: {{ template "minio.name" . }} 9 chart: {{ template "minio.chart" . }} 10 release: {{ .Release.Name }} 11 heritage: {{ .Release.Service }} 12 spec: 13 serviceName: {{ template "minio.fullname" . }} 14 replicas: {{ .Values.replicas }} 15 selector: 16 matchLabels: 17 app: {{ template "minio.name" . }} 18 release: {{ .Release.Name }} 19 template: 20 metadata: 21 name: {{ template "minio.fullname" . }} 22 labels: 23 app: {{ template "minio.name" . }} 24 release: {{ .Release.Name }} 25 spec: 26 {{- if .Values.priorityClassName }} 27 priorityClassName: "{{ .Values.priorityClassName }}" 28 {{- end }} 29 containers: 30 - name: {{ .Chart.Name }} 31 image: {{ .Values.image.repository }}:{{ .Values.image.tag }} 32 imagePullPolicy: {{ .Values.image.pullPolicy }} 33 command: [ "/bin/sh", 34 "-ce", 35 "cp /tmp/config.json {{ .Values.configPath }} && 36 /usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} server 37 {{- range $i := until $nodeCount }} 38 http://{{ template `minio.fullname` $ }}-{{ $i }}.{{ template `minio.fullname` $ }}.{{ $.Release.Namespace }}.svc.cluster.local{{ $.Values.mountPath }} 39 {{- end }}" ] 40 volumeMounts: 41 - name: export 42 mountPath: {{ .Values.mountPath }} 43 {{- if and .Values.persistence.enabled .Values.persistence.subPath }} 44 subPath: "{{ .Values.persistence.subPath }}" 45 {{- end }} 46 - name: minio-server-config 47 mountPath: "/tmp/config.json" 48 subPath: config.json 49 - name: minio-config-dir 50 mountPath: {{ .Values.configPath }} 51 ports: 52 - name: service 53 containerPort: 9000 54 env: 55 - name: MINIO_ACCESS_KEY 56 valueFrom: 57 secretKeyRef: 58 name: {{ template "minio.fullname" . }} 59 key: accesskey 60 - name: MINIO_SECRET_KEY 61 valueFrom: 62 secretKeyRef: 63 name: {{ template "minio.fullname" . }} 64 key: secretkey 65 resources: 66 {{ toYaml .Values.resources | indent 12 }} 67 {{- with .Values.nodeSelector }} 68 nodeSelector: 69 {{ toYaml . | indent 8 }} 70 {{- end }} 71 {{- with .Values.affinity }} 72 affinity: 73 {{ toYaml . | indent 8 }} 74 {{- end }} 75 {{- with .Values.tolerations }} 76 tolerations: 77 {{ toYaml . | indent 8 }} 78 {{- end }} 79 volumes: 80 - name: minio-user 81 secret: 82 secretName: {{ template "minio.fullname" . }} 83 - name: minio-server-config 84 configMap: 85 name: {{ template "minio.fullname" . }} 86 - name: minio-config-dir 87 emptyDir: {} 88 volumeClaimTemplates: 89 - metadata: 90 name: export 91 spec: 92 accessModes: [ {{ .Values.persistence.accessMode | quote }} ] 93 {{- if .Values.persistence.storageClass }} 94 storageClassName: {{ .Values.persistence.storageClass }} 95 {{- end }} 96 resources: 97 requests: 98 storage: {{ .Values.persistence.size }} 99 {{- end }}