Skip to content

Commit

Permalink
Merge pull request #9 from sbezverk/readme_update
Browse files Browse the repository at this point in the history
readme change for new input params
  • Loading branch information
sbezverk authored Mar 22, 2018
2 parents ac44520 + eeb4e1f commit ff5b6a0
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 27 deletions.
66 changes: 52 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ See CSI spec for more information about Probe API call.
## Livenessprobe
### Configuration Requirements

* --v defines level of logging
* --csi-address path to the location of csi socket opened by the ddriver
* --connection-timeout time to wait for the driver to return reply on Probe request
* -connection-timeout duration
Timeout for waiting for CSI driver socket in seconds. (default 30s)
* -csi-address string
Address of the CSI driver socket. (default "/run/csi/socket")
* -health-port string
TCP ports for listening healthz requests (default "9808")

### Compiling
Livenessprobe can be compiled in a form of a binary file or in a form of a container. When compiled
Expand Down Expand Up @@ -49,25 +52,60 @@ quay.io/k8scsi/livenessprobe canary 8f65dd5f789a 1
Below is an example of sidecar container which needs to be added to the CSI driver yaml.

```yaml
- name: liveness-probe
image: quay.io/k8scsi/livenessprobe:v0.2.0
- name: hostpath-driver
image: quay.io/k8scsi/hostpathplugin:v0.2.0
imagePullPolicy: Always
command: ["/bin/sh"]
args: ["-c", "while true; do sleep 10;done"]
securityContext:
privileged: true
#
# Defining port which will be used to GET plugin health status
# 9808 is default, but can be changed.
#
ports:
- containerPort: 9808
name: healthz
protocol: TCP
livenessProbe:
exec:
command:
- ./livenessprobe
- --v=6
- --csi-address=/csi/csi.sock
- --connection-timeout=3s
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 2
failureThreshold: 1
failureThreshold: 1
#
volumeMounts:
- mountPath: /csi
name: socket-dir
- mountPath: /var/lib/kubelet/pods
mountPropagation: Bidirectional
name: mountpoint-dir
args:
- --v=5
- --endpoint=$(CSI_ENDPOINT)
- --nodeid=$(KUBE_NODE_NAME)
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
#
# Spec for liveness probe sidecar container
#
- name: liveness-probe
imagePullPolicy: Always
volumeMounts:
- mountPath: /csi
name: socket-dir
image: quay.io/k8scsi/livenessprobe:v0.2.0
args:
- --csi-address=/csi/csi.sock
- --connection-timeout=3s
#

```

Expand Down
58 changes: 45 additions & 13 deletions deployment/kubernetes/livenessprobe-sidecar.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,54 @@
- name: hostpath-driver
image: quay.io/k8scsi/hostpathplugin:v0.2.0
imagePullPolicy: Always
securityContext:
privileged: true
#
# This yaml must be used ONLY as a side car for CSI driver
# Defining port which will be used to GET plugin health status
# 9808 is default, but can be changed.
#
- name: liveness-probe
image: quay.io/k8scsi/livenessprobe:v0.2.0
imagePullPolicy: Always
command: ["/bin/sh"]
args: ["-c", "while true; do sleep 10;done"]
ports:
- containerPort: 9808
name: healthz
protocol: TCP
livenessProbe:
exec:
command:
- ./livenessprobe
- --v=6
- --csi-address=/csi/csi.sock
- --connection-timeout=3s
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 2
failureThreshold: 1
failureThreshold: 1
#
volumeMounts:
- mountPath: /csi
name: socket-dir
- mountPath: /var/lib/kubelet/pods
mountPropagation: Bidirectional
name: mountpoint-dir
args:
- --v=5
- --endpoint=$(CSI_ENDPOINT)
- --nodeid=$(KUBE_NODE_NAME)
env:
- name: CSI_ENDPOINT
value: unix:///csi/csi.sock
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
#
# Spec for liveness probe sidecar container
#
- name: liveness-probe
imagePullPolicy: Always
volumeMounts:
- mountPath: /csi
name: socket-dir
image: quay.io/k8scsi/livenessprobe:v0.2.0
args:
- --csi-address=/csi/csi.sock
- --connection-timeout=3s
#

0 comments on commit ff5b6a0

Please sign in to comment.