From 2b5e9fe31a050e041772f941f02c688290fb6cf9 Mon Sep 17 00:00:00 2001 From: Bin Qian Date: Wed, 30 Jan 2019 16:12:12 -0500 Subject: [PATCH] Enable kubelet service to be monitored by pmond Generate/clear kubelet.pid file at start/stop of kubelet service Story: 2002843 Task: 29216 Change-Id: I41206c7ea14d79b5d0cbca945e7a6488eda9b7bb Signed-off-by: Bin Qian --- kubernetes/kubernetes/centos/files/kubeadm.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kubernetes/kubernetes/centos/files/kubeadm.conf b/kubernetes/kubernetes/centos/files/kubeadm.conf index 62e3fd96d..7bba1dd45 100644 --- a/kubernetes/kubernetes/centos/files/kubeadm.conf +++ b/kubernetes/kubernetes/centos/files/kubeadm.conf @@ -9,6 +9,8 @@ EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env EnvironmentFile=-/etc/sysconfig/kubelet ExecStart= ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS +ExecStartPost=/bin/bash -c 'echo $MAINPID > /var/run/kubelet.pid;' +ExecStopPost=/bin/rm -f /var/run/kubelet.pid Restart=always StartLimitInterval=0 RestartSec=10