Skip to content

Commit

Permalink
Add readiness probe to handler (#724)
Browse files Browse the repository at this point in the history
If kubernetes-nmstate is deployed at a cluster with not compatible nodes
(like NetworkManager not started, bad version or not installed) the
kubernetes-nmstate-handler start without issue. This change add a
readiness probe that runs "nmstatectl show" to check if nmstatectl is
functional at a basic level.

Signed-off-by: Quique Llorente <[email protected]>
  • Loading branch information
qinqon authored Apr 9, 2021
1 parent b7e2ef0 commit a52aca4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions deploy/handler/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,14 @@ spec:
mountPath: /var/k8s_nmstate
securityContext:
privileged: true
readinessProbe:
exec:
command:
- nmstatectl
- show
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 1
volumes:
- name: dbus-socket
hostPath:
Expand Down

0 comments on commit a52aca4

Please sign in to comment.