mirror of
https://github.com/kubernetes-sigs/kind.git
synced 2025-12-01 07:26:05 +07:00
stop setting providerless/dockerless tags by default
This commit is contained in:
@@ -28,6 +28,12 @@ TAG="${DATE}-$(git describe --always --dirty)"
|
||||
|
||||
# build
|
||||
KUBEROOT="${KUBEROOT:-${GOPATH}/src/k8s.io/kubernetes}"
|
||||
|
||||
GOFLAGS="${GOFLAGS:-}"
|
||||
if [ -z "${GOFLAGS}" ]; then
|
||||
# TODO: add dockerless when 1.19 or greater
|
||||
GOFLAGS="-tags=providerless"
|
||||
fi
|
||||
set -x
|
||||
"${REPO_ROOT}/bin/kind" build node-image --image="kindest/node:${TAG}" --kube-root="${KUBEROOT}"
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@ import (
|
||||
"sigs.k8s.io/kind/pkg/errors"
|
||||
"sigs.k8s.io/kind/pkg/exec"
|
||||
"sigs.k8s.io/kind/pkg/log"
|
||||
|
||||
"k8s.io/apimachinery/pkg/util/version"
|
||||
)
|
||||
|
||||
// TODO(bentheelder): plumb through arch
|
||||
@@ -71,20 +69,6 @@ func (b *dockerBuilder) Build() (Bits, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// check for version specific workarounds
|
||||
ver, err := version.ParseSemantic(sourceVersionRaw)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to parse source version")
|
||||
}
|
||||
// leverage in-tree-cloud-provider-free builds by default
|
||||
// https://github.com/kubernetes/kubernetes/pull/80353
|
||||
// leverage dockershim free builds by default
|
||||
// https://github.com/kubernetes/kubernetes/pull/87746
|
||||
goflags := "GOFLAGS=-tags=providerless,dockerless"
|
||||
if ver.LessThan(version.MustParseSemantic("v1.19.0")) {
|
||||
goflags = "GOFLAGS=-tags=providerless"
|
||||
}
|
||||
|
||||
// we will pass through the environment variables, prepending defaults
|
||||
// NOTE: if env are specified multiple times the last one wins
|
||||
env := append(
|
||||
@@ -96,8 +80,6 @@ func (b *dockerBuilder) Build() (Bits, error) {
|
||||
"KUBE_BUILD_CONFORMANCE=n",
|
||||
// build for the host platform
|
||||
"KUBE_BUILD_PLATFORMS=" + dockerBuildOsAndArch(b.arch),
|
||||
// pass goflags
|
||||
goflags,
|
||||
},
|
||||
os.Environ()...,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user