-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yaml
74 lines (74 loc) · 1.78 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
apiVersion: v1
kind: Service
metadata:
labels:
run: demo-config-watcher
name: demo-config-watcher
annotations:
boot.spring.io/actuator: http://:8080/actuator
spec:
ports:
- name: http
port: 8080
targetPort: 8080
selector:
run: demo-config-watcher
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-config-watcher
spec:
selector:
matchLabels:
run: demo-config-watcher
replicas: 8
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
template:
metadata:
labels:
run: demo-config-watcher
spec:
serviceAccountName: spring-cloud-kubernetes-configuration-watcher
containers:
- name: demo-config-watcher
image: angeljava/demo-config-watcher:latest
imagePullPolicy: Always
ports:
- containerPort: 8080
env:
- name: SPRING_PROFILES_ACTIVE
value: "default"
- name: TZ
value: "America/Mexico_City"
# - name: MONGO_USERNAME
# valueFrom:
# secretKeyRef:
# name: db-secret
# key: username
# - name: MONGO_PASSWORD
# valueFrom:
# secretKeyRef:
# name: db-secret
# key: password
volumeMounts:
- name: config-volume
mountPath: /etc/config
- name: db-secret
mountPath: "/etc/secrets/db-secret"
- name: second-secret
mountPath: "/etc/secrets/second-secret"
volumes:
- name: config-volume
configMap:
name: demo-configmap
- name: db-secret
secret:
secretName: db-secret
- name: second-secret
secret:
secretName: second-secret