Skip to content

readme change for new input params #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
#