forked from CloudTestDrive/helidon-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 4
/
storefront-deployment-template.yaml
95 lines (95 loc) · 3.27 KB
/
storefront-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
apiVersion: apps/v1
kind: Deployment
metadata:
name: storefront
spec:
replicas: 1
selector:
matchLabels:
app: storefront
template:
metadata:
labels:
app: storefront
#annotations:
# prometheus.io/path: /metrics
# prometheus.io/port: "9080"
# prometheus.io/scrape: "true"
spec:
containers:
- name: storefront
image: OCIR_LOCATION/OCIR_STORAGE_NAMESPACE/OCIR_REPO:0.0.1
imagePullPolicy: Always
ports:
- name: service-port
containerPort: 8080
- name: health-port
containerPort: 9080
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 liveness 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:9080/health/ready | grep "\"outcome\":\"UP\""'
# # No point in checking until it's been running for a while
# # Comment this out when using a startup probe
# initialDelaySeconds: 15
# # Allow a short delay for the response
# timeoutSeconds: 5
# # Check every 10 seconds
# periodSeconds: 10
# # 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 48 failures
# failureThreshold: 48
# # Check every 5 seconds
# periodSeconds: 5
# # If after failureThreshold * periodSeconds it's not up and running then it's determined to have failed (4 mins in this case)
volumeMounts:
- name: sf-conf-secure-vol
mountPath: /app/confsecure
readOnly: true
- name: sf-config-map-vol
mountPath: /app/conf
readOnly: true
volumes:
- name: sf-conf-secure-vol
secret:
secretName: sf-conf-secure
- name: sf-config-map-vol
configMap:
name: sf-config-map
# imagePullSecrets:
# - name: my-docker-reg