-
Notifications
You must be signed in to change notification settings - Fork 209
/
pod.yaml
106 lines (101 loc) · 3.89 KB
/
pod.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
apiVersion: v1
kind: Pod
metadata:
name: {{ include "common.names.fullname" . }}
labels:
{{- include "airbyte.labels" . | nindent 4 }}
{{- if .Values.extraLabels }}
{{ toYaml (mergeOverwrite .Values.extraLabels .Values.global.extraLabels) | nindent 4 }}
{{- end }}
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 4 }}
{{- end }}
annotations:
helm.sh/hook: pre-install,pre-upgrade
helm.sh/hook-weight: "0"
{{- if .Values.podAnnotations }}
{{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 4 }}
{{- end }}
spec:
serviceAccountName: {{ .Values.global.serviceAccountName }}
{{- if .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- range .Values.global.imagePullSecrets }}
{{- printf "- name: %s" .name | nindent 2 }}
{{- end }}
{{- end }}
restartPolicy: Never
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.extraInitContainers }}
initContainers:
{{- toYaml .Values.extraInitContainers | nindent 4 }}
{{- end }}
containers:
- name: airbyte-bootloader-container
image: {{ printf "%s:%s" .Values.image.repository (include "bootloader.imageTag" .) }}
imagePullPolicy: "{{ .Values.image.pullPolicy }}"
env:
{{- if eq .Values.global.deploymentMode "oss" }}
- name: AIRBYTE_VERSION
valueFrom:
configMapKeyRef:
name: {{ .Values.global.configMapName | default (printf "%s-airbyte-env" .Release.Name) }}
key: AIRBYTE_VERSION
- name: RUN_DATABASE_MIGRATION_ON_STARTUP
valueFrom:
configMapKeyRef:
name: {{ .Values.global.configMapName | default (printf "%s-airbyte-env" .Release.Name) }}
key: RUN_DATABASE_MIGRATION_ON_STARTUP
{{- include "airbyte.database.envs" . | nindent 8 }}
{{- end }}
# Values from secret
{{- if .Values.secrets }}
{{- range $k, $v := .Values.secrets }}
- name: {{ $k }}
valueFrom:
secretKeyRef:
name: bootloader-secrets
key: {{ $k }}
{{- end }}
{{- end }}
# Values from env
{{- if or .Values.env_vars .Values.global.env_vars }}
{{- range $k, $v := mergeOverwrite .Values.env_vars .Values.global.env_vars }}
- name: {{ $k }}
value: {{ $v | quote }}
{{- end }}
{{- end }}
# Values from extraEnv for more compability(if you want to use external secret source or other stuff)
{{- if .Values.extraEnv }}
{{- toYaml .Values.extraEnv | nindent 8 }}
{{- end }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 8 }}
{{- end }}
{{- if .Values.extraVolumeMounts }}
volumeMounts:
{{- toYaml .Values.extraVolumeMounts | nindent 8 }}
{{- end }}
{{- if .Values.containerSecurityContext }}
securityContext: {{- toYaml .Values.containerSecurityContext | nindent 8 }}
{{- end }}
{{- if .Values.extraContainers }}
{{ toYaml .Values.extraContainers | nindent 4 }}
{{- end }}
{{- if .Values.global.extraContainers }}
{{ toYaml .Values.global.extraContainers | nindent 4 }}
{{- end }}
securityContext: {{- toYaml .Values.podSecurityContext | nindent 6 }}
{{- if .Values.extraVolumes }}
volumes:
{{- toYaml .Values.extraVolumes | nindent 4 }}
{{- end }}