From aef0ff7810ab6f634f6b9ab849b73b0bfc992a14 Mon Sep 17 00:00:00 2001 From: Hemachandra Reddy Date: Wed, 23 Jan 2019 03:24:09 +0000 Subject: [PATCH] Liveness probes for OpenVSwitch daemons. Uses ovs-vsctl for ovs-db Uses ovs-appctl for ovs-vswitchd as "ovs-vsctl show" does not talk to ovs-vswitchd. Change-Id: Ia0b84e3546ff1693676ca61370e1344d75b6e308 --- openvswitch/templates/daemonset-ovs-db.yaml | 8 ++++++++ openvswitch/templates/daemonset-ovs-vswitchd.yaml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/openvswitch/templates/daemonset-ovs-db.yaml b/openvswitch/templates/daemonset-ovs-db.yaml index e4981cc3b..e06db37b1 100644 --- a/openvswitch/templates/daemonset-ovs-db.yaml +++ b/openvswitch/templates/daemonset-ovs-db.yaml @@ -54,6 +54,14 @@ spec: {{ tuple $envAll $envAll.Values.pod.resources.ovs.db | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} securityContext: runAsUser: 0 + livenessProbe: + exec: + command: + - /usr/bin/ovs-vsctl + - show + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 5 command: - /tmp/openvswitch-db-server.sh - start diff --git a/openvswitch/templates/daemonset-ovs-vswitchd.yaml b/openvswitch/templates/daemonset-ovs-vswitchd.yaml index a023a1e95..ae2655def 100644 --- a/openvswitch/templates/daemonset-ovs-vswitchd.yaml +++ b/openvswitch/templates/daemonset-ovs-vswitchd.yaml @@ -81,6 +81,14 @@ spec: command: - /usr/bin/ovs-vsctl - show + livenessProbe: + exec: + command: + - /usr/bin/ovs-appctl + - bond/list + initialDelaySeconds: 60 + periodSeconds: 30 + timeoutSeconds: 5 command: - /tmp/openvswitch-vswitchd.sh - start