forked from opendatahub-io/odh-manifests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
90 lines (90 loc) · 2.62 KB
/
deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: superset
labels:
app: superset
spec:
replicas: 1
selector:
matchLabels:
deployment: superset
template:
metadata:
labels:
app: superset
deployment: superset
spec:
initContainers:
- name: superset-init
env:
- name: SUPERSET_CONFIG_PATH
value: /etc/superset/superset_config.py
- name: POSTGRESQL_USERNAME
valueFrom:
secretKeyRef:
key: database-user
name: $(superset_db_secret)
- name: POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: $(superset_db_secret)
- name: POSTGRESQL_DATABASE
valueFrom:
secretKeyRef:
key: database-name
name: $(superset_db_secret)
envFrom:
- secretRef:
name: $(superset_secret)
image: superset
command: ['sh', '-c', "sleep 30; superset-init --username $SUPERSET_ADMIN_USER --firstname $SUPERSET_ADMIN_FNAME --lastname $SUPERSET_ADMIN_LNAME --email $SUPERSET_ADMIN_EMAIL --password $SUPERSET_ADMIN_PASSWORD"]
volumeMounts:
- mountPath: /etc/superset
name: superset-config
containers:
- name: superset
env:
- name: SUPERSET_SECRET_KEY
valueFrom:
secretKeyRef:
key: SUPERSET_SECRET_KEY
name: $(superset_secret)
- name: POSTGRESQL_USERNAME
valueFrom:
secretKeyRef:
key: database-user
name: $(superset_db_secret)
- name: POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
key: database-password
name: $(superset_db_secret)
- name: POSTGRESQL_DATABASE
valueFrom:
secretKeyRef:
key: database-name
name: $(superset_db_secret)
- name: SUPERSET_CONFIG_PATH
value: /etc/superset/superset_config.py
image: superset
ports:
- containerPort: 8088
protocol: TCP
volumeMounts:
- mountPath: /etc/superset
name: superset-config
resources:
requests:
cpu: $(superset_cpu_requests)
memory: $(superset_memory_requests)
limits:
cpu: $(superset_cpu_limits)
memory: $(superset_memory_limits)
serviceAccountName: superset
volumes:
- name: superset-config
configMap:
name: superset-config-py
defaultMode: 420