-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathkube-gcp-build-deployment.yml
67 lines (67 loc) · 1.78 KB
/
kube-gcp-build-deployment.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
59
60
61
62
63
64
65
66
67
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: hpgcpcluster
# these labels can be applied automatically
# from the labels in the pod template if not set
labels:
app: housepartyapp
tier: hpgcpcluster
spec:
# this replicas value is default
# modify it according to your case
replicas: 3
# selector can be applied automatically
# from the labels in the pod template if not set
template:
metadata:
labels:
app: housepartyapp
tier: hpgcpcluster
spec:
containers:
- name: housepartyapp
image: gcr.io/alanblount-sandbox/house_party:v1
imagePullPolicy: IfNotPresent
resources:
requests:
cpu: 100m
memory: 100Mi
env:
- name: PORT
value: "30080"
# look at the vm.args file, this must match
- name: MY_BASENAME
value: housepartyapp
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: REPLACE_OS_VARS
value: "true"
- name: RELEASE_CONFIG_DIR
value: /beamconfig
# look at the vm.args file, this must match
- name: ERLANG_COOKIE
valueFrom:
# special secret config FTW!
secretKeyRef:
name: app-config
key: erlang-cookie
ports:
- containerPort: 30080
volumeMounts:
- name: config-volume
mountPath: /beamconfig
volumes:
- name: config-volume
configMap:
name: vm-config