File tree Expand file tree Collapse file tree 2 files changed +51
-37
lines changed Expand file tree Collapse file tree 2 files changed +51
-37
lines changed Original file line number Diff line number Diff line change 1
- apiVersion : v1
2
- kind : Pod
1
+ # We would prefer to use Pod instead of Job here for exactly-once execution guarantee, however
2
+ # Pods have a problem of sticking around after completion, causing errors upon upgrade if they
3
+ # are not manually deleted first.
4
+ # Using generateName would solve this by giving each bootloader pod a unique name, but Kustomize
5
+ # does not currently support generateName.
6
+ # Therefore, using Job here with a ttl is required in order to have a smooth upgrade process for kube.
7
+ # See discussion about this on the PR: https://github.com/airbytehq/airbyte/pull/13397#discussion_r887600449
8
+ apiVersion : batch/v1
9
+ kind : Job
3
10
metadata :
4
11
name : airbyte-bootloader
5
12
spec :
6
- restartPolicy : Never
7
- containers :
8
- - name : airbyte-bootloader-container
9
- image : airbyte/bootloader
10
- env :
11
- - name : AIRBYTE_VERSION
12
- valueFrom :
13
- configMapKeyRef :
14
- name : airbyte-env
15
- key : AIRBYTE_VERSION
16
- - name : DATABASE_HOST
17
- valueFrom :
18
- configMapKeyRef :
19
- name : airbyte-env
20
- key : DATABASE_HOST
21
- - name : DATABASE_PORT
22
- valueFrom :
23
- configMapKeyRef :
24
- name : airbyte-env
25
- key : DATABASE_PORT
26
- - name : DATABASE_PASSWORD
27
- valueFrom :
28
- secretKeyRef :
29
- name : airbyte-secrets
30
- key : DATABASE_PASSWORD
31
- - name : DATABASE_URL
32
- valueFrom :
33
- configMapKeyRef :
34
- name : airbyte-env
35
- key : DATABASE_URL
36
- - name : DATABASE_USER
37
- valueFrom :
38
- secretKeyRef :
39
- name : airbyte-secrets
40
- key : DATABASE_USER
13
+ # This ttl is necessary to prevent errors when upgrading airbyte
14
+ ttlSecondsAfterFinished : 5
15
+ template :
16
+ spec :
17
+ restartPolicy : Never
18
+ containers :
19
+ - name : airbyte-bootloader-container
20
+ image : airbyte/bootloader
21
+ env :
22
+ - name : AIRBYTE_VERSION
23
+ valueFrom :
24
+ configMapKeyRef :
25
+ name : airbyte-env
26
+ key : AIRBYTE_VERSION
27
+ - name : DATABASE_HOST
28
+ valueFrom :
29
+ configMapKeyRef :
30
+ name : airbyte-env
31
+ key : DATABASE_HOST
32
+ - name : DATABASE_PORT
33
+ valueFrom :
34
+ configMapKeyRef :
35
+ name : airbyte-env
36
+ key : DATABASE_PORT
37
+ - name : DATABASE_PASSWORD
38
+ valueFrom :
39
+ secretKeyRef :
40
+ name : airbyte-secrets
41
+ key : DATABASE_PASSWORD
42
+ - name : DATABASE_URL
43
+ valueFrom :
44
+ configMapKeyRef :
45
+ name : airbyte-env
46
+ key : DATABASE_URL
47
+ - name : DATABASE_USER
48
+ valueFrom :
49
+ secretKeyRef :
50
+ name : airbyte-secrets
51
+ key : DATABASE_USER
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ metadata:
16
16
name : airbyte-db
17
17
spec :
18
18
replicas : 1
19
+ # Recreate strategy is necessary to avoid multiple simultaneous db pods running and corrupting the db state
20
+ strategy :
21
+ type : Recreate
19
22
selector :
20
23
matchLabels :
21
24
airbyte : db
You can’t perform that action at this time.
0 commit comments