Skip to content

Commit

Permalink
Merge pull request #20363 from prezha/bumpK8sAPI-v0.32.1
Browse files Browse the repository at this point in the history
Bump kubernetes packages to v0.32.1
  • Loading branch information
medyagh authored Feb 7, 2025
2 parents cf3ab2a + 7e7f32f commit 00eeee4
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 21 deletions.
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ require (
gonum.org/v1/plot v0.15.0
google.golang.org/api v0.217.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.31.3
k8s.io/apimachinery v0.32.0
k8s.io/client-go v0.31.3
k8s.io/api v0.32.1
k8s.io/apimachinery v0.32.1
k8s.io/client-go v0.32.1
k8s.io/cluster-bootstrap v0.0.0
k8s.io/component-base v0.31.3
k8s.io/klog/v2 v2.130.1
Expand Down Expand Up @@ -164,7 +164,6 @@ require (
github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95 // indirect
github.com/hooklift/assert v0.0.0-20170704181755-9d1defd6d214 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand Down
14 changes: 6 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,6 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ
github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
Expand Down Expand Up @@ -3053,7 +3052,6 @@ google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpX
google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A=
google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a h1:UIpYSuWdWHSzjwcAFRLjKcPXFZVVLXGEM23W+NWqipw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand Down Expand Up @@ -3140,8 +3138,8 @@ k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8=
k8s.io/api v0.22.4/go.mod h1:Rgs+9gIGYC5laXQSZZ9JqT5NevNgoGiOdVWi1BAB3qk=
k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs=
k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8=
k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8=
k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE=
k8s.io/api v0.32.1 h1:f562zw9cy+GvXzXf0CKlVQ7yHJVYzLfL6JAS4kOAaOc=
k8s.io/api v0.32.1/go.mod h1:/Yi/BqkuueW1BgpoePYBRdDYfjPF5sgTr5+YqDZra5k=
k8s.io/apimachinery v0.19.1/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA=
k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU=
Expand All @@ -3150,8 +3148,8 @@ k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ
k8s.io/apimachinery v0.22.4/go.mod h1:yU6oA6Gnax9RrxGzVvPFFJ+mpnW6PBSqp0sx0I0HHW0=
k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U=
k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM=
k8s.io/apimachinery v0.32.0 h1:cFSE7N3rmEEtv4ei5X6DaJPHHX0C+upp+v5lVPiEwpg=
k8s.io/apimachinery v0.32.0/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/apimachinery v0.32.1 h1:683ENpaCBjma4CYqsmZyhEzrGz6cjn1MY/X2jB2hkZs=
k8s.io/apimachinery v0.32.1/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU=
k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM=
k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q=
Expand All @@ -3164,8 +3162,8 @@ k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k=
k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0=
k8s.io/client-go v0.22.5/go.mod h1:cs6yf/61q2T1SdQL5Rdcjg9J1ElXSwbjSrW2vFImM4Y=
k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4=
k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4=
k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs=
k8s.io/client-go v0.32.1 h1:otM0AxdhdBIaQh7l1Q0jQpmo7WOFIk5FFa4bg6YMdUU=
k8s.io/client-go v0.32.1/go.mod h1:aTTKZY7MdxUaJ/KiUs8D+GssR9zJZi77ZqtzcGXIiDg=
k8s.io/cluster-bootstrap v0.22.4 h1:2ZhV/1K4GiCrnmDHHbBnN3bERWn+Nxrtxmxp6uYYThI=
k8s.io/cluster-bootstrap v0.22.4/go.mod h1:fTQZ6u9G6fg2LHhB8nEgZLnXIhCDSRYuLUUS5pgW8RY=
k8s.io/code-generator v0.19.7/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0=
Expand Down
32 changes: 27 additions & 5 deletions pkg/minikube/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import (
core "k8s.io/api/core/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
"k8s.io/client-go/gentype"
typed_core "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/client-go/kubernetes/typed/core/v1/fake"
testing_fake "k8s.io/client-go/testing"
Expand Down Expand Up @@ -63,8 +65,24 @@ func (m *MockClientGetter) GetCoreClient(string) (typed_core.CoreV1Interface, er
secretsMap: m.secretsMap}, nil
}

func (m *MockCoreClient) Secrets(_ string) typed_core.SecretInterface {
return &fake.FakeSecrets{Fake: &fake.FakeCoreV1{Fake: &testing_fake.Fake{}}}
func (m *MockCoreClient) Secrets(namespace string) typed_core.SecretInterface {
return &MockSecretInterface{
FakeClientWithListAndApply: gentype.NewFakeClientWithListAndApply[*core.Secret, *core.SecretList, *corev1.SecretApplyConfiguration](
fake.FakeCoreV1{Fake: &testing_fake.Fake{}}.Fake,
namespace,
core.SchemeGroupVersion.WithResource("secrets"),
core.SchemeGroupVersion.WithKind("Secret"),
func() *core.Secret { return &core.Secret{} },
func() *core.SecretList { return &core.SecretList{} },
func(dst, src *core.SecretList) { dst.ListMeta = src.ListMeta },
func(list *core.SecretList) []*core.Secret { return gentype.ToPointerSlice(list.Items) },
func(list *core.SecretList, items []*core.Secret) { list.Items = gentype.FromPointerSlice(items) },
),
Fake: fake.FakeCoreV1{},
SecretsList: &core.SecretList{
Items: []core.Secret{},
},
}
}

func (m *MockCoreClient) Services(namespace string) typed_core.ServiceInterface {
Expand Down Expand Up @@ -171,7 +189,8 @@ func (m *MockCoreClient) Endpoints(namespace string) typed_core.EndpointsInterfa
}

type MockEndpointsInterface struct {
fake.FakeEndpoints
*gentype.FakeClientWithListAndApply[*core.Endpoints, *core.EndpointsList, *corev1.EndpointsApplyConfiguration]
fake.FakeCoreV1
Endpoints *core.Endpoints
}

Expand Down Expand Up @@ -227,12 +246,15 @@ func (e MockEndpointsInterface) Get(_ context.Context, name string, _ meta.GetOp
}

type MockServiceInterface struct {
fake.FakeServices
*gentype.FakeClientWithListAndApply[*core.Service, *core.ServiceList, *corev1.ServiceApplyConfiguration]
fake.FakeCoreV1
typed_core.ServiceExpansion
ServiceList *core.ServiceList
}

type MockSecretInterface struct {
fake.FakeSecrets
*gentype.FakeClientWithListAndApply[*core.Secret, *core.SecretList, *corev1.SecretApplyConfiguration]
Fake fake.FakeCoreV1
SecretsList *core.SecretList
}

Expand Down
24 changes: 20 additions & 4 deletions pkg/minikube/tunnel/loadbalancer_patcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@ import (

core "k8s.io/api/core/v1"
meta "k8s.io/apimachinery/pkg/apis/meta/v1"
corev1 "k8s.io/client-go/applyconfigurations/core/v1"
"k8s.io/client-go/gentype"
typed_core "k8s.io/client-go/kubernetes/typed/core/v1"
fake "k8s.io/client-go/kubernetes/typed/core/v1/fake"
"k8s.io/client-go/rest"
testing_fake "k8s.io/client-go/testing"
)

type stubCoreClient struct {
Expand All @@ -35,10 +38,21 @@ type stubCoreClient struct {
restClient *rest.RESTClient
}

func (c *stubCoreClient) Services(_ string) typed_core.ServiceInterface {
func (c *stubCoreClient) Services(namespace string) typed_core.ServiceInterface {
return &stubServices{
fake.FakeServices{Fake: &c.FakeCoreV1},
c.servicesList,
FakeClientWithListAndApply: gentype.NewFakeClientWithListAndApply[*core.Service, *core.ServiceList, *corev1.ServiceApplyConfiguration](
fake.FakeCoreV1{Fake: &testing_fake.Fake{}}.Fake,
namespace,
core.SchemeGroupVersion.WithResource("services"),
core.SchemeGroupVersion.WithKind("Service"),
func() *core.Service { return &core.Service{} },
func() *core.ServiceList { return &core.ServiceList{} },
func(dst, src *core.ServiceList) { dst.ListMeta = src.ListMeta },
func(list *core.ServiceList) []*core.Service { return gentype.ToPointerSlice(list.Items) },
func(list *core.ServiceList, items []*core.Service) { list.Items = gentype.FromPointerSlice(items) },
),
Fake: fake.FakeCoreV1{},
servicesList: c.servicesList,
}
}

Expand All @@ -47,7 +61,9 @@ func (c *stubCoreClient) RESTClient() rest.Interface {
}

type stubServices struct {
fake.FakeServices
*gentype.FakeClientWithListAndApply[*core.Service, *core.ServiceList, *corev1.ServiceApplyConfiguration]
Fake fake.FakeCoreV1
typed_core.ServiceExpansion
servicesList *core.ServiceList
}

Expand Down

0 comments on commit 00eeee4

Please sign in to comment.