From 7c7d7eb7dd663348ba7d3f4c4ec72221d16ce9bc Mon Sep 17 00:00:00 2001 From: bk160f Date: Wed, 19 Dec 2018 02:50:49 -0600 Subject: [PATCH] ReadinessProbe for OVS-DB Pod This implementation is to add readiness probe to ovs-db pod. The goal is to check if the db.sock is connected by executing ovs-vsctl command to list the Open_vswitch configuration table. Change-Id: Idd4382d95d07ffff94a30bcb7ac132b88e9d6de1 --- openvswitch/templates/daemonset-ovs-db.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/openvswitch/templates/daemonset-ovs-db.yaml b/openvswitch/templates/daemonset-ovs-db.yaml index e06db37b1..653b5b93b 100644 --- a/openvswitch/templates/daemonset-ovs-db.yaml +++ b/openvswitch/templates/daemonset-ovs-db.yaml @@ -52,6 +52,15 @@ spec: - name: openvswitch-db {{ tuple $envAll "openvswitch_db_server" | include "helm-toolkit.snippets.image" | indent 10 }} {{ tuple $envAll $envAll.Values.pod.resources.ovs.db | include "helm-toolkit.snippets.kubernetes_resources" | indent 10 }} + readinessProbe: + exec: + command: + - /usr/bin/ovs-vsctl + - list + - Open_Vswitch + initialDelaySeconds: 90 + periodSeconds: 30 + timeoutSeconds: 5 securityContext: runAsUser: 0 livenessProbe: