From 8a96ed0d207a16e80b6b217da2c9307b77ec6b82 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Thu, 1 Dec 2022 11:22:17 +0100 Subject: [PATCH] Link `kubectl-convert` binary statically The kubectl-convert binary itself only depends on the following runtime libraries when linking dynamically: ``` > ldd _output/bin/kubectl-convert linux-vdso.so.1 (0x00007ffef0786000) libpthread.so.0 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libpthread.so.0 (0x00007f5f4ac25000) libdl.so.2 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libdl.so.2 (0x00007f5f4ac20000) libc.so.6 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/libc.so.6 (0x00007f5f4aa00000) /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib/ld-linux-x86-64.so.2 => /nix/store/4nlgxhb09sdr51nc9hdm8az5b08vzkgx-glibc-2.35-163/lib64/ld-linux-x86-64.so.2 (0x00007f5f4ac2c000) ``` We now move kubectl-convert to become a static binary as well to achieve maximum portability. Signed-off-by: Sascha Grunert --- hack/lib/golang.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh index fb97ee76783..e74a090ccac 100755 --- a/hack/lib/golang.sh +++ b/hack/lib/golang.sh @@ -332,6 +332,7 @@ readonly KUBE_STATIC_LIBRARIES=( kube-log-runner kubeadm kubectl + kubectl-convert kubemark )