stop setting providerless/dockerless tags by default

This commit is contained in:
Benjamin Elder
2021-03-03 14:30:13 -08:00
parent 0cd183476c
commit 3a63f11ea4
2 changed files with 6 additions and 18 deletions

View File

@@ -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()...,
)