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

     1  apiVersion: extensions/v1beta1
     2  kind: Deployment
     3  metadata:
     4    name: {{ template "fullname" . }}
     5    labels:
     6      app: {{ template "fullname" . }}
     7      chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
     8      release: "{{ .Release.Name }}"
     9      heritage: "{{ .Release.Service }}"
    10  spec:
    11    replicas: {{ .Values.replicaCount }}
    12    template:
    13      metadata:
    14        labels:
    15          app: {{ template "fullname" . }}
    16          chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
    17          release: "{{ .Release.Name }}"
    18      spec:
    19        {{- if .Values.image.pullSecrets }}
    20        imagePullSecrets:
    21        {{- range .Values.image.pullSecrets }}
    22          - name: {{ . }}
    23        {{- end}}
    24        {{- end }}
    25        containers:
    26        - name: {{ template "fullname" . }}
    27          image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
    28          imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
    29          env:
    30          - name: ALLOW_EMPTY_PASSWORD
    31          {{- if .Values.allowEmptyPassword }}
    32            value: "yes"
    33          {{- else }}
    34            value: "no"
    35          {{- end }}
    36          - name: MARIADB_HOST
    37          {{- if .Values.mariadb.enabled }}
    38            value: {{ template "mariadb.fullname" . }}
    39          {{- else }}
    40            value: {{ .Values.externalDatabase.host | quote }}
    41          {{- end }}
    42          - name: MARIADB_PORT_NUMBER
    43          {{- if .Values.mariadb.enabled }}
    44            value: "3306"
    45          {{- else }}
    46            value: {{ .Values.externalDatabase.port | quote }}
    47          {{- end }}
    48          - name: WORDPRESS_DATABASE_NAME
    49          {{- if .Values.mariadb.enabled }}
    50            value: {{ .Values.mariadb.db.name | quote }}
    51          {{- else }}
    52            value: {{ .Values.externalDatabase.database | quote }}
    53          {{- end }}
    54          - name: WORDPRESS_DATABASE_USER
    55          {{- if .Values.mariadb.enabled }}
    56            value: {{ .Values.mariadb.db.user | quote }}
    57          {{- else }}
    58            value: {{ .Values.externalDatabase.user | quote }}
    59          {{- end }}
    60          - name: WORDPRESS_DATABASE_PASSWORD
    61            valueFrom:
    62              secretKeyRef:
    63              {{- if .Values.mariadb.enabled }}
    64                name: {{ template "mariadb.fullname" . }}
    65                key: mariadb-password
    66              {{- else }}
    67                name: {{ printf "%s-%s" .Release.Name "externaldb" }}
    68                key: db-password
    69              {{- end }}
    70          - name: WORDPRESS_USERNAME
    71            value: {{ .Values.wordpressUsername | quote }}
    72          - name: WORDPRESS_PASSWORD
    73            valueFrom:
    74              secretKeyRef:
    75                name: {{ template "fullname" . }}
    76                key: wordpress-password
    77          - name: WORDPRESS_EMAIL
    78            value: {{ .Values.wordpressEmail | quote }}
    79          - name: WORDPRESS_FIRST_NAME
    80            value: {{ .Values.wordpressFirstName | quote }}
    81          - name: WORDPRESS_LAST_NAME
    82            value: {{ .Values.wordpressLastName | quote }}
    83          - name: WORDPRESS_BLOG_NAME
    84            value: {{ .Values.wordpressBlogName | quote }}
    85          - name: WORDPRESS_TABLE_PREFIX
    86            value: {{ .Values.wordpressTablePrefix | quote }}
    87          - name: SMTP_HOST
    88            value: {{ .Values.smtpHost | quote }}
    89          - name: SMTP_PORT
    90            value: {{ .Values.smtpPort | quote }}
    91          - name: SMTP_USER
    92            value: {{ .Values.smtpUser | quote }}
    93          - name: SMTP_PASSWORD
    94            valueFrom:
    95              secretKeyRef:
    96                name: {{ template "fullname" . }}
    97                key: smtp-password
    98          - name: SMTP_USERNAME
    99            value: {{ .Values.smtpUsername | quote }}
   100          - name: SMTP_PROTOCOL
   101            value: {{ .Values.smtpProtocol | quote }}
   102          ports:
   103          - name: http
   104            containerPort: 80
   105          - name: https
   106            containerPort: 443
   107          livenessProbe:
   108            httpGet:
   109              path: /wp-login.php
   110            {{- if not .Values.healthcheckHttps }}
   111              port: http
   112            {{- else }}
   113              port: https
   114              scheme: HTTPS
   115            {{- end }}
   116  {{ toYaml .Values.livenessProbe | indent 10 }}
   117          readinessProbe:
   118            httpGet:
   119              path: /wp-login.php
   120            {{- if not .Values.healthcheckHttps }}
   121              port: http
   122            {{- else }}
   123              port: https
   124              scheme: HTTPS
   125            {{- end }}
   126  {{ toYaml .Values.readinessProbe | indent 10 }}
   127          volumeMounts:
   128          - mountPath: /bitnami/apache
   129            name: wordpress-data
   130            subPath: apache
   131          - mountPath: /bitnami/wordpress
   132            name: wordpress-data
   133            subPath: wordpress
   134          - mountPath: /bitnami/php
   135            name: wordpress-data
   136            subPath: php
   137          resources:
   138  {{ toYaml .Values.resources | indent 10 }}
   139        volumes:
   140        - name: wordpress-data
   141        {{- if .Values.persistence.enabled }}
   142          persistentVolumeClaim:
   143            claimName: {{ .Values.persistence.existingClaim | default (include "fullname" .) }}
   144        {{- else }}
   145          emptyDir: {}
   146        {{ end }}
   147      {{- if .Values.nodeSelector }}
   148        nodeSelector:
   149  {{ toYaml .Values.nodeSelector | indent 8 }}
   150        {{- end -}}
   151      {{- with .Values.affinity }}
   152        affinity:
   153  {{ toYaml . | indent 8 }}
   154      {{- end }}
   155      {{- with .Values.tolerations }}
   156        tolerations:
   157  {{ toYaml . | indent 8 }}
   158      {{- end }}
   159