-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.yaml
55 lines (54 loc) · 1.38 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
apiVersion: apps/v1
kind: Deployment
metadata:
name: consul-demo
labels:
app: consul-demo
namespace: test
spec:
replicas: 1
selector:
matchLabels:
app: consul-demo
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 0
maxSurge: 1
template:
metadata:
labels:
app: consul-demo
spec:
volumes:
- name: config-output-volume
emptyDir:
medium: Memory
initContainers:
- name: consul-config-init
image: gcr.io/acedemand-poc/consul-init:5
env:
- name: CONSUL_ADDR
value: "http://consul-server.hashicorp:8500"
- name: CONFIG_KEY_PATH
value: /test/1/data
- name: CONFIG_OUTPUT_FILEPATH
value: /app/config/app-config.properties
volumeMounts:
- name: config-output-volume
mountPath: /app/config
imagePullPolicy: IfNotPresent
containers:
- name: application
image: nginx
ports:
- name: http
containerPort: 8080
protocol: TCP
volumeMounts:
- name: config-output-volume
mountPath: /app/config
imagePullPolicy: IfNotPresent
restartPolicy: Always
terminationGracePeriodSeconds: 120
schedulerName: default-scheduler