mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	adds post install step to kubeadm deb built by bazel
Signed-off-by: Ruben Orduz <rubenoz@gmail.com>
This commit is contained in:
		@@ -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",
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										30
									
								
								build/debs/postinst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								build/debs/postinst
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
#!/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
 | 
			
		||||
		Reference in New Issue
	
	Block a user