Unverified Commit 2a54f83e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #65554 from rdodev/kubelet-postinstall-step

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. bazel: kubelet deb package postinstall step **What this PR does / why we need it**: Presently bazel build .deb (kubelet.deb specifically) does not auto-restart after installation. Adding a postinst control file fixes this. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: kubernetes/kubeadm#944 **Special notes for your reviewer**: @chuckha ```release-note bazel deb package bugfix: The kubeadm deb package now reloads the kubelet after installation ```
parents 714f4480 512eb62e
......@@ -164,6 +164,7 @@ k8s_deb(
description = """Kubernetes Cluster Bootstrapping Tool
The Kubernetes command line tool for bootstrapping a Kubernetes cluster.
""",
postinst = "postinst",
version_file = "//build:os_package_version",
)
......
#!/bin/sh
# see: dh_installdeb(1)
set -o errexit
set -o nounset
case "$1" in
configure)
# because kubeadm package adds kubelet drop-ins, we must daemon-reload
# and restart kubelet now. restarting kubelet is ok because kubelet
# postinst configure step auto-starts it.
systemctl daemon-reload 2>/dev/null || true
systemctl restart kubelet 2>/dev/null || true
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment