forked from CloudTestDrive/helidon-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 4
/
stockmanager-deployment-template.yaml
132 lines (132 loc) · 4.51 KB
/
stockmanager-deployment-template.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
apiVersion: apps/v1
kind: Deployment
metadata:
name: stockmanager
spec:
replicas: 1
selector:
matchLabels:
app: stockmanager
template:
metadata:
labels:
app: stockmanager
#annotations:
# prometheus.io/path: /metrics
# prometheus.io/port: "9081"
# prometheus.io/scrape: "true"
spec:
containers:
- name: stockmanager
image: OCIR_LOCATION/OCIR_STORAGE_NAMESPACE/OCIR_REPO:0.0.1
imagePullPolicy: Always
ports:
- name: service-port
containerPort: 8081
- name: health-port
containerPort: 9081
env:
- name: javax.sql.DataSource.stockmanagerDataSource.dataSourceClassName
valueFrom:
secretKeyRef:
name: stockmanagerdb
key: dataSourceClassName
- name: javax.sql.DataSource.stockmanagerDataSource.dataSource.url
valueFrom:
secretKeyRef:
name: stockmanagerdb
key: url
- name: javax.sql.DataSource.stockmanagerDataSource.dataSource.user
valueFrom:
secretKeyRef:
name: stockmanagerdb
key: username
- name: javax.sql.DataSource.stockmanagerDataSource.dataSource.password
valueFrom:
secretKeyRef:
name: stockmanagerdb
key: password
- name: hibernate.dialect
valueFrom:
secretKeyRef:
name: stockmanagerdb
key: hibernatedialect
- name: hibernate.hbm2ddl.auto
valueFrom:
secretKeyRef:
name: stockmanagerdb
key: hibernateauto
resources:
limits:
# Set this to be quarter of a CPU for now
cpu: "250m"
# # Use this to check if the pod is alive
# livenessProbe:
# #Simple check to see if the status call works
# # If must return a 200 - 399 http status code
# httpGet:
# path: /health/live
# port: health-port
# # Give it time to make sure it's had a chance to start up
# # Comment this out when using a startup probe
# initialDelaySeconds: 120
# # Let it have a 5 second timeout to wait for a response
# timeoutSeconds: 5
# # Check every 5 seconds (default is 1)
# periodSeconds: 5
# # Need to have 3 failures before we decide the pod is dead, not just slow
# failureThreshold: 3
# # This checks if the pod is ready to process requests
# readinessProbe:
# exec:
# command:
# - /bin/bash
# - -c
# - 'curl -s http://localhost:9081/health/ready | grep "\"outcome\":\"UP\""'
# # No point in checking until it's been running for at least 15 seconds
# # Comment this out when using a startup probe
# initialDelaySeconds: 15
# # Allow a short delay for the response
# timeoutSeconds: 10
# # Check every 20 seconds
# periodSeconds: 20
# # Need at least only one fail for this to be a problem
# failureThreshold: 1
# # Use this to check if the pod is started this has to pass before the liveness kicks in
# # note that this was released as beta in k8s V 1.18
# startupProbe:
# #Simple check to see if the status call works
# # If must return a 200 - 399 http status code
# httpGet:
# path: /status
# port: service-port
# # No initial delay - it starts checking immediately
# # Let it have a 5 second timeout
# timeoutSeconds: 5
# # allow for up to 24 failures
# failureThreshold: 24
# # Check every 10 seconds
# periodSeconds: 10
# # If after failureThreshold * periodSeconds it's not up and running then it's determined to have failed (4 mins in this case)
volumeMounts:
- name: sm-config-map-vol
mountPath: /app/conf
readOnly: true
- name: sm-conf-secure-vol
mountPath: /app/confsecure
readOnly: true
- name: sm-wallet-atp
mountPath: /app/Wallet_ATP
readOnly: true
volumes:
- name: sm-config-map-vol
configMap:
name: sm-config-map
- name: sm-conf-secure-vol
secret:
secretName: sm-conf-secure
- name: sm-wallet-atp
secret:
secretName: sm-wallet-atp
# imagePullSecrets:
# - name: my-docker-reg