-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5-1-airflow-web-statefulset.yml
58 lines (58 loc) · 1.38 KB
/
5-1-airflow-web-statefulset.yml
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
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: web
namespace: airflow
spec:
selector:
matchLabels:
app: web
serviceName: web
template:
metadata:
labels:
app: web
spec:
initContainers:
- name: init
image: watchdg/airflow:1
imagePullPolicy: Always
args:
- initdb
envFrom:
- secretRef:
name: airflow
containers:
- name: repo
image: watchdg/repo
imagePullPolicy: Always
workingDir: /opt/airflow/dags
command:
- sh
- -c
- git clone $(GIT_REPO) . && watch -n 300 git pull
env:
- name: GIT_REPO
valueFrom:
secretKeyRef:
name: airflow
key: GIT_REPO
volumeMounts:
- name: dags
mountPath: /opt/airflow/dags
- name: web
image: watchdg/airflow:1
imagePullPolicy: Always
args:
- webserver
envFrom:
- secretRef:
name: airflow
ports:
- containerPort: 8080
volumeMounts:
- name: dags
mountPath: /opt/airflow/dags
volumes:
- name: dags
emptyDir: {}