-
Notifications
You must be signed in to change notification settings - Fork 0
/
app-tier-deployment.yml
53 lines (53 loc) · 1.48 KB
/
app-tier-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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: example-app-tier
spec:
replicas: 1
template:
metadata:
name: example-app-tier
labels:
app: example
tier: app
annotations:
pod.beta.kubernetes.io/init-containers: '[{
"name": "await-redis",
"image": "slashdeploy/microservice-example:server-v1",
"imagePullPolicy": "IfNotPresent",
"env": [{
"name": "REDIS_URL",
"value": "redis://$(EXAMPLE_DATA_TIER_SERVICE_HOST):$(EXAMPLE_DATA_TIER_SERVICE_PORT_REDIS)"
}],
"command": [
"npm",
"run-script",
"await-redis"
]
}]'
spec:
containers:
- name: server
image: "slashdeploy/microservice-example:server-v1"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
protocol: TCP
env:
- name: REDIS_URL
value: "redis://$(EXAMPLE_DATA_TIER_SERVICE_HOST):$(EXAMPLE_DATA_TIER_SERVICE_PORT_REDIS)"
- name: DEBUG
value: "express:*"
resources:
requests:
cpu: "100m"
livenessProbe:
httpGet:
path: /probe/liveness
port: 8080
initialDelaySeconds: 3
readinessProbe:
httpGet:
path: /probe/readiness
port: 8080
initialDelaySeconds: 5