Skip to content

Commit 1601b9e

Browse files
Merge pull request #2241 from dusk125/bump-1.32.3
OCPBUGS-53014: Bump 1.32.3
2 parents 2ed17b4 + e1bb189 commit 1601b9e

File tree

121 files changed

+2826
-1152
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+2826
-1152
lines changed

CHANGELOG/CHANGELOG-1.32.md

Lines changed: 192 additions & 53 deletions
Large diffs are not rendered by default.

cmd/kube-apiserver/app/options/completion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (s *ServerRunOptions) Complete(ctx context.Context) (CompletedOptions, erro
5757
if err != nil {
5858
return CompletedOptions{}, err
5959
}
60-
controlplane, err := s.Options.Complete(ctx, s.Flags(), []string{"kubernetes.default.svc", "kubernetes.default", "kubernetes"}, []net.IP{apiServerServiceIP})
60+
controlplane, err := s.Options.Complete(ctx, []string{"kubernetes.default.svc", "kubernetes.default", "kubernetes"}, []net.IP{apiServerServiceIP})
6161
if err != nil {
6262
return CompletedOptions{}, err
6363
}

cmd/kube-apiserver/app/server.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import (
5252
"k8s.io/component-base/term"
5353
utilversion "k8s.io/component-base/version"
5454
"k8s.io/component-base/version/verflag"
55+
"k8s.io/component-base/zpages/flagz"
5556
"k8s.io/klog/v2"
5657
aggregatorapiserver "k8s.io/kube-aggregator/pkg/apiserver"
5758
"k8s.io/kubernetes/cmd/kube-apiserver/app/options"
@@ -161,6 +162,9 @@ cluster's shared state through which all other components interact.`,
161162

162163
fs := cmd.Flags()
163164
namedFlagSets := s.Flags()
165+
s.Flagz = flagz.NamedFlagSetsReader{
166+
FlagSets: namedFlagSets,
167+
}
164168
verflag.AddFlags(namedFlagSets.FlagSet("global"))
165169
globalflag.AddGlobalFlags(namedFlagSets.FlagSet("global"), cmd.Name(), logs.SkipLoggingConfigurationFlags())
166170
options.AddCustomGlobalFlags(namedFlagSets.FlagSet("generic"))

cmd/kube-apiserver/app/testing/testserver.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ import (
5959
featuregatetesting "k8s.io/component-base/featuregate/testing"
6060
logsapi "k8s.io/component-base/logs/api/v1"
6161
utilversion "k8s.io/component-base/version"
62+
zpagesfeatures "k8s.io/component-base/zpages/features"
63+
"k8s.io/component-base/zpages/flagz"
6264
"k8s.io/klog/v2"
6365
"k8s.io/kube-aggregator/pkg/apiserver"
6466
"k8s.io/kubernetes/pkg/features"
@@ -213,7 +215,8 @@ func StartTestServer(t ktesting.TB, instanceOptions *TestServerInstanceOptions,
213215
s.GenericServerRunOptions.RequestTimeout = instanceOptions.RequestTimeout
214216
}
215217

216-
for _, f := range s.Flags().FlagSets {
218+
namedFlagSets := s.Flags()
219+
for _, f := range namedFlagSets.FlagSets {
217220
fs.AddFlagSet(f)
218221
}
219222

@@ -356,6 +359,9 @@ func StartTestServer(t ktesting.TB, instanceOptions *TestServerInstanceOptions,
356359
if err := fs.Parse(customFlags); err != nil {
357360
return result, err
358361
}
362+
if utilfeature.DefaultFeatureGate.Enabled(zpagesfeatures.ComponentFlagz) {
363+
s.Flagz = flagz.NamedFlagSetsReader{FlagSets: namedFlagSets}
364+
}
359365

360366
// the RequestHeader options pointer gets replaced in the case of EnableCertAuth override
361367
// and so flags are connected to a struct that no longer appears in the ServerOptions struct

cmd/kubeadm/app/util/config/common.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -492,13 +492,3 @@ func defaultEmptyMigrateMutators() migrateMutators {
492492

493493
return *mutators
494494
}
495-
496-
// isKubeadmConfigPresent checks if a kubeadm config type is found in the provided document map
497-
func isKubeadmConfigPresent(docmap kubeadmapi.DocumentMap) bool {
498-
for gvk := range docmap {
499-
if gvk.Group == kubeadmapi.GroupName {
500-
return true
501-
}
502-
}
503-
return false
504-
}

cmd/kubeadm/app/util/config/common_test.go

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -972,52 +972,3 @@ func TestDefaultMigrateMutators(t *testing.T) {
972972
})
973973
}
974974
}
975-
976-
func TestIsKubeadmConfigPresent(t *testing.T) {
977-
var tcases = []struct {
978-
name string
979-
gvkmap kubeadmapi.DocumentMap
980-
expected bool
981-
}{
982-
{
983-
name: " Wrong Group value",
984-
gvkmap: kubeadmapi.DocumentMap{
985-
{Group: "foo.k8s.io", Version: "v1", Kind: "Foo"}: []byte(`kind: Foo`),
986-
},
987-
expected: false,
988-
},
989-
{
990-
name: "Empty Group value",
991-
gvkmap: kubeadmapi.DocumentMap{
992-
{Group: "", Version: "v1", Kind: "Empty"}: []byte(`kind: Empty`),
993-
},
994-
expected: false,
995-
},
996-
{
997-
name: "Nil value",
998-
gvkmap: nil,
999-
expected: false,
1000-
},
1001-
{
1002-
name: "Correct Group value 1",
1003-
gvkmap: kubeadmapi.DocumentMap{
1004-
{Group: "kubeadm.k8s.io", Version: "v1", Kind: "Empty"}: []byte(`kind: Empty`),
1005-
},
1006-
expected: true,
1007-
},
1008-
{
1009-
name: "Correct Group value 2",
1010-
gvkmap: kubeadmapi.DocumentMap{
1011-
{Group: kubeadmapi.GroupName, Version: "v1", Kind: "Empty"}: []byte(`kind: Empty`),
1012-
},
1013-
expected: true,
1014-
},
1015-
}
1016-
for _, tt := range tcases {
1017-
t.Run(tt.name, func(t *testing.T) {
1018-
if isKubeadmConfigPresent(tt.gvkmap) != tt.expected {
1019-
t.Error("unexpected result")
1020-
}
1021-
})
1022-
}
1023-
}

cmd/kubeadm/app/util/config/upgradeconfiguration.go

Lines changed: 24 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,34 @@ import (
2222
"github.com/pkg/errors"
2323

2424
"k8s.io/apimachinery/pkg/runtime"
25-
"k8s.io/apimachinery/pkg/util/sets"
2625
"k8s.io/klog/v2"
27-
kubeproxyconfig "k8s.io/kube-proxy/config/v1alpha1"
28-
kubeletconfig "k8s.io/kubelet/config/v1beta1"
2926

3027
kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm"
3128
kubeadmscheme "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/scheme"
3229
kubeadmapiv1 "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta4"
3330
"k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/validation"
3431
"k8s.io/kubernetes/cmd/kubeadm/app/componentconfigs"
32+
"k8s.io/kubernetes/cmd/kubeadm/app/constants"
3533
kubeadmutil "k8s.io/kubernetes/cmd/kubeadm/app/util"
3634
"k8s.io/kubernetes/cmd/kubeadm/app/util/config/strict"
3735
)
3836

39-
var componentCfgGV = sets.New(kubeproxyconfig.GroupName, kubeletconfig.GroupName)
40-
4137
// documentMapToUpgradeConfiguration takes a map between GVKs and YAML documents (as returned by SplitYAMLDocuments),
4238
// finds a UpgradeConfiguration, decodes it, dynamically defaults it and then validates it prior to return.
4339
func documentMapToUpgradeConfiguration(gvkmap kubeadmapi.DocumentMap, allowDeprecated bool) (*kubeadmapi.UpgradeConfiguration, error) {
44-
var internalcfg *kubeadmapi.UpgradeConfiguration
40+
upgradeBytes := []byte{}
4541

4642
for gvk, bytes := range gvkmap {
43+
if kubeadmutil.GroupVersionKindsHasInitConfiguration(gvk) || kubeadmutil.GroupVersionKindsHasClusterConfiguration(gvk) || componentconfigs.Scheme.IsGroupRegistered(gvk.Group) {
44+
klog.Warningf("[config] WARNING: YAML document with GroupVersionKind %v is deprecated for upgrade, please use config file with kind of UpgradeConfiguration instead \n", gvk)
45+
continue
46+
}
47+
48+
if gvk.Kind != constants.UpgradeConfigurationKind {
49+
klog.Warningf("[config] WARNING: Ignored YAML document with GroupVersionKind %v\n", gvk)
50+
continue
51+
}
52+
4753
// check if this version is supported and possibly not deprecated
4854
if err := validateSupportedVersion(gvk, allowDeprecated, true); err != nil {
4955
return nil, err
@@ -54,37 +60,19 @@ func documentMapToUpgradeConfiguration(gvkmap kubeadmapi.DocumentMap, allowDepre
5460
klog.Warning(err.Error())
5561
}
5662

57-
if kubeadmutil.GroupVersionKindsHasInitConfiguration(gvk) || kubeadmutil.GroupVersionKindsHasClusterConfiguration(gvk) {
58-
klog.Warningf("[config] WARNING: YAML document with GroupVersionKind %v is deprecated for upgrade, please use config file with kind of UpgradeConfiguration instead \n", gvk)
59-
continue
60-
}
61-
62-
if kubeadmutil.GroupVersionKindsHasUpgradeConfiguration(gvk) {
63-
// Set internalcfg to an empty struct value the deserializer will populate
64-
internalcfg = &kubeadmapi.UpgradeConfiguration{}
65-
// Decode the bytes into the internal struct. Under the hood, the bytes will be unmarshalled into the
66-
// right external version, defaulted, and converted into the internal version.
67-
if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), bytes, internalcfg); err != nil {
68-
return nil, err
69-
}
70-
continue
71-
}
63+
upgradeBytes = bytes
64+
}
7265

73-
// If the group is neither a kubeadm core type or of a supported component config group, we dump a warning about it being ignored
74-
if !componentconfigs.Scheme.IsGroupRegistered(gvk.Group) {
75-
klog.Warningf("[config] WARNING: Ignored YAML document with GroupVersionKind %v\n", gvk)
76-
}
66+
if len(upgradeBytes) == 0 {
67+
return nil, errors.Errorf("no %s found in the supplied config", constants.UpgradeConfigurationKind)
7768
}
7869

79-
// If UpgradeConfiguration wasn't given, default it by creating an external struct instance, default it and convert into the internal type
80-
if internalcfg == nil {
81-
extinitcfg := &kubeadmapiv1.UpgradeConfiguration{}
82-
kubeadmscheme.Scheme.Default(extinitcfg)
83-
// Set upgradeCfg to an empty struct value the deserializer will populate
84-
internalcfg = &kubeadmapi.UpgradeConfiguration{}
85-
if err := kubeadmscheme.Scheme.Convert(extinitcfg, internalcfg, nil); err != nil {
86-
return nil, err
87-
}
70+
// Set internalcfg to an empty struct value the deserializer will populate
71+
internalcfg := &kubeadmapi.UpgradeConfiguration{}
72+
// Decode the bytes into the internal struct. Under the hood, the bytes will be unmarshalled into the
73+
// right external version, defaulted, and converted into the internal version.
74+
if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), upgradeBytes, internalcfg); err != nil {
75+
return nil, err
8876
}
8977

9078
// Validates cfg
@@ -96,9 +84,6 @@ func documentMapToUpgradeConfiguration(gvkmap kubeadmapi.DocumentMap, allowDepre
9684
}
9785

9886
// DocMapToUpgradeConfiguration converts documentMap to an internal, defaulted and validated UpgradeConfiguration object.
99-
// The map may contain many different YAML documents. These YAML documents are parsed one-by-one
100-
// and well-known ComponentConfig GroupVersionKinds are stored inside of the internal UpgradeConfiguration struct.
101-
// The resulting UpgradeConfiguration is then dynamically defaulted and validated prior to return.
10287
func DocMapToUpgradeConfiguration(gvkmap kubeadmapi.DocumentMap) (*kubeadmapi.UpgradeConfiguration, error) {
10388
return documentMapToUpgradeConfiguration(gvkmap, false)
10489
}
@@ -123,18 +108,8 @@ func LoadUpgradeConfigurationFromFile(cfgPath string, _ LoadOrDefaultConfigurati
123108
// Convert documentMap to internal UpgradeConfiguration, InitConfiguration and ClusterConfiguration from config file will be ignored.
124109
// Upgrade should respect the cluster configuration from the existing cluster, re-configure the cluster with a InitConfiguration and
125110
// ClusterConfiguration from the config file is not allowed for upgrade.
126-
if isKubeadmConfigPresent(docmap) {
127-
if upgradeCfg, err = DocMapToUpgradeConfiguration(docmap); err != nil {
128-
return nil, err
129-
}
130-
}
131-
132-
// Check is there any component configs defined in the config file.
133-
for gvk := range docmap {
134-
if componentCfgGV.Has(gvk.Group) {
135-
klog.Warningf("[config] WARNING: YAML document with Component Configs %v is deprecated for upgrade and will be ignored \n", gvk.Group)
136-
continue
137-
}
111+
if upgradeCfg, err = DocMapToUpgradeConfiguration(docmap); err != nil {
112+
return nil, err
138113
}
139114

140115
return upgradeCfg, nil

cmd/kubeadm/app/util/config/upgradeconfiguration_test.go

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ import (
3838

3939
func TestDocMapToUpgradeConfiguration(t *testing.T) {
4040
tests := []struct {
41-
name string
42-
cfg kubeadmapiv1.UpgradeConfiguration
43-
expectedCfg kubeadmapi.UpgradeConfiguration
41+
name string
42+
cfg interface{}
43+
expectedCfg kubeadmapi.UpgradeConfiguration
44+
expectedError bool
4445
}{
4546
{
4647
name: "default config is set correctly",
@@ -94,6 +95,16 @@ func TestDocMapToUpgradeConfiguration(t *testing.T) {
9495
},
9596
},
9697
},
98+
{
99+
name: "no UpgradeConfiguration found",
100+
cfg: kubeadmapiv1.InitConfiguration{
101+
TypeMeta: metav1.TypeMeta{
102+
APIVersion: kubeadmapiv1.SchemeGroupVersion.String(),
103+
Kind: constants.InitConfigurationKind,
104+
},
105+
},
106+
expectedError: true,
107+
},
97108
}
98109

99110
for _, tc := range tests {
@@ -107,11 +118,13 @@ func TestDocMapToUpgradeConfiguration(t *testing.T) {
107118
t.Fatalf("Unexpected error of SplitYAMLDocuments: %v", err)
108119
}
109120
cfg, err := DocMapToUpgradeConfiguration(docmap)
110-
if err != nil {
111-
t.Fatalf("unexpected error of DocMapToUpgradeConfiguration: %v\nconfig: %s", err, string(b))
121+
if (err != nil) != tc.expectedError {
122+
t.Fatalf("failed DocMapToUpgradeConfiguration:\n\texpected error: %t\n\t actual error: %v", tc.expectedError, err)
112123
}
113-
if diff := cmp.Diff(*cfg, tc.expectedCfg, cmpopts.IgnoreFields(kubeadmapi.UpgradeConfiguration{}, "Timeouts")); diff != "" {
114-
t.Fatalf("DocMapToUpgradeConfiguration returned unexpected diff (-want,+got):\n%s", diff)
124+
if err == nil {
125+
if diff := cmp.Diff(*cfg, tc.expectedCfg, cmpopts.IgnoreFields(kubeadmapi.UpgradeConfiguration{}, "Timeouts")); diff != "" {
126+
t.Fatalf("DocMapToUpgradeConfiguration returned unexpected diff (-want,+got):\n%s", diff)
127+
}
115128
}
116129
})
117130
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ require (
6666
github.com/spf13/cobra v1.8.1
6767
github.com/spf13/pflag v1.0.5
6868
github.com/stretchr/testify v1.9.0
69-
github.com/vishvananda/netlink v1.3.1-0.20240905180732-b1ce50cfa9be
69+
github.com/vishvananda/netlink v1.3.1-0.20250206174618-62fb240731fa
7070
github.com/vishvananda/netns v0.0.4
7171
go.etcd.io/etcd/api/v3 v3.5.16
7272
go.etcd.io/etcd/client/pkg/v3 v3.5.16

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,8 @@ github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG
503503
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE=
504504
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk=
505505
github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA=
506-
github.com/vishvananda/netlink v1.3.1-0.20240905180732-b1ce50cfa9be h1:xdCMvyhnKzaepIUgVpUmTJo/+H1AQ7HuFYn1hv7/Neo=
507-
github.com/vishvananda/netlink v1.3.1-0.20240905180732-b1ce50cfa9be/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs=
506+
github.com/vishvananda/netlink v1.3.1-0.20250206174618-62fb240731fa h1:iAhToRwOrdk+pKzclvLM7nKZhsg8f7dVrgkFccDUbUw=
507+
github.com/vishvananda/netlink v1.3.1-0.20250206174618-62fb240731fa/go.mod h1:i6NetklAujEcC6fK0JPjT8qSwWyO0HLn4UKG+hGqeJs=
508508
github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8=
509509
github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM=
510510
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=

hack/jenkins/benchmark-dockerized.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ export KUBE_ROOT
4343
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
4444

4545
# Install tools we need
46-
go -C "${KUBE_ROOT}/hack/tools" install github.com/cespare/prettybench
47-
go -C "${KUBE_ROOT}/hack/tools" install gotest.tools/gotestsum
46+
hack_tools_gotoolchain="${GOTOOLCHAIN:-}"
47+
if [ -n "${KUBE_HACK_TOOLS_GOTOOLCHAIN:-}" ]; then
48+
hack_tools_gotoolchain="${KUBE_HACK_TOOLS_GOTOOLCHAIN}";
49+
fi
50+
GOTOOLCHAIN="${hack_tools_gotoolchain}" go -C "${KUBE_ROOT}/hack/tools" install github.com/cespare/prettybench
51+
GOTOOLCHAIN="${hack_tools_gotoolchain}" go -C "${KUBE_ROOT}/hack/tools" install gotest.tools/gotestsum
4852

4953
# Disable the Go race detector.
5054
export KUBE_RACE=" "

hack/jenkins/test-dockerized.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ set -o xtrace
2727
export PATH=${GOPATH}/bin:${PWD}/third_party/etcd:/usr/local/go/bin:${PATH}
2828

2929
# Install tools we need
30-
go -C "./hack/tools" install gotest.tools/gotestsum
30+
hack_tools_gotoolchain="${GOTOOLCHAIN:-}"
31+
if [ -n "${KUBE_HACK_TOOLS_GOTOOLCHAIN:-}" ]; then
32+
hack_tools_gotoolchain="${KUBE_HACK_TOOLS_GOTOOLCHAIN}";
33+
fi
34+
GOTOOLCHAIN="${hack_tools_gotoolchain}" go -C "./hack/tools" install gotest.tools/gotestsum
3135

3236
# Disable coverage report
3337
export KUBE_COVER="n"

hack/lib/golang.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -576,16 +576,26 @@ kube::golang::setup_env() {
576576
kube::golang::internal::verify_go_version
577577
}
578578

579+
# kube::golang::hack_tools_gotoolchain outputs the value to use for $GOTOOLCHAIN,
580+
# using $KUBE_HACK_TOOLS_GOTOOLCHAIN if set, falling back to $GOTOOLCHAIN if set,
581+
# or outputting the empty string.
582+
#
583+
# Use this when installing / building tools specified in the hack/tools module:
584+
# GOTOOLCHAIN="$(kube::golang::hack_tools_gotoolchain)" go install ...
585+
kube::golang::hack_tools_gotoolchain() {
586+
local hack_tools_gotoolchain="${GOTOOLCHAIN:-}"
587+
if [ -n "${KUBE_HACK_TOOLS_GOTOOLCHAIN:-}" ]; then
588+
hack_tools_gotoolchain="${KUBE_HACK_TOOLS_GOTOOLCHAIN}";
589+
fi
590+
echo -n "${hack_tools_gotoolchain}"
591+
}
592+
579593
kube::golang::setup_gomaxprocs() {
580594
# GOMAXPROCS by default does not reflect the number of cpu(s) available
581595
# when running in a container, please see https://github.com/golang/go/issues/33803
582596
if [[ -z "${GOMAXPROCS:-}" ]]; then
583597
if ! command -v ncpu >/dev/null 2>&1; then
584-
# shellcheck disable=SC2164
585-
pushd "${KUBE_ROOT}/hack/tools" >/dev/null
586-
go install -mod=readonly ./ncpu || echo "Will not automatically set GOMAXPROCS"
587-
# shellcheck disable=SC2164
588-
popd >/dev/null
598+
GOTOOLCHAIN="$(kube::golang::hack_tools_gotoolchain)" go -C "${KUBE_ROOT}/hack/tools" install -mod=readonly ./ncpu || echo "Will not automatically set GOMAXPROCS"
589599
fi
590600
if command -v ncpu >/dev/null 2>&1; then
591601
GOMAXPROCS=$(ncpu)

hack/make-rules/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ junitFilenamePrefix() {
183183
installTools() {
184184
if ! command -v gotestsum >/dev/null 2>&1; then
185185
kube::log::status "gotestsum not found; installing from ./hack/tools"
186-
go -C "${KUBE_ROOT}/hack/tools" install gotest.tools/gotestsum
186+
GOTOOLCHAIN="$(kube::golang::hack_tools_gotoolchain)" go -C "${KUBE_ROOT}/hack/tools" install gotest.tools/gotestsum
187187
fi
188188

189189
if ! command -v prune-junit-xml >/dev/null 2>&1; then

0 commit comments

Comments
 (0)