Skip to content

Commit

Permalink
Added liveness probe to deployment example manifest
Browse files Browse the repository at this point in the history
Liveness probe configuration is added based on deployment
example in kubernetes-csi/livenessprobe.
Different port value is used than default, for showing
how it's configured.
  • Loading branch information
okartau committed Mar 11, 2019
1 parent 136a97a commit 36e16e0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ but as this is something that should be done by the cluster
provisioning tool it is disabled in the script by default. For this
and other customizations see the source code of the deploy script.

The [livenessprobe side-container](https://github.com/kubernetes-csi/livenessprobe) provided by the CSI community is deployed with the CSI driver to provide the liveness checking of the CSI services.

## Run example application and validate

Next, validate the deployment. First, ensure all expected pods are running properly including the external attacher, provisioner, and the actual hostpath driver plugin:
Expand Down
24 changes: 24 additions & 0 deletions deploy/hostpath/csi-hostpath-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ spec:
imagePullPolicy: Always
securityContext:
privileged: true
ports:
- containerPort: 9898
name: healthz
protocol: TCP
livenessProbe:
failureThreshold: 5
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 2
volumeMounts:
- mountPath: /csi
name: socket-dir
Expand All @@ -89,6 +101,18 @@ spec:
- mountPath: /var/lib/kubelet/plugins
mountPropagation: Bidirectional
name: plugins-dir

- name: liveness-probe
imagePullPolicy: Always
volumeMounts:
- mountPath: /csi
name: socket-dir
image: quay.io/k8scsi/livenessprobe:v1.0.2
args:
- --csi-address=/csi/csi.sock
- --connection-timeout=3s
- --health-port=9898

volumes:
- hostPath:
path: /var/lib/kubelet/plugins/csi-hostpath
Expand Down

0 comments on commit 36e16e0

Please sign in to comment.