Skip to content

Commit 37483ca

Browse files
committed
remove kubelet packages
1 parent 1513028 commit 37483ca

File tree

7 files changed

+19
-224
lines changed

7 files changed

+19
-224
lines changed

.github/dependabot.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ updates:
7878
versions: [">=0.35.0"]
7979
- dependency-name: "k8s.io/client-go"
8080
versions: [">=0.35.0"]
81-
- dependency-name: "k8s.io/kubelet"
82-
versions: [">=0.35.0"]
83-
- dependency-name: "k8s.io/kubectl"
84-
versions: [">=0.35.0"]
8581

8682
# /dropgz: grouped minor+patch + allow majors concurrently
8783
- package-ecosystem: "gomod"

cns/middlewares/k8sSwiftV2.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ import (
1212
"github.com/pkg/errors"
1313
v1 "k8s.io/api/core/v1"
1414
k8stypes "k8s.io/apimachinery/pkg/types"
15-
"k8s.io/kubernetes/pkg/kubelet"
1615
"sigs.k8s.io/controller-runtime/pkg/client"
1716
)
1817

19-
var (
20-
errMTPNCNotReady = errors.New(kubelet.NetworkNotReadyErrorMsg + " - mtpnc is not ready")
21-
errGetMTPNC = errors.New(kubelet.NetworkNotReadyErrorMsg + " - failed to get MTPNC")
22-
errInvalidSWIFTv2NICType = errors.New("invalid NIC type for SWIFT v2 scenario")
23-
errInvalidMTPNCPrefixLength = errors.New("invalid prefix length for MTPNC primaryIP, must be 32")
24-
)
25-
2618
const (
19+
NetworkNotReadyErrorMsg = "network is not ready"
2720
prefixLength = 32
2821
overlayGatewayv4 = "169.254.1.1"
2922
virtualGW = "169.254.2.1"
3023
overlayGatewayV6 = "fe80::1234:5678:9abc"
3124
)
3225

26+
var (
27+
errMTPNCNotReady = errors.New(NetworkNotReadyErrorMsg + " - mtpnc is not ready")
28+
errGetMTPNC = errors.New(NetworkNotReadyErrorMsg + " - failed to get MTPNC")
29+
errInvalidSWIFTv2NICType = errors.New("invalid NIC type for SWIFT v2 scenario")
30+
errInvalidMTPNCPrefixLength = errors.New("invalid prefix length for MTPNC primaryIP, must be 32")
31+
)
32+
3333
type K8sSWIFTv2Middleware struct {
3434
Cli client.Client
3535
}

cns/middlewares/k8sSwiftV2_linux_test.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
"github.com/Azure/azure-container-networking/crd/multitenancy/api/v1alpha1"
1616
"github.com/google/go-cmp/cmp"
1717
"gotest.tools/v3/assert"
18-
"k8s.io/kubernetes/pkg/kubelet"
1918
)
2019

2120
var (
@@ -210,14 +209,14 @@ func TestValidateMultitenantIPConfigsRequestFailure(t *testing.T) {
210209
failReq.OrchestratorContext = b
211210
_, respCode, msg := middleware.GetPodInfoForIPConfigsRequest(context.TODO(), failReq)
212211
assert.Equal(t, respCode, types.UnexpectedError)
213-
assert.Assert(t, strings.Contains(msg, kubelet.NetworkNotReadyErrorMsg), "expected error message to contain '%s', got '%s'", kubelet.NetworkNotReadyErrorMsg, msg)
212+
assert.Assert(t, strings.Contains(msg, NetworkNotReadyErrorMsg), "expected error message to contain '%s', got '%s'", NetworkNotReadyErrorMsg, msg)
214213

215214
// MTPNC not ready
216215
b, _ = testPod4Info.OrchestratorContext()
217216
failReq.OrchestratorContext = b
218217
_, respCode, msg = middleware.GetPodInfoForIPConfigsRequest(context.TODO(), failReq)
219218
assert.Equal(t, respCode, types.UnexpectedError)
220-
assert.Assert(t, strings.Contains(msg, kubelet.NetworkNotReadyErrorMsg), "expected error message to contain '%s', got '%s'", kubelet.NetworkNotReadyErrorMsg, msg)
219+
assert.Assert(t, strings.Contains(msg, NetworkNotReadyErrorMsg), "expected error message to contain '%s', got '%s'", NetworkNotReadyErrorMsg, msg)
221220
}
222221

223222
func TestGetSWIFTv2IPConfigSuccess(t *testing.T) {
@@ -242,12 +241,12 @@ func TestGetSWIFTv2IPConfigFailure(t *testing.T) {
242241
// Pod's MTPNC doesn't exist in cache test
243242
_, err := middleware.getIPConfig(context.TODO(), testPod3Info)
244243
assert.Assert(t, strings.Contains(err.Error(), errGetMTPNC.Error()), "expected error to wrap errMTPNCNotFound, got: %v", err)
245-
assert.ErrorContains(t, err, kubelet.NetworkNotReadyErrorMsg)
244+
assert.ErrorContains(t, err, NetworkNotReadyErrorMsg)
246245

247246
// Pod's MTPNC is not ready test
248247
_, err = middleware.getIPConfig(context.TODO(), testPod4Info)
249248
assert.Assert(t, errors.Is(err, errMTPNCNotReady), "expected error to wrap errMTPNCNotReady, got: %v", err)
250-
assert.ErrorContains(t, err, kubelet.NetworkNotReadyErrorMsg)
249+
assert.ErrorContains(t, err, NetworkNotReadyErrorMsg)
251250
}
252251

253252
func TestSetRoutesSuccess(t *testing.T) {

go.mod

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -128,37 +128,18 @@ require (
128128
golang.org/x/sync v0.17.0
129129
gotest.tools/v3 v3.5.2
130130
k8s.io/kubectl v0.33.3
131-
k8s.io/kubernetes v1.34.0
132131
sigs.k8s.io/yaml v1.6.0
133132
)
134133

135134
require (
136-
cel.dev/expr v0.24.0 // indirect
137-
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab // indirect
138-
github.com/Microsoft/hnslib v0.1.1 // indirect
139-
github.com/NYTimes/gziphandler v1.1.1 // indirect
140-
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
141-
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect
142135
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
143136
github.com/blang/semver/v4 v4.0.0 // indirect
144-
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
145137
github.com/cilium/hive v0.0.0-20250611195437-5a5dacdfb354 // indirect
146138
github.com/cilium/proxy v0.0.0-20250623105955-2136f59a4ea1 // indirect
147139
github.com/cilium/statedb v0.4.5 // indirect
148140
github.com/cilium/stream v0.0.1 // indirect
149-
github.com/container-storage-interface/spec v1.9.0 // indirect
150-
github.com/containerd/containerd/api v1.8.0 // indirect
151141
github.com/containerd/errdefs/pkg v0.3.0 // indirect
152-
github.com/containerd/log v0.1.0 // indirect
153-
github.com/containerd/ttrpc v1.2.6 // indirect
154142
github.com/containerd/typeurl/v2 v2.2.2 // indirect
155-
github.com/coreos/go-semver v0.3.1 // indirect
156-
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
157-
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
158-
github.com/distribution/reference v0.6.0 // indirect
159-
github.com/docker/go-units v0.5.0 // indirect
160-
github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect
161-
github.com/felixge/httpsnoop v1.0.4 // indirect
162143
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
163144
github.com/go-logr/stdr v1.2.2 // indirect
164145
github.com/go-openapi/analysis v0.23.0 // indirect
@@ -169,66 +150,28 @@ require (
169150
github.com/go-openapi/strfmt v0.23.0 // indirect
170151
github.com/go-openapi/validate v0.24.0 // indirect
171152
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
172-
github.com/godbus/dbus/v5 v5.1.0 // indirect
173153
github.com/google/btree v1.1.3 // indirect
174-
github.com/google/cadvisor v0.52.1 // indirect
175-
github.com/google/cel-go v0.26.0 // indirect
176154
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
177-
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
178-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
179-
github.com/karrick/godirwalk v1.17.0 // indirect
180155
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
181156
github.com/mackerelio/go-osstat v0.2.6 // indirect
182-
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect
183157
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
184-
github.com/moby/sys/mountinfo v0.7.2 // indirect
185-
github.com/moby/sys/userns v0.1.0 // indirect
186158
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
187159
github.com/oklog/ulid v1.3.1 // indirect
188-
github.com/opencontainers/cgroups v0.0.1 // indirect
189-
github.com/opencontainers/go-digest v1.0.0 // indirect
190-
github.com/opencontainers/image-spec v1.1.1 // indirect
191-
github.com/opencontainers/runtime-spec v1.2.0 // indirect
192-
github.com/opencontainers/selinux v1.11.1 // indirect
193160
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect
194161
github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect
195162
github.com/sasha-s/go-deadlock v0.3.5 // indirect
196-
github.com/stoewer/go-strcase v1.3.0 // indirect
197163
github.com/x448/float16 v0.8.4 // indirect
198-
go.etcd.io/etcd/api/v3 v3.6.4 // indirect
199-
go.etcd.io/etcd/client/pkg/v3 v3.6.4 // indirect
200-
go.etcd.io/etcd/client/v3 v3.6.4 // indirect
201164
go.mongodb.org/mongo-driver v1.14.0 // indirect
202165
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
203-
go.opentelemetry.io/contrib/instrumentation/github.com/emicklei/go-restful/otelrestful v0.44.0 // indirect
204-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.60.0 // indirect
205-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
206166
go.opentelemetry.io/otel v1.37.0 // indirect
207-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
208-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect
209167
go.opentelemetry.io/otel/metric v1.37.0 // indirect
210-
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
211168
go.opentelemetry.io/otel/trace v1.37.0 // indirect
212-
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
213169
go.uber.org/dig v1.17.1 // indirect
214170
go.yaml.in/yaml/v2 v2.4.2 // indirect
215171
go.yaml.in/yaml/v3 v3.0.4 // indirect
216172
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba // indirect
217173
golang.org/x/tools v0.36.0 // indirect
218-
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
219174
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
220-
k8s.io/apiserver v0.34.0 // indirect
221-
k8s.io/cloud-provider v0.30.7 // indirect
222-
k8s.io/component-base v0.34.0 // indirect
223-
k8s.io/component-helpers v0.34.0 // indirect
224-
k8s.io/controller-manager v0.30.7 // indirect
225-
k8s.io/cri-api v0.34.0 // indirect
226-
k8s.io/csi-translation-lib v0.30.14 // indirect
227-
k8s.io/dynamic-resource-allocation v0.34.0 // indirect
228-
k8s.io/kms v0.34.0 // indirect
229-
k8s.io/kube-scheduler v0.34.0 // indirect
230-
k8s.io/mount-utils v0.30.14 // indirect
231-
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect
232175
sigs.k8s.io/randfill v1.0.0 // indirect
233176
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
234177
)
@@ -240,7 +183,6 @@ require (
240183
github.com/golang-jwt/jwt/v5 v5.3.0 // indirect
241184
github.com/sagikazarmark/locafero v0.11.0 // indirect
242185
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
243-
k8s.io/kubelet v0.34.0
244186
)
245187

246188
replace (

0 commit comments

Comments
 (0)