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 <bin.qian@windriver.com>
This commit is contained in:
Bin Qian 2019-01-30 16:12:12 -05:00
parent e76af6d929
commit 2b5e9fe31a

View File

@ -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