github.com/nikkelma/oras-project_oras-go@v1.1.1-0.20220201001104-a75f6a419090/testdata/charts/chartmuseum/templates/deployment.yaml (about)

     1  apiVersion: extensions/v1beta1
     2  kind: Deployment
     3  metadata:
     4    name: {{ include "chartmuseum.fullname" . }}
     5    annotations:
     6  {{ toYaml .Values.deployment.annotations | indent 4 }}
     7    labels:
     8  {{ include "chartmuseum.labels.standard" . | indent 4 }}
     9  {{- if .Values.deployment.labels }}
    10  {{ toYaml .Values.deployment.labels | indent 4 }}
    11  {{- end }}
    12  spec:
    13    replicas: {{ .Values.replicaCount }}
    14    strategy:
    15  {{ toYaml .Values.strategy | indent 4 }}
    16    revisionHistoryLimit: 10
    17  {{- if .Values.deployment.matchlabes }}
    18    selector:
    19      matchLabels:
    20  {{ toYaml .Values.deployment.matchlabes | indent 6 }}
    21  {{- end }}
    22    template:
    23      metadata:
    24        name: {{ include "chartmuseum.fullname" . }}
    25        annotations:
    26  {{ toYaml .Values.replica.annotations | indent 8 }}
    27        labels:
    28          app: {{ template "chartmuseum.name" . }}
    29          release: {{ .Release.Name | quote }}
    30  {{- if .Values.deployment.labels }}
    31  {{ toYaml .Values.deployment.labels | indent 8 }}
    32  {{- end }}
    33      spec:
    34        containers:
    35        - name: {{ .Chart.Name }}
    36          image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
    37          imagePullPolicy: {{ .Values.image.pullPolicy }}
    38          env:
    39  {{- range $name, $value := .Values.env.open }}
    40  {{- if not (empty $value) }}
    41          - name: {{ $name | quote }}
    42            value: {{ $value | quote }}
    43  {{- end }}
    44  {{- end }}
    45  {{- range $name, $value := .Values.env.field }}
    46  {{- if not ( empty $value) }}
    47          - name: {{ $name | quote }}
    48            valueFrom:
    49              fieldRef:
    50                fieldPath: {{ $value | quote }}
    51  {{- end }}
    52  {{- end }}
    53  {{- if .Values.gcp.secret.enabled }}
    54          - name: GOOGLE_APPLICATION_CREDENTIALS
    55            value: "/etc/secrets/google/credentials.json"
    56  {{- end }}
    57  {{- $secret_name := include "chartmuseum.fullname" . }}
    58  {{- range $name, $value := .Values.env.secret }}
    59  {{- if not ( empty $value) }}
    60          - name: {{ $name | quote }}
    61            valueFrom:
    62              secretKeyRef:
    63                name: {{ $secret_name }}
    64                key: {{ $name | quote }}
    65  {{- end }}
    66  {{- end }}
    67          args:
    68          - --port=8080
    69  {{- if eq .Values.env.open.STORAGE "local" }}
    70          - --storage-local-rootdir=/storage
    71  {{- end }}
    72          ports:
    73          - name: http
    74            containerPort: 8080
    75          livenessProbe:
    76            httpGet:
    77              path: {{ .Values.env.open.CONTEXT_PATH }}/health
    78              port: http
    79  {{ toYaml .Values.probes.liveness | indent 10 }}
    80          readinessProbe:
    81            httpGet:
    82              path: {{ .Values.env.open.CONTEXT_PATH }}/health
    83              port: http
    84  {{ toYaml .Values.probes.readiness | indent 10 }}
    85  {{- if eq .Values.env.open.STORAGE "local" }}
    86          volumeMounts:
    87          - mountPath: /storage
    88            name: storage-volume
    89  {{- end }}
    90  {{- if  .Values.gcp.secret.enabled }}
    91          volumeMounts:
    92          - mountPath: /etc/secrets/google
    93            name: {{ include "chartmuseum.fullname" . }}-gcp
    94  {{- end }}
    95        {{- with .Values.resources }}
    96          resources:
    97  {{ toYaml . | indent 10 }}
    98        {{- end }}
    99      {{- with .Values.nodeSelector }}
   100        nodeSelector:
   101  {{ toYaml . | indent 8 }}
   102      {{- end }}
   103      {{- with .Values.affinity }}
   104        affinity:
   105  {{ toYaml . | indent 8 }}
   106      {{- end }}
   107      {{- with .Values.tolerations }}
   108        tolerations:
   109  {{ toYaml . | indent 8 }}
   110      {{- end }}
   111      {{- if .Values.serviceAccount.create }}
   112        serviceAccountName: {{ include "chartmuseum.fullname" . }}
   113      {{- else if .Values.serviceAccount.name }}
   114        serviceAccountName: {{ .Values.serviceAccount.name }}
   115      {{- end }}
   116      {{- with .Values.securityContext }}
   117        securityContext:
   118  {{ toYaml . | indent 8 }}
   119      {{- end }}
   120        volumes:
   121        - name: storage-volume
   122        {{- if .Values.persistence.enabled }}
   123          persistentVolumeClaim:
   124            claimName: {{ .Values.persistence.existingClaim | default (include "chartmuseum.fullname" .) }}
   125        {{- else }}
   126          emptyDir: {}
   127        {{- end -}}
   128        {{ if .Values.gcp.secret.enabled }}
   129        - name: {{ include "chartmuseum.fullname" . }}-gcp
   130          secret:
   131        {{ if .Values.env.secret.GOOGLE_CREDENTIALS_JSON }}
   132            secretName: {{ include "chartmuseum.fullname" . }}
   133            items:
   134            - key: GOOGLE_CREDENTIALS_JSON
   135              path: credentials.json
   136        {{ else }}
   137            secretName: {{ .Values.gcp.secret.name }}
   138            items:
   139            - key: {{ .Values.gcp.secret.key }}
   140              path: credentials.json
   141        {{ end }}
   142        {{ end }}