github.com/argoproj/argo-cd@v1.8.7/util/helm/testdata/minio/templates/deployment.yaml (about)

     1  {{- if eq .Values.mode "standalone" }}
     2  apiVersion: apps/v1beta2
     3  kind: Deployment
     4  metadata:
     5    name: {{ template "minio.fullname" . }}
     6    labels:
     7      app: {{ template "minio.name" . }}
     8      chart: {{ template "minio.chart" . }}
     9      release: {{ .Release.Name }}
    10      heritage: {{ .Release.Service }}
    11  spec:
    12    {{- if .Values.nasgateway.enabled }}
    13    replicas: {{ .Values.nasgateway.replicas }}
    14    {{- end }}
    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            {{- if .Values.azuregateway.enabled }}
    34            command: [ "/bin/sh", 
    35            "-ce", 
    36            "cp /tmp/config.json {{ .Values.configPath }} && 
    37            /usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} gateway azure"]
    38            {{- else }}
    39            {{- if .Values.gcsgateway.enabled }}
    40            command: [ "/bin/sh", 
    41            "-ce", 
    42            "cp /tmp/config.json {{ .Values.configPath }} && 
    43            /usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} gateway gcs {{ .Values.gcsgateway.projectId }}"]
    44            {{- else }}
    45            {{- if .Values.nasgateway.enabled }}
    46            command: [ "/bin/sh", 
    47            "-ce", 
    48            "cp /tmp/config.json {{ .Values.configPath }} && 
    49            /usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} gateway nas {{ .Values.mountPath }}"]
    50            {{- else }}
    51            command: [ "/bin/sh", 
    52            "-ce", 
    53            "cp /tmp/config.json {{ .Values.configPath }} && 
    54            /usr/bin/docker-entrypoint.sh minio -C {{ .Values.configPath }} server {{ .Values.mountPath }}" ]
    55            {{- end }}
    56            {{- end }}
    57            {{- end }}
    58            volumeMounts:
    59              - name: export
    60                mountPath: {{ .Values.mountPath }}
    61                {{- if and .Values.persistence.enabled .Values.persistence.subPath }}
    62                subPath: "{{ .Values.persistence.subPath }}"
    63                {{- end }}
    64              {{- if .Values.gcsgateway.enabled }}
    65              - name: minio-user
    66                mountPath: "/etc/credentials"
    67                readOnly: true
    68              {{- end }}
    69              - name: minio-server-config
    70                mountPath: "/tmp/config.json"
    71                subPath: config.json
    72              - name: minio-config-dir
    73                mountPath: {{ .Values.configPath }}
    74            ports:
    75              - name: service
    76                containerPort: 9000
    77            env:
    78              - name: MINIO_ACCESS_KEY
    79                valueFrom:
    80                  secretKeyRef:
    81                    name: {{ template "minio.fullname" . }}
    82                    key: accesskey
    83              - name: MINIO_SECRET_KEY
    84                valueFrom:
    85                  secretKeyRef:
    86                    name: {{ template "minio.fullname" . }}
    87                    key: secretkey
    88              {{- if .Values.gcsgateway.enabled }}
    89              - name: GOOGLE_APPLICATION_CREDENTIALS
    90                value: "/etc/credentials/gcs_key.json"
    91              {{- end }}
    92            livenessProbe:
    93              tcpSocket:
    94                port: 9000
    95              timeoutSeconds: 1
    96            resources:
    97  {{ toYaml .Values.resources | indent 12 }}
    98  {{- with .Values.nodeSelector }}
    99        nodeSelector:
   100  {{ toYaml . | indent 8 }}
   101  {{- end }}
   102  {{- with .Values.affinity }}
   103        affinity:
   104  {{ toYaml . | indent 8 }}
   105  {{- end }}
   106  {{- with .Values.tolerations }}
   107        tolerations:
   108  {{ toYaml . | indent 8 }}
   109  {{- end }}
   110        volumes:
   111          - name: export
   112          {{- if .Values.persistence.enabled }}
   113            persistentVolumeClaim:
   114              claimName: {{ .Values.persistence.existingClaim | default (include "minio.fullname" .) }}
   115          {{- else }}
   116            emptyDir: {}
   117          {{- end }}
   118          - name: minio-server-config
   119            configMap:
   120              name: {{ template "minio.fullname" . }}
   121          - name: minio-user
   122            secret:
   123              secretName: {{ template "minio.fullname" . }}
   124          - name: minio-config-dir
   125            emptyDir: {}
   126  {{- end }}