Skip to content

Commit

Permalink
resmgr: stop importing kubernetes/kubelet internals.
Browse files Browse the repository at this point in the history
Don't import kubernetes/kubelet for namespace and label
constants or milli-CPU conversion constants and functions.
Instead, define our own constants and functions for those
few things we need.

Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub committed Aug 14, 2023
1 parent 68a8ade commit bf7c902
Show file tree
Hide file tree
Showing 11 changed files with 110 additions and 298 deletions.
65 changes: 0 additions & 65 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,80 +26,42 @@ require (
k8s.io/client-go v0.25.12
k8s.io/cri-api v0.25.12
k8s.io/klog/v2 v2.80.1
k8s.io/kubernetes v1.25.12
k8s.io/utils v0.0.0-20230505201702-9f6742963106
sigs.k8s.io/yaml v1.3.0
)

require (
cloud.google.com/go/compute v1.12.1 // indirect
cloud.google.com/go/compute/metadata v0.2.1 // indirect
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab // indirect
github.com/Microsoft/go-winio v0.5.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/aws/aws-sdk-go v1.38.49 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/ttrpc v1.1.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/godbus/dbus/v5 v5.0.6 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/cadvisor v0.45.1 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/karrick/godirwalk v1.16.1 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mindprince/gonvml v0.0.0-20190828220739-9ebdce4bb989 // indirect
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/sys/mountinfo v0.6.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mrunalp/fileutils v0.5.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0-rc3 // indirect
github.com/opencontainers/runc v1.1.6 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
github.com/opencontainers/selinux v1.10.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/statsd_exporter v0.22.8 // indirect
github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 // indirect
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cobra v1.4.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
github.com/uber/jaeger-client-go v2.25.0+incompatible // indirect
github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 // indirect
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
golang.org/x/sync v0.1.0 // indirect
Expand All @@ -111,15 +73,7 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiserver v0.25.12 // indirect
k8s.io/cloud-provider v0.24.1 // indirect
k8s.io/component-base v0.25.12 // indirect
k8s.io/component-helpers v0.25.12 // indirect
k8s.io/csi-translation-lib v0.24.1 // indirect
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
k8s.io/kube-scheduler v0.24.1 // indirect
k8s.io/kubelet v0.24.1 // indirect
k8s.io/mount-utils v0.24.1 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
)
Expand All @@ -141,28 +95,9 @@ replace (
google.golang.org/grpc => google.golang.org/grpc v1.38.0

k8s.io/api => k8s.io/api v0.25.12
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.25.12
k8s.io/apimachinery => k8s.io/apimachinery v0.25.12
k8s.io/apiserver => k8s.io/apiserver v0.25.12
k8s.io/cli-runtime => k8s.io/cli-runtime v0.25.12
k8s.io/client-go => k8s.io/client-go v0.25.12
k8s.io/cloud-provider => k8s.io/cloud-provider v0.25.12
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.25.12
k8s.io/code-generator => k8s.io/code-generator v0.25.12
k8s.io/component-base => k8s.io/component-base v0.25.12
k8s.io/component-helpers => k8s.io/component-helpers v0.25.12
k8s.io/controller-manager => k8s.io/controller-manager v0.25.12
k8s.io/cri-api => k8s.io/cri-api v0.25.12
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.25.12
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.25.12
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.25.12
k8s.io/kube-proxy => k8s.io/kube-proxy v0.25.12
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.25.12
k8s.io/kubectl => k8s.io/kubectl v0.25.12
k8s.io/kubelet => k8s.io/kubelet v0.25.12
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.25.12
k8s.io/metrics => k8s.io/metrics v0.25.12
k8s.io/mount-utils => k8s.io/mount-utils v0.25.12
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.25.12
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.25.12
)
Loading

0 comments on commit bf7c902

Please sign in to comment.