-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathspring-data-deployment.yml
63 lines (63 loc) · 1.71 KB
/
spring-data-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
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: spring-data-service
name: spring-data-service
spec:
selector:
matchLabels:
app: spring-data-service
template:
metadata:
labels:
app: spring-data-service
spec:
# enable for Astra
# volumes:
# - name: astravol
# secret:
# secretName: astracreds
# items:
# - key: secure-connect-bundle
# path: creds
containers:
- env:
- name: KUBERNETES_TRUST_CERTIFICATES
value: "true"
- name: SPRING_CLOUD_KUBERNETES_CONFIG_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: DB_USERNAME
valueFrom:
secretKeyRef:
name: db-secret
key: username
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-secret
key: password
# enable for Astra
# volumeMounts:
# - name: astravol
# mountPath: "/app/astra"
# readOnly: true
image: csplinter/spring-data-service:1.0.0-SNAPSHOT
imagePullPolicy: Never
name: spring-data-service
ports:
- name: http
containerPort: 8081
- name: actuator
containerPort: 8082
livenessProbe:
httpGet:
path: /actuator/health
port: actuator
initialDelaySeconds: 120
readinessProbe:
httpGet:
path: /actuator/health
port: actuator