Skip to content

Commit ff5b6a0

Browse files
authored
Merge pull request #9 from sbezverk/readme_update
readme change for new input params
2 parents ac44520 + eeb4e1f commit ff5b6a0

File tree

2 files changed

+97
-27
lines changed

2 files changed

+97
-27
lines changed

README.md

+52-14
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ See CSI spec for more information about Probe API call.
1616
## Livenessprobe
1717
### Configuration Requirements
1818

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")
2225

2326
### Compiling
2427
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
4952
Below is an example of sidecar container which needs to be added to the CSI driver yaml.
5053

5154
```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
5457
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
5768
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
6473
initialDelaySeconds: 10
6574
timeoutSeconds: 3
6675
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
68101
volumeMounts:
69102
- mountPath: /csi
70103
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+
#
71109

72110
```
73111

Original file line numberDiff line numberDiff line change
@@ -1,22 +1,54 @@
1+
- name: hostpath-driver
2+
image: quay.io/k8scsi/hostpathplugin:v0.2.0
3+
imagePullPolicy: Always
4+
securityContext:
5+
privileged: true
16
#
2-
# This yaml must be used ONLY as a side car for CSI driver
7+
# Defining port which will be used to GET plugin health status
8+
# 9808 is default, but can be changed.
39
#
4-
- name: liveness-probe
5-
image: quay.io/k8scsi/livenessprobe:v0.2.0
6-
imagePullPolicy: Always
7-
command: ["/bin/sh"]
8-
args: ["-c", "while true; do sleep 10;done"]
10+
ports:
11+
- containerPort: 9808
12+
name: healthz
13+
protocol: TCP
914
livenessProbe:
10-
exec:
11-
command:
12-
- ./livenessprobe
13-
- --v=6
14-
- --csi-address=/csi/csi.sock
15-
- --connection-timeout=3s
15+
failureThreshold: 5
16+
httpGet:
17+
path: /healthz
18+
port: healthz
1619
initialDelaySeconds: 10
1720
timeoutSeconds: 3
1821
periodSeconds: 2
19-
failureThreshold: 1
22+
failureThreshold: 1
23+
#
24+
volumeMounts:
25+
- mountPath: /csi
26+
name: socket-dir
27+
- mountPath: /var/lib/kubelet/pods
28+
mountPropagation: Bidirectional
29+
name: mountpoint-dir
30+
args:
31+
- --v=5
32+
- --endpoint=$(CSI_ENDPOINT)
33+
- --nodeid=$(KUBE_NODE_NAME)
34+
env:
35+
- name: CSI_ENDPOINT
36+
value: unix:///csi/csi.sock
37+
- name: KUBE_NODE_NAME
38+
valueFrom:
39+
fieldRef:
40+
apiVersion: v1
41+
fieldPath: spec.nodeName
42+
#
43+
# Spec for liveness probe sidecar container
44+
#
45+
- name: liveness-probe
46+
imagePullPolicy: Always
2047
volumeMounts:
2148
- mountPath: /csi
2249
name: socket-dir
50+
image: quay.io/k8scsi/livenessprobe:v0.2.0
51+
args:
52+
- --csi-address=/csi/csi.sock
53+
- --connection-timeout=3s
54+
#

0 commit comments

Comments
 (0)