diff --git a/go.mod b/go.mod index daae2020e110..791a8fa9eff8 100644 --- a/go.mod +++ b/go.mod @@ -56,7 +56,7 @@ require ( sigs.k8s.io/cluster-api v1.7.1 sigs.k8s.io/controller-runtime v0.19.1 sigs.k8s.io/custom-metrics-apiserver v1.30.1-0.20241105195130-84dc8cfe2555 - sigs.k8s.io/kind v0.24.0 + sigs.k8s.io/kind v0.25.0 sigs.k8s.io/mcs-api v0.1.0 sigs.k8s.io/metrics-server v0.7.1 sigs.k8s.io/structured-merge-diff/v4 v4.4.1 diff --git a/go.sum b/go.sum index 0c1858f8f58a..a973f2d6b362 100644 --- a/go.sum +++ b/go.sum @@ -1488,8 +1488,8 @@ sigs.k8s.io/custom-metrics-apiserver v1.30.1-0.20241105195130-84dc8cfe2555/go.mo sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/kind v0.8.1/go.mod h1:oNKTxUVPYkV9lWzY6CVMNluVq8cBsyq+UgPJdvA3uu4= -sigs.k8s.io/kind v0.24.0 h1:g4y4eu0qa+SCeKESLpESgMmVFBebL0BDa6f777OIWrg= -sigs.k8s.io/kind v0.24.0/go.mod h1:t7ueEpzPYJvHA8aeLtI52rtFftNgUYUaCwvxjk7phfw= +sigs.k8s.io/kind v0.25.0 h1:ugUvgesHKKA0yKmD6QtYTiEev+kPUpGxdTPbMGf8VTU= +sigs.k8s.io/kind v0.25.0/go.mod h1:t7ueEpzPYJvHA8aeLtI52rtFftNgUYUaCwvxjk7phfw= sigs.k8s.io/kustomize/api v0.17.2 h1:E7/Fjk7V5fboiuijoZHgs4aHuexi5Y2loXlVOAVAG5g= sigs.k8s.io/kustomize/api v0.17.2/go.mod h1:UWTz9Ct+MvoeQsHcJ5e+vziRRkwimm3HytpZgIYqye0= sigs.k8s.io/kustomize/kyaml v0.17.1 h1:TnxYQxFXzbmNG6gOINgGWQt09GghzgTP6mIurOgrLCQ= diff --git a/hack/cli-testing-environment.sh b/hack/cli-testing-environment.sh index 698a1df7f496..6167eec707b9 100755 --- a/hack/cli-testing-environment.sh +++ b/hack/cli-testing-environment.sh @@ -35,7 +35,7 @@ BUILD_PATH=${BUILD_PATH:-"_output/bin/linux/amd64"} # install kind and kubectl -kind_version=v0.22.0 +kind_version=v0.25.0 echo -n "Preparing: 'kind' existence check - " if util::cmd_exist kind; then echo "passed" diff --git a/hack/cli-testing-init-with-config.sh b/hack/cli-testing-init-with-config.sh index 7de0db44fba9..200e429ae243 100755 --- a/hack/cli-testing-init-with-config.sh +++ b/hack/cli-testing-init-with-config.sh @@ -35,7 +35,7 @@ BUILD_PATH=${BUILD_PATH:-"_output/bin/linux/amd64"} CONFIG_FILE_PATH=${CONFIG_FILE_PATH:-"/tmp/karmada-config.yaml"} # install kind and kubectl -kind_version=v0.24.0 +kind_version=v0.25.0 echo -n "Preparing: 'kind' existence check - " if util::cmd_exist kind; then echo "passed" diff --git a/hack/local-up-karmada-by-operator.sh b/hack/local-up-karmada-by-operator.sh index f80215ece491..7e7156be4fb1 100755 --- a/hack/local-up-karmada-by-operator.sh +++ b/hack/local-up-karmada-by-operator.sh @@ -87,7 +87,7 @@ util::verify_go_version util::cmd_must_exist "docker" # install kind and kubectl -kind_version=v0.24.0 +kind_version=v0.25.0 echo -n "Preparing: 'kind' existence check - " if util::cmd_exist kind; then echo "passed" diff --git a/hack/local-up-karmada.sh b/hack/local-up-karmada.sh index 5b6521bd2709..fa2ac371c0c8 100755 --- a/hack/local-up-karmada.sh +++ b/hack/local-up-karmada.sh @@ -80,7 +80,7 @@ util::verify_go_version util::verify_docker # install kind and kubectl -kind_version=v0.24.0 +kind_version=v0.25.0 echo -n "Preparing: 'kind' existence check - " if util::cmd_exist kind; then echo "passed" diff --git a/hack/util.sh b/hack/util.sh index 6c4da8709b19..fb2f996ceee0 100755 --- a/hack/util.sh +++ b/hack/util.sh @@ -39,7 +39,7 @@ KARMADA_GO_PACKAGE="github.com/karmada-io/karmada" MIN_Go_VERSION=go1.22.9 -DEFAULT_CLUSTER_VERSION="kindest/node:v1.31.0" +DEFAULT_CLUSTER_VERSION="kindest/node:v1.31.2" KARMADA_TARGET_SOURCE=( karmada-aggregated-apiserver=cmd/aggregated-apiserver diff --git a/vendor/modules.txt b/vendor/modules.txt index 7357c33076eb..b123f8ce00c1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1868,7 +1868,7 @@ sigs.k8s.io/custom-metrics-apiserver/pkg/registry/external_metrics ## explicit; go 1.18 sigs.k8s.io/json sigs.k8s.io/json/internal/golang/encoding/json -# sigs.k8s.io/kind v0.24.0 +# sigs.k8s.io/kind v0.25.0 ## explicit; go 1.17 sigs.k8s.io/kind/pkg/apis/config/defaults sigs.k8s.io/kind/pkg/apis/config/v1alpha4 diff --git a/vendor/sigs.k8s.io/kind/pkg/apis/config/defaults/image.go b/vendor/sigs.k8s.io/kind/pkg/apis/config/defaults/image.go index 521f13ba496a..f08af1d973e4 100644 --- a/vendor/sigs.k8s.io/kind/pkg/apis/config/defaults/image.go +++ b/vendor/sigs.k8s.io/kind/pkg/apis/config/defaults/image.go @@ -18,4 +18,4 @@ limitations under the License. package defaults // Image is the default for the Config.Image field, aka the default node image. -const Image = "kindest/node:v1.31.0@sha256:53df588e04085fd41ae12de0c3fe4c72f7013bba32a20e7325357a1ac94ba865" +const Image = "kindest/node:v1.31.2@sha256:18fbefc20a7113353c7b75b5c869d7145a6abd6269154825872dc59c1329912e" diff --git a/vendor/sigs.k8s.io/kind/pkg/cluster/internal/providers/docker/network.go b/vendor/sigs.k8s.io/kind/pkg/cluster/internal/providers/docker/network.go index f43284610865..b356dd78ede1 100644 --- a/vendor/sigs.k8s.io/kind/pkg/cluster/internal/providers/docker/network.go +++ b/vendor/sigs.k8s.io/kind/pkg/cluster/internal/providers/docker/network.go @@ -261,7 +261,17 @@ func checkIfNetworkExists(name string) (bool, error) { func isIPv6UnavailableError(err error) bool { rerr := exec.RunErrorForError(err) - return rerr != nil && strings.HasPrefix(string(rerr.Output), "Error response from daemon: Cannot read IPv6 setup for bridge") + if rerr == nil { + return false + } + errorMessage := string(rerr.Output) + // we get this error when ipv6 was disabled in docker + const dockerIPV6DisabledError = "Error response from daemon: Cannot read IPv6 setup for bridge" + // TODO: this is fragile, and only necessary due to docker enabling ipv6 by default + // even on hosts that lack ip6tables setup. + // Preferably users would either have ip6tables setup properly or else disable ipv6 in docker + const dockerIPV6TablesError = "Error response from daemon: Failed to Setup IP tables: Unable to enable NAT rule: (iptables failed: ip6tables" + return strings.HasPrefix(errorMessage, dockerIPV6DisabledError) || strings.HasPrefix(errorMessage, dockerIPV6TablesError) } func isPoolOverlapError(err error) bool { diff --git a/vendor/sigs.k8s.io/kind/pkg/cluster/internal/providers/podman/provider.go b/vendor/sigs.k8s.io/kind/pkg/cluster/internal/providers/podman/provider.go index 856b07b046fd..fa311617d925 100644 --- a/vendor/sigs.k8s.io/kind/pkg/cluster/internal/providers/podman/provider.go +++ b/vendor/sigs.k8s.io/kind/pkg/cluster/internal/providers/podman/provider.go @@ -171,6 +171,15 @@ func (p *provider) DeleteNodes(n []nodes.Node) error { return deleteVolumes(nodeVolumes) } +// getHostIPOrDefault defaults HostIP to localhost if is not set +// xref: https://github.com/kubernetes-sigs/kind/issues/3777 +func getHostIPOrDefault(hostIP string) string { + if hostIP == "" { + return "127.0.0.1" + } + return hostIP +} + // GetAPIServerEndpoint is part of the providers.Provider interface func (p *provider) GetAPIServerEndpoint(cluster string) (string, error) { // locate the node that hosts this @@ -266,7 +275,7 @@ func (p *provider) GetAPIServerEndpoint(cluster string) (string, error) { } for _, pm := range v { if containerPort == common.APIServerInternalPort && protocol == "tcp" { - return net.JoinHostPort(pm.HostIP, pm.HostPort), nil + return net.JoinHostPort(getHostIPOrDefault(pm.HostIP), pm.HostPort), nil } } } @@ -278,7 +287,7 @@ func (p *provider) GetAPIServerEndpoint(cluster string) (string, error) { } for _, pm := range portMappings19 { if pm.ContainerPort == common.APIServerInternalPort && pm.Protocol == "tcp" { - return net.JoinHostPort(pm.HostIP, strconv.Itoa(int(pm.HostPort))), nil + return net.JoinHostPort(getHostIPOrDefault(pm.HostIP), strconv.Itoa(int(pm.HostPort))), nil } } diff --git a/vendor/sigs.k8s.io/kind/pkg/cmd/kind/version/version.go b/vendor/sigs.k8s.io/kind/pkg/cmd/kind/version/version.go index 9f6da9acc277..3f4dcbf1d139 100644 --- a/vendor/sigs.k8s.io/kind/pkg/cmd/kind/version/version.go +++ b/vendor/sigs.k8s.io/kind/pkg/cmd/kind/version/version.go @@ -54,7 +54,7 @@ func DisplayVersion() string { } // versionCore is the core portion of the kind CLI version per Semantic Versioning 2.0.0 -const versionCore = "0.24.0" +const versionCore = "0.25.0" // versionPreRelease is the base pre-release portion of the kind CLI version per // Semantic Versioning 2.0.0