|
| 1 | +{{- if .Values.dashboard.enabled }} |
| 2 | +apiVersion: apps/v1 |
| 3 | +kind: Deployment |
| 4 | +metadata: |
| 5 | + name: {{ include "promoter.resourceName" (dict "suffix" "dashboard" "context" $) }} |
| 6 | + namespace: {{ .Release.Namespace }} |
| 7 | + labels: |
| 8 | + app.kubernetes.io/name: deployment |
| 9 | + app.kubernetes.io/component: dashboard |
| 10 | + app.kubernetes.io/part-of: promoter |
| 11 | + app.kubernetes.io/managed-by: {{ .Release.Service }} |
| 12 | + helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 13 | +spec: |
| 14 | + replicas: {{ .Values.dashboard.replicas }} |
| 15 | + selector: |
| 16 | + matchLabels: |
| 17 | + app.kubernetes.io/component: dashboard |
| 18 | + template: |
| 19 | + metadata: |
| 20 | + labels: |
| 21 | + app.kubernetes.io/component: dashboard |
| 22 | + spec: |
| 23 | + securityContext: |
| 24 | + {{- toYaml .Values.dashboard.podSecurityContext | nindent 8 }} |
| 25 | + containers: |
| 26 | + - name: dashboard |
| 27 | + image: {{ include "promoter.dashboard.image" . }} |
| 28 | + imagePullPolicy: {{ (.Values.dashboard.image).pullPolicy | default .Values.manager.image.pullPolicy }} |
| 29 | + command: |
| 30 | + - /usr/bin/tini |
| 31 | + - "--" |
| 32 | + - /gitops-promoter |
| 33 | + - dashboard |
| 34 | + args: |
| 35 | + - --port={{ .Values.dashboard.port }} |
| 36 | + ports: |
| 37 | + - name: http |
| 38 | + containerPort: {{ .Values.dashboard.port }} |
| 39 | + protocol: TCP |
| 40 | + securityContext: |
| 41 | + {{- toYaml .Values.dashboard.securityContext | nindent 12 }} |
| 42 | + livenessProbe: |
| 43 | + httpGet: |
| 44 | + path: /healthz |
| 45 | + port: http |
| 46 | + initialDelaySeconds: 15 |
| 47 | + periodSeconds: 20 |
| 48 | + readinessProbe: |
| 49 | + httpGet: |
| 50 | + path: /healthz |
| 51 | + port: http |
| 52 | + initialDelaySeconds: 5 |
| 53 | + periodSeconds: 10 |
| 54 | + resources: |
| 55 | + {{- toYaml .Values.dashboard.resources | nindent 12 }} |
| 56 | + serviceAccountName: {{ include "promoter.resourceName" (dict "suffix" "dashboard" "context" $) }} |
| 57 | + terminationGracePeriodSeconds: 10 |
| 58 | + {{- with .Values.dashboard.nodeSelector }} |
| 59 | + nodeSelector: |
| 60 | + {{- toYaml . | nindent 8 }} |
| 61 | + {{- end }} |
| 62 | + {{- with .Values.dashboard.tolerations }} |
| 63 | + tolerations: |
| 64 | + {{- toYaml . | nindent 8 }} |
| 65 | + {{- end }} |
| 66 | + {{- with .Values.dashboard.affinity }} |
| 67 | + affinity: |
| 68 | + {{- toYaml . | nindent 8 }} |
| 69 | + {{- end }} |
| 70 | +{{- end }} |
0 commit comments