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

     1  {{- if .Values.metrics.enabled }}
     2  apiVersion: extensions/v1beta1
     3  kind: Deployment
     4  metadata:
     5    name: {{ template "redis.fullname" . }}-metrics
     6    labels:
     7      app: {{ template "redis.name" . }}
     8      chart: {{ template "redis.chart" . }}
     9      release: "{{ .Release.Name }}"
    10      heritage: "{{ .Release.Service }}"
    11  spec:
    12    template:
    13      metadata:
    14        labels:
    15          release: "{{ .Release.Name }}"
    16          role: metrics
    17          app: {{ template "redis.name" . }}
    18        {{- if .Values.metrics.podLabels }}
    19  {{ toYaml .Values.metrics.podLabels | indent 8 }}
    20        {{- end }}
    21        {{- if .Values.metrics.podAnnotations }}
    22        annotations:
    23  {{ toYaml .Values.metrics.podAnnotations | indent 8 }}
    24        {{- end }}
    25      spec:
    26        {{- if .Values.metrics.image.pullSecrets }}
    27        imagePullSecrets:
    28          {{- range .Values.metrics.image.pullSecrets }}
    29          - name: {{ . }}
    30          {{- end}}
    31        {{- end}}
    32        {{- if .Values.metrics.nodeSelector }}
    33        serviceAccountName: "{{ template "redis.serviceAccountName" . }}"
    34        nodeSelector:
    35  {{ toYaml .Values.metrics.nodeSelector | indent 8 }}
    36        {{- end }}
    37        {{- if .Values.metrics.tolerations }}
    38        tolerations:
    39  {{ toYaml .Values.metrics.tolerations | indent 8 }}
    40        {{- end }}
    41        containers:
    42        - name: metrics
    43          image: {{ template "metrics.image" . }}
    44          imagePullPolicy: {{ .Values.metrics.image.pullPolicy | quote }}
    45          env:
    46          - name: REDIS_ADDR
    47          {{- if .Values.cluster.enabled }}
    48            value: {{ printf "%s-master:%d,%s-slave:%d" ( include "redis.fullname" . ) ( int .Values.master.port ) ( include "redis.fullname" . ) ( .Values.slave.port | default .Values.master.port | int ) | quote }}
    49          {{- else }}
    50            value: {{ printf "%s-master:%d" (include "redis.fullname" . ) (int .Values.master.port) | quote }}
    51          {{- end }}
    52          - name: REDIS_ALIAS
    53            value: {{ template "redis.fullname" . }}
    54          {{- if .Values.usePassword }}
    55          - name: REDIS_PASSWORD
    56            valueFrom:
    57              secretKeyRef:
    58                {{- if .Values.existingSecret }}
    59                name: {{ .Values.existingSecret }}
    60                {{- else }}
    61                name: {{ template "redis.fullname" . }}
    62                {{- end }}
    63                key: redis-password
    64          {{- end }}
    65          ports:
    66          - name: metrics
    67            containerPort: 9121
    68          resources:
    69  {{ toYaml .Values.metrics.resources | indent 10 }}
    70  {{- end }}