forked from CityOfZion/neo-scan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yaml
98 lines (98 loc) · 2.74 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
91
92
93
94
95
96
97
98
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ${WORKLOAD_NAME}
labels:
app: ${WORKLOAD_NAME}
spec:
replicas: ${REPLICAS}
template:
metadata:
labels:
app: ${WORKLOAD_NAME}
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- ${WORKLOAD_NAME}
topologyKey: "kubernetes.io/hostname"
containers:
- name: ${WORKLOAD_NAME}
# resources:
# requests:
# memory: "${MEMORY_REQUEST}"
# cpu: "${CPU_REQUEST}"
image: ${REGISTRY_PATH}
stdin: true
tty: true
env:
- name: POOL_SIZE
value: "${POOL_SIZE}"
- name: DB_USERNAME
valueFrom:
secretKeyRef:
name: cloudsql-db-credentials
key: username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: cloudsql-db-credentials
key: password
- name: HOST
value: ${HOST}
- name: PORT
value: "4000"
- name: REPLACE_OS_VARS
value: "true"
- name: DB_DATABASE
value: ${DB_DATABASE}
- name: DB_HOSTNAME
value: 127.0.0.1
- name: NEO_SEED_1
value: ${NEO_SEED_1}
- name: NEO_SEED_2
value: ${NEO_SEED_2}
- name: NEO_SEED_3
value: ${NEO_SEED_3}
- name: NEO_SEED_4
value: ${NEO_SEED_4}
- name: NEO_SEED_5
value: ${NEO_SEED_5}
- name: NEO_SEED_6
value: ${NEO_SEED_6}
- name: NEO_SEED_7
value: ${NEO_SEED_7}
- name: NEO_SEED_8
value: ${NEO_SEED_8}
- name: NEO_SEED_9
value: ${NEO_SEED_9}
- name: NEO_SEED_10
value: ${NEO_SEED_10}
- name: TEST_NET
value: "${TEST_NET}"
- name: NEO_NOTIFICATIONS_SERVER
value: ${NEO_NOTIFICATIONS_SERVER}
- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.11
command: ["/cloud_sql_proxy",
"-instances=$(DB_INSTANCE)=tcp:5432",
"-credential_file=/secrets/cloudsql/credentials.json"]
env:
- name: DB_INSTANCE
valueFrom:
secretKeyRef:
name: cloudsql-db-credentials
key: instance
volumeMounts:
- name: cloudsql-instance-credentials
mountPath: /secrets/cloudsql
readOnly: true
volumes:
- name: cloudsql-instance-credentials
secret:
secretName: cloudsql-instance-credentials