| Giorgi Lekveishvili | 925f0de | 2024-03-14 18:51:56 +0400 | [diff] [blame^] | 1 | --- |
| 2 | apiVersion: apps/v1 |
| 3 | kind: Deployment |
| 4 | metadata: |
| 5 | name: {{ include "hydra-maester.fullname" . }} |
| 6 | labels: |
| 7 | {{- include "hydra-maester.labels" . | nindent 4 }} |
| 8 | {{- with .Values.deployment.extraLabels }} |
| 9 | {{- toYaml . | nindent 4 }} |
| 10 | {{- end }} |
| 11 | spec: |
| 12 | replicas: {{ .Values.replicaCount }} |
| 13 | revisionHistoryLimit: 10 |
| 14 | selector: |
| 15 | matchLabels: |
| 16 | control-plane: controller-manager |
| 17 | app.kubernetes.io/name: {{ include "hydra-maester.fullname" . }} |
| 18 | app.kubernetes.io/instance: {{ .Release.Name }} |
| 19 | template: |
| 20 | metadata: |
| 21 | labels: |
| 22 | control-plane: controller-manager |
| 23 | app.kubernetes.io/name: {{ include "hydra-maester.fullname" . }} |
| 24 | app.kubernetes.io/instance: {{ .Release.Name }} |
| 25 | {{- with .Values.deployment.extraLabels }} |
| 26 | {{- toYaml . | nindent 8 }} |
| 27 | {{- end }} |
| 28 | {{- with .Values.deployment.podMetadata.labels }} |
| 29 | {{- toYaml . | nindent 8 }} |
| 30 | {{- end }} |
| 31 | annotations: |
| 32 | {{- with .Values.deployment.extraAnnotations }} |
| 33 | {{- toYaml . | nindent 8 }} |
| 34 | {{- end }} |
| 35 | {{- with .Values.deployment.podMetadata.annotations }} |
| 36 | {{- toYaml . | nindent 8 }} |
| 37 | {{- end }} |
| 38 | spec: |
| 39 | {{- with .Values.imagePullSecrets }} |
| 40 | imagePullSecrets: |
| 41 | {{- toYaml . | nindent 8 }} |
| 42 | {{- end }} |
| 43 | containers: |
| 44 | - name: {{ .Chart.Name }} |
| 45 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" |
| 46 | imagePullPolicy: {{ .Values.image.pullPolicy }} |
| 47 | command: |
| 48 | - /manager |
| 49 | args: |
| 50 | - --metrics-addr=127.0.0.1:8080 |
| 51 | - --hydra-url=http://{{ .Values.adminService.name | default ( include "hydra-maester.adminService" . ) }} |
| 52 | - --hydra-port={{ .Values.adminService.port | default 4445 }} |
| 53 | {{- with .Values.adminService.endpoint }} |
| 54 | - --endpoint={{ . }} |
| 55 | {{- end }} |
| 56 | {{- if .Values.forwardedProto }} |
| 57 | - --forwarded-proto={{ .Values.forwardedProto }} |
| 58 | {{- end }} |
| 59 | {{- if .Values.singleNamespaceMode }} |
| 60 | - --namespace={{ .Release.Namespace }} |
| 61 | {{- end }} |
| 62 | {{- if .Values.deployment.args.syncPeriod }} |
| 63 | - --sync-period={{ .Values.deployment.args.syncPeriod }} |
| 64 | {{- end }} |
| 65 | resources: |
| 66 | {{- toYaml .Values.deployment.resources | nindent 12 }} |
| 67 | terminationMessagePath: /dev/termination-log |
| 68 | terminationMessagePolicy: File |
| 69 | {{- if .Values.deployment.securityContext }} |
| 70 | securityContext: |
| 71 | {{- toYaml .Values.deployment.securityContext | nindent 12 }} |
| 72 | {{- end }} |
| 73 | serviceAccountName: {{ include "hydra-maester.fullname" . }}-account |
| 74 | automountServiceAccountToken: {{ .Values.deployment.automountServiceAccountToken }} |
| 75 | {{- if .Values.priorityClassName }} |
| 76 | priorityClassName: {{ .Values.priorityClassName }} |
| 77 | {{- end }} |
| 78 | nodeSelector: |
| 79 | {{- with .Values.deployment.nodeSelector }} |
| 80 | {{- toYaml . | nindent 8 }} |
| 81 | {{- end }} |
| 82 | {{- with .Values.affinity }} |
| 83 | affinity: |
| 84 | {{- toYaml . | nindent 8 }} |
| 85 | {{- end }} |
| 86 | {{- with .Values.deployment.tolerations }} |
| 87 | tolerations: |
| 88 | {{- toYaml . | nindent 8 }} |
| 89 | {{- end }} |
| 90 | {{- with .Values.deployment.topologySpreadConstraints }} |
| 91 | topologySpreadConstraints: |
| 92 | {{- toYaml . | nindent 8 }} |
| 93 | {{- end }} |
| 94 | {{- with .Values.deployment.dnsConfig }} |
| 95 | dnsConfig: |
| 96 | {{- toYaml . | nindent 8 }} |
| 97 | {{- end }} |