allow kubectl to be built statically

* Package kubectl in a container
* Add example with a pod using kubectl as a sidecar
This commit is contained in:
Daniel Smith
2015-06-01 16:59:16 -07:00
parent 67f53d2eff
commit 6e95388672
6 changed files with 130 additions and 0 deletions

View File

@@ -99,6 +99,11 @@ readonly KUBE_STATIC_LIBRARIES=(
kube::golang::is_statically_linked_library() {
local e
for e in "${KUBE_STATIC_LIBRARIES[@]}"; do [[ "$1" == *"/$e" ]] && return 0; done;
# Allow individual overrides--e.g., so that you can get a static build of
# kubectl for inclusion in a container.
if [ -n "${KUBE_STATIC_OVERRIDES:+x}" ]; then
for e in "${KUBE_STATIC_OVERRIDES[@]}"; do [[ "$1" == *"/$e" ]] && return 0; done;
fi
return 1;
}