diff --git a/hack/lib/init.sh b/hack/lib/init.sh index 04c4125b622..06abade5f37 100755 --- a/hack/lib/init.sh +++ b/hack/lib/init.sh @@ -31,6 +31,10 @@ unset CDPATH # they can explicitly set GO111MODULE=on export GO111MODULE=off +if [[ "${KUBE_PROVIDERLESS:-"off"}" == "on" ]]; then + export GOFLAGS=${GOFLAGS:-"-tags=providerless"} +fi + # The root of the build/dist directory KUBE_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd -P)" diff --git a/hack/verify-typecheck-providerless.sh b/hack/verify-typecheck-providerless.sh index 56c5de10a6b..55ee5ff1bcf 100755 --- a/hack/verify-typecheck-providerless.sh +++ b/hack/verify-typecheck-providerless.sh @@ -26,7 +26,7 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. cd "${KUBE_ROOT}" # verify the providerless build # https://github.com/kubernetes/enhancements/blob/master/keps/sig-cloud-provider/1179-building-without-in-tree-providers/README.md -hack/verify-typecheck.sh --skip-test --tags=providerless --ignore-dirs=test/e2e +hack/verify-typecheck.sh --skip-test --tags=providerless # verify using go list if _out="$(go list -mod=readonly -tags "providerless" -e -json k8s.io/kubernetes/cmd/kubelet/... \