-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProbes.yaml
69 lines (69 loc) · 2.17 KB
/
Probes.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: k8s-probes-test-deployment
labels:
app: k8s-probes-test
spec:
replicas: 3
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: k8s-probes-test
template:
metadata:
labels:
app: k8s-probes-test
spec:
containers:
- name: k8s-probes-test
image: xxxxxxxx.azurecr.io/k8s-probes-test:1.0.0
env:
- name: TenantId
value: ""
- name: SubscriptionId
value: ""
- name: ClientId
value: ""
- name: ClientSecret
value: ""
- name: ResourceGroupName
value: ""
- name: ServiceBusNamespace
value: ""
- name: ServiceBusNamespaceSASKey
value: ""
- name: RequestQueueName
value: "demo-request-queue"
- name: ResponseQueueName
value: "demo-response-queue"
- name: LivenessSignalIntervalSeconds
value: "5"
# After initialDelaySeconds check (within timeoutSeconds) if pods generated ready.txt file (successThreshold many times). If they did not then recheck every periodSeconds.
# If probes fail after failureThreshold attempts i.e. after (failureThreshold * periodSeconds) seconds then pods do not receive traffic / requests.
startupProbe:
failureThreshold: 1
exec:
command:
- rm
- started.signal
initialDelaySeconds: 30
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 1
# After initialDelaySeconds check (within timeoutSeconds) if pods generated alive.txt file (successThreshold many times). If they did then recheck every periodSeconds.
# If probes fail after failureThreshold attempts i.e. after (failureThreshold * periodSeconds) seconds then pods are rebooted.
livenessProbe:
failureThreshold: 1
exec:
command:
- rm
- alive.signal
initialDelaySeconds: 10
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1