@@ -16,9 +16,12 @@ See CSI spec for more information about Probe API call.
16
16
## Livenessprobe
17
17
### Configuration Requirements
18
18
19
- * --v defines level of logging
20
- * --csi-address path to the location of csi socket opened by the ddriver
21
- * --connection-timeout time to wait for the driver to return reply on Probe request
19
+ * -connection-timeout duration
20
+ Timeout for waiting for CSI driver socket in seconds. (default 30s)
21
+ * -csi-address string
22
+ Address of the CSI driver socket. (default "/run/csi/socket")
23
+ * -health-port string
24
+ TCP ports for listening healthz requests (default "9808")
22
25
23
26
### Compiling
24
27
Livenessprobe can be compiled in a form of a binary file or in a form of a container. When compiled
@@ -49,25 +52,60 @@ quay.io/k8scsi/livenessprobe canary 8f65dd5f789a 1
49
52
Below is an example of sidecar container which needs to be added to the CSI driver yaml.
50
53
51
54
``` yaml
52
- - name : liveness-probe
53
- image : quay.io/k8scsi/livenessprobe :v0.2.0
55
+ - name : hostpath-driver
56
+ image : quay.io/k8scsi/hostpathplugin :v0.2.0
54
57
imagePullPolicy : Always
55
- command : ["/bin/sh"]
56
- args : ["-c", "while true; do sleep 10;done"]
58
+ securityContext :
59
+ privileged : true
60
+ #
61
+ # Defining port which will be used to GET plugin health status
62
+ # 9808 is default, but can be changed.
63
+ #
64
+ ports :
65
+ - containerPort : 9808
66
+ name : healthz
67
+ protocol : TCP
57
68
livenessProbe :
58
- exec :
59
- command :
60
- - ./livenessprobe
61
- - --v=6
62
- - --csi-address=/csi/csi.sock
63
- - --connection-timeout=3s
69
+ failureThreshold : 5
70
+ httpGet :
71
+ path : /healthz
72
+ port : healthz
64
73
initialDelaySeconds : 10
65
74
timeoutSeconds : 3
66
75
periodSeconds : 2
67
- failureThreshold : 1
76
+ failureThreshold : 1
77
+ #
78
+ volumeMounts :
79
+ - mountPath : /csi
80
+ name : socket-dir
81
+ - mountPath : /var/lib/kubelet/pods
82
+ mountPropagation : Bidirectional
83
+ name : mountpoint-dir
84
+ args :
85
+ - --v=5
86
+ - --endpoint=$(CSI_ENDPOINT)
87
+ - --nodeid=$(KUBE_NODE_NAME)
88
+ env :
89
+ - name : CSI_ENDPOINT
90
+ value : unix:///csi/csi.sock
91
+ - name : KUBE_NODE_NAME
92
+ valueFrom :
93
+ fieldRef :
94
+ apiVersion : v1
95
+ fieldPath : spec.nodeName
96
+ #
97
+ # Spec for liveness probe sidecar container
98
+ #
99
+ - name : liveness-probe
100
+ imagePullPolicy : Always
68
101
volumeMounts :
69
102
- mountPath : /csi
70
103
name : socket-dir
104
+ image : quay.io/k8scsi/livenessprobe:v0.2.0
105
+ args :
106
+ - --csi-address=/csi/csi.sock
107
+ - --connection-timeout=3s
108
+ #
71
109
72
110
```
73
111
0 commit comments