From 51afd939b6c8d9552df3f6ce654e1fcb36f0a3b7 Mon Sep 17 00:00:00 2001 From: vie-serendipity <2733147505@qq.com> Date: Sat, 12 Oct 2024 09:31:28 +0800 Subject: [PATCH 1/4] feat: change gomod to adapt to k8s 1.31 Signed-off-by: vie-serendipity <2733147505@qq.com> feat: solve problems that arise after adaptation Signed-off-by: vie-serendipity <2733147505@qq.com> --- go.mod | 193 ++++----- go.sum | 377 ++++++++++-------- .../dockerfile/webhook-manager/Dockerfile | 2 +- pkg/scheduler/plugins/nodeorder/nodeorder.go | 2 +- .../plugins/predicates/predicates.go | 2 +- pkg/scheduler/plugins/util/k8s/framework.go | 5 + 6 files changed, 316 insertions(+), 265 deletions(-) diff --git a/go.mod b/go.mod index fe1b83e616..1a50b70f7d 100644 --- a/go.mod +++ b/go.mod @@ -12,127 +12,128 @@ require ( github.com/hashicorp/go-multierror v1.0.0 github.com/imdario/mergo v0.3.12 github.com/mitchellh/mapstructure v1.5.0 - github.com/onsi/ginkgo/v2 v2.17.2 + github.com/onsi/ginkgo/v2 v2.19.0 github.com/onsi/gomega v1.33.1 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.16.0 - github.com/prometheus/common v0.44.0 - github.com/spf13/cobra v1.7.0 + github.com/prometheus/client_golang v1.19.1 + github.com/prometheus/common v0.55.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.8.4 + github.com/stretchr/testify v1.9.0 go.uber.org/automaxprocs v1.4.0 - golang.org/x/crypto v0.22.0 - golang.org/x/sys v0.19.0 + golang.org/x/crypto v0.24.0 + golang.org/x/sys v0.21.0 golang.org/x/time v0.3.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.30.2 - k8s.io/apimachinery v0.30.2 - k8s.io/apiserver v0.30.2 - k8s.io/client-go v0.30.2 - k8s.io/code-generator v0.30.2 - k8s.io/component-base v0.30.2 - k8s.io/component-helpers v0.30.2 - k8s.io/csi-translation-lib v0.30.2 - k8s.io/klog/v2 v2.120.1 - k8s.io/kubernetes v1.30.2 - k8s.io/utils v0.0.0-20230726121419-3b25d923346b + k8s.io/api v0.31.1 + k8s.io/apimachinery v0.31.1 + k8s.io/apiserver v0.31.1 + k8s.io/client-go v0.31.1 + k8s.io/code-generator v0.31.1 + k8s.io/component-base v0.31.1 + k8s.io/component-helpers v0.31.1 + k8s.io/csi-translation-lib v0.31.1 + k8s.io/klog v1.0.0 + k8s.io/klog/v2 v2.130.1 + k8s.io/kubernetes v1.31.1 + k8s.io/metrics v0.0.0 + k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 sigs.k8s.io/controller-runtime v0.13.0 - sigs.k8s.io/yaml v1.3.0 + sigs.k8s.io/yaml v1.4.0 stathat.com/c/consistent v1.0.0 volcano.sh/apis v1.10.0-alpha.0.0.20240904072435-17826d64a144 ) require ( github.com/NYTimes/gziphandler v1.1.1 // indirect - github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect + github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/distribution/reference v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/felixge/httpsnoop v1.0.3 // indirect - github.com/go-logr/logr v1.4.1 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.19.6 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/swag v0.22.4 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // 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.4 // indirect github.com/google/cadvisor v0.49.0 // indirect - github.com/google/cel-go v0.17.8 // indirect + github.com/google/cel-go v0.20.1 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af // indirect + github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/moby/sys/mountinfo v0.6.2 // indirect + github.com/moby/sys/mountinfo v0.7.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/runc v1.1.13 // indirect github.com/opencontainers/selinux v1.11.0 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/stoewer/go-strcase v1.2.0 // indirect - go.etcd.io/etcd/api/v3 v3.5.10 // indirect - go.etcd.io/etcd/client/pkg/v3 v3.5.10 // indirect - go.etcd.io/etcd/client/v3 v3.5.10 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/sdk v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect + github.com/x448/float16 v0.8.4 // indirect + go.etcd.io/etcd/api/v3 v3.5.14 // indirect + go.etcd.io/etcd/client/pkg/v3 v3.5.14 // indirect + go.etcd.io/etcd/client/v3 v3.5.14 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect + golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.24.0 // indirect - golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/oauth2 v0.21.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/term v0.19.0 // indirect - golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.20.0 // indirect - google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + golang.org/x/term v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/grpc v1.65.0 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.25.0 // indirect - k8s.io/cloud-provider v0.25.0 // indirect - k8s.io/controller-manager v0.30.2 // indirect + k8s.io/cloud-provider v0.0.0 // indirect + k8s.io/controller-manager v0.31.1 // indirect k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect - k8s.io/kms v0.30.2 // indirect - k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b // indirect + k8s.io/kms v0.31.1 // indirect + k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/kube-scheduler v0.0.0 // indirect k8s.io/kubelet v0.0.0 // indirect - k8s.io/metrics v0.30.2 - k8s.io/mount-utils v0.25.0 // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.2 // indirect + k8s.io/mount-utils v0.0.0 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) @@ -140,34 +141,34 @@ require ( replace ( github.com/opencontainers/runc => github.com/opencontainers/runc v1.0.3 google.golang.org/grpc => google.golang.org/grpc v1.57.0 - k8s.io/api => k8s.io/api v0.30.2 - k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.2 - k8s.io/apimachinery => k8s.io/apimachinery v0.30.2 - k8s.io/apiserver => k8s.io/apiserver v0.30.2 - k8s.io/cli-runtime => k8s.io/cli-runtime v0.30.2 - k8s.io/client-go => k8s.io/client-go v0.30.2 - k8s.io/cloud-provider => k8s.io/cloud-provider v0.30.2 - k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.30.2 - k8s.io/code-generator => k8s.io/code-generator v0.30.2 - k8s.io/component-base => k8s.io/component-base v0.30.2 - k8s.io/component-helpers => k8s.io/component-helpers v0.30.2 - k8s.io/controller-manager => k8s.io/controller-manager v0.30.2 - k8s.io/cri-api => k8s.io/cri-api v0.30.2 - k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.30.2 - k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.30.2 - k8s.io/endpointslice => k8s.io/endpointslice v0.30.2 - k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.30.2 - k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.30.2 - k8s.io/kube-proxy => k8s.io/kube-proxy v0.30.2 - k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.30.2 - k8s.io/kubectl => k8s.io/kubectl v0.30.2 - k8s.io/kubelet => k8s.io/kubelet v0.30.2 - k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.30.2 - k8s.io/metrics => k8s.io/metrics v0.30.2 - k8s.io/mount-utils => k8s.io/mount-utils v0.30.2 - k8s.io/node-api => k8s.io/node-api v0.30.2 - k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.30.2 - k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.30.2 - k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.30.2 - k8s.io/sample-controller => k8s.io/sample-controller v0.30.2 + k8s.io/api => k8s.io/api v0.31.1 + k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.31.1 + k8s.io/apimachinery => k8s.io/apimachinery v0.31.1 + k8s.io/apiserver => k8s.io/apiserver v0.31.1 + k8s.io/cli-runtime => k8s.io/cli-runtime v0.31.1 + k8s.io/client-go => k8s.io/client-go v0.31.1 + k8s.io/cloud-provider => k8s.io/cloud-provider v0.31.1 + k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.31.1 + k8s.io/code-generator => k8s.io/code-generator v0.31.1 + k8s.io/component-base => k8s.io/component-base v0.31.1 + k8s.io/component-helpers => k8s.io/component-helpers v0.31.1 + k8s.io/controller-manager => k8s.io/controller-manager v0.31.1 + k8s.io/cri-api => k8s.io/cri-api v0.31.1 + k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.31.1 + k8s.io/dynamic-resource-allocation => k8s.io/dynamic-resource-allocation v0.31.1 + k8s.io/endpointslice => k8s.io/endpointslice v0.31.1 + k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.31.1 + k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.31.1 + k8s.io/kube-proxy => k8s.io/kube-proxy v0.31.1 + k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.31.1 + k8s.io/kubectl => k8s.io/kubectl v0.31.1 + k8s.io/kubelet => k8s.io/kubelet v0.31.1 + k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.31.1 + k8s.io/metrics => k8s.io/metrics v0.31.1 + k8s.io/mount-utils => k8s.io/mount-utils v0.31.1 + k8s.io/node-api => k8s.io/node-api v0.31.1 + k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.31.1 + k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.31.1 + k8s.io/sample-cli-plugin => k8s.io/sample-cli-plugin v0.31.1 + k8s.io/sample-controller => k8s.io/sample-controller v0.31.1 ) diff --git a/go.sum b/go.sum index 418dd5d9b6..6f0afcfd87 100644 --- a/go.sum +++ b/go.sum @@ -1,58 +1,64 @@ -cloud.google.com/go v0.110.6 h1:8uYAkj3YHTP/1iwReuHPxLSbdcyc+dSBbzFMrVwDR6Q= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/agiledragon/gomonkey/v2 v2.11.0 h1:5oxSgA+tC1xuGsrIorR+sYiziYltmJyEZ9qA25b6l5U= github.com/agiledragon/gomonkey/v2 v2.11.0/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df h1:7RFfzj4SSt6nnvCPbCqijJi1nWCd+TqAT3bYCStRC18= -github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df/go.mod h1:pSwJ0fSY5KhvocuWSx4fz3BA8OrA1bQn+K1Eli3BRwM= +github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI= +github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a h1:idn718Q4B6AGu/h5Sxe66HYVdqdGu2l9Iebqhi/AEoA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= +github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/elastic/go-elasticsearch/v7 v7.17.7 h1:pcYNfITNPusl+cLwLN6OLmVT+F73Els0nbaWOmYachs= github.com/elastic/go-elasticsearch/v7 v7.17.7/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/envoyproxy/protoc-gen-validate v0.10.1 h1:c0g45+xCJhdgFGw7a5QAfdS4byAbud7miNWJ1WwEVf8= -github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= -github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= -github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +<<<<<<< HEAD +======= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +>>>>>>> ba15423f3 (feat: change gomod to adapt to k8s 1.31) github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= @@ -61,8 +67,9 @@ github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/swag v0.22.4 h1:QLMzNJnMGPRNDCbySlcj1x01tzU8/9LTTL9hZZZogBU= +github.com/go-openapi/swag v0.22.4/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -70,36 +77,44 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/cadvisor v0.49.0 h1:1PYeiORXmcFYi609M4Qvq5IzcvcVaWgYxDt78uH8jYA= github.com/google/cadvisor v0.49.0/go.mod h1:s6Fqwb2KiWG6leCegVhw4KW40tf9f7m+SF1aXiE8Wsk= -github.com/google/cel-go v0.17.8 h1:j9m730pMZt1Fc4oKhCLUHfjj6527LuhYcYw0Rl8gqto= -github.com/google/cel-go v0.17.8/go.mod h1:HXZKzB0LXqer5lHHgfWAnlYwJaQBDKMjxjulNQzhwhY= +github.com/google/cel-go v0.20.1 h1:nDx9r8S3L4pE61eDdt8igGj8rf5kjYR3ILxWIpWNi84= +github.com/google/cel-go v0.20.1/go.mod h1:kWcIzTsPX0zmQ+H3TirHstLLf9ep5QTsZBN9u4dOYLg= github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= -github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM= +github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -109,8 +124,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= @@ -141,17 +156,17 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= -github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.7.1 h1:/tTvQaSJRr2FshkhXiIpux6fQ2Zvc4j7tAhMTStAG2g= +github.com/moby/sys/mountinfo v0.7.1/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= @@ -160,38 +175,47 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= -github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= +github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/runc v1.0.3 h1:1hbqejyQWCJBvtKAfdO0b1FmaEf2z/bxnjqbARass5k= +github.com/opencontainers/runc v1.0.3/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU= @@ -199,55 +223,62 @@ github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE= github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= +github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/etcd/api/v3 v3.5.10 h1:szRajuUUbLyppkhs9K6BRtjY37l66XQQmw7oZRANE4k= -go.etcd.io/etcd/api/v3 v3.5.10/go.mod h1:TidfmT4Uycad3NM/o25fG3J07odo4GBB9hoxaodFCtI= -go.etcd.io/etcd/client/pkg/v3 v3.5.10 h1:kfYIdQftBnbAq8pUWFXfpuuxFSKzlmM5cSn76JByiT0= -go.etcd.io/etcd/client/pkg/v3 v3.5.10/go.mod h1:DYivfIviIuQ8+/lCq4vcxuseg2P2XbHygkKwFo9fc8U= -go.etcd.io/etcd/client/v2 v2.305.10 h1:MrmRktzv/XF8CvtQt+P6wLUlURaNpSDJHFZhe//2QE4= -go.etcd.io/etcd/client/v2 v2.305.10/go.mod h1:m3CKZi69HzilhVqtPDcjhSGp+kA1OmbNn0qamH80xjA= -go.etcd.io/etcd/client/v3 v3.5.10 h1:W9TXNZ+oB3MCd/8UjxHTWK5J9Nquw9fQBLJd5ne5/Ao= -go.etcd.io/etcd/client/v3 v3.5.10/go.mod h1:RVeBnDz2PUEZqTpgqwAtUd8nAPf5kjyFyND7P1VkOKc= -go.etcd.io/etcd/pkg/v3 v3.5.10 h1:WPR8K0e9kWl1gAhB5A7gEa5ZBTNkT9NdNWrR8Qpo1CM= -go.etcd.io/etcd/pkg/v3 v3.5.10/go.mod h1:TKTuCKKcF1zxmfKWDkfz5qqYaE3JncKKZPFf8c1nFUs= -go.etcd.io/etcd/raft/v3 v3.5.10 h1:cgNAYe7xrsrn/5kXMSaH8kM/Ky8mAdMqGOxyYwpP0LA= -go.etcd.io/etcd/raft/v3 v3.5.10/go.mod h1:odD6kr8XQXTy9oQnyMPBOr0TVe+gT0neQhElQ6jbGRc= -go.etcd.io/etcd/server/v3 v3.5.10 h1:4NOGyOwD5sUZ22PiWYKmfxqoeh72z6EhYjNosKGLmZg= -go.etcd.io/etcd/server/v3 v3.5.10/go.mod h1:gBplPHfs6YI0L+RpGkTQO7buDbHv5HJGG/Bst0/zIPo= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0 h1:ZOLJc06r4CB42laIXg/7udr0pbZyuAihN10A/XuiQRY= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.42.0/go.mod h1:5z+/ZWJQKXa9YT34fQNx5K8Hd1EoIhvtUygUQPqEOgQ= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0 h1:KfYpVmrjI7JuToy5k8XV3nkapjWx48k4E4JOtVstzQI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.44.0/go.mod h1:SeQhzAEccGVZVEy7aH87Nh0km+utSpo1pTv6eMMop48= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI= +go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE= +go.etcd.io/etcd/api/v3 v3.5.14 h1:vHObSCxyB9zlF60w7qzAdTcGaglbJOpSj1Xj9+WGxq0= +go.etcd.io/etcd/api/v3 v3.5.14/go.mod h1:BmtWcRlQvwa1h3G2jvKYwIQy4PkHlDej5t7uLMUdJUU= +go.etcd.io/etcd/client/pkg/v3 v3.5.14 h1:SaNH6Y+rVEdxfpA2Jr5wkEvN6Zykme5+YnbCkxvuWxQ= +go.etcd.io/etcd/client/pkg/v3 v3.5.14/go.mod h1:8uMgAokyG1czCtIdsq+AGyYQMvpIKnSvPjFMunkgeZI= +go.etcd.io/etcd/client/v2 v2.305.13 h1:RWfV1SX5jTU0lbCvpVQe3iPQeAHETWdOTb6pxhd77C8= +go.etcd.io/etcd/client/v2 v2.305.13/go.mod h1:iQnL7fepbiomdXMb3om1rHq96htNNGv2sJkEcZGDRRg= +go.etcd.io/etcd/client/v3 v3.5.14 h1:CWfRs4FDaDoSz81giL7zPpZH2Z35tbOrAJkkjMqOupg= +go.etcd.io/etcd/client/v3 v3.5.14/go.mod h1:k3XfdV/VIHy/97rqWjoUzrj9tk7GgJGH9J8L4dNXmAk= +go.etcd.io/etcd/pkg/v3 v3.5.13 h1:st9bDWNsKkBNpP4PR1MvM/9NqUPfvYZx/YXegsYEH8M= +go.etcd.io/etcd/pkg/v3 v3.5.13/go.mod h1:N+4PLrp7agI/Viy+dUYpX7iRtSPvKq+w8Y14d1vX+m0= +go.etcd.io/etcd/raft/v3 v3.5.13 h1:7r/NKAOups1YnKcfro2RvGGo2PTuizF/xh26Z2CTAzA= +go.etcd.io/etcd/raft/v3 v3.5.13/go.mod h1:uUFibGLn2Ksm2URMxN1fICGhk8Wu96EfDQyuLhAcAmw= +go.etcd.io/etcd/server/v3 v3.5.13 h1:V6KG+yMfMSqWt+lGnhFpP5z5dRUj1BDRJ5k1fQ9DFok= +go.etcd.io/etcd/server/v3 v3.5.13/go.mod h1:K/8nbsGupHqmr5MkgaZpLlH1QdX1pcNQLAkODy44XcQ= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 h1:9G6E0TXzGFVfTnawRzrPl83iHOAV7L8NJiR8RSGYV1g= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0/go.mod h1:azvtTADFQJA8mX80jIH/akaE7h+dbm/sVuaHqN13w74= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 h1:4K4tsIXefpVJtvA/8srF4V4y0akAoPHkIslgAkjixJA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0/go.mod h1:jjdQuTGVsXV4vSs+CJ2qYDeDPf9yIJV23qlIzBm73Vg= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/automaxprocs v1.4.0 h1:CpDZl6aOlLhReez+8S3eEotD7Jx0Os++lemPlMULQP0= go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -259,10 +290,10 @@ go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 h1:tnebWN09GYg9OLPss1KXj8txwZc6X6uMr6VFdcGNbHw= -golang.org/x/exp v0.0.0-20220827204233-334a2380cb91/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc h1:mCRnTeVUjcrhlRmO0VK8a6k6Rrf6TF9htwo2pJVSjIU= +golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc/go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -270,16 +301,15 @@ golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w= -golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -288,21 +318,26 @@ golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.19.0 h1:+ThwsDv+tYfnJFhF4L8jITxu1tdTWRTZpdsWgEgjL6Q= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -311,30 +346,38 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= -google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= -google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d h1:VBu5YqKPv6XiJ199exd8Br+Aetz+o08F+PLMnwJQHAY= +google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +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= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= @@ -349,58 +392,60 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.30.2 h1:+ZhRj+28QT4UOH+BKznu4CBgPWgkXO7XAvMcMl0qKvI= -k8s.io/api v0.30.2/go.mod h1:ULg5g9JvOev2dG0u2hig4Z7tQ2hHIuS+m8MNZ+X6EmI= -k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbOocKIE= -k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= -k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= -k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= -k8s.io/apiserver v0.30.2 h1:ACouHiYl1yFI2VFI3YGM+lvxgy6ir4yK2oLOsLI1/tw= -k8s.io/apiserver v0.30.2/go.mod h1:BOTdFBIch9Sv0ypSEcUR6ew/NUFGocRFNl72Ra7wTm8= -k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= -k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= -k8s.io/cloud-provider v0.30.2 h1:yov6r02v7sMUNNvzEz51LtL2krn2c1wsC+dy/8BxKQI= -k8s.io/cloud-provider v0.30.2/go.mod h1:w69t2dSjDtI9BYK6SEqj6HmMKIojEk08fXRoUzjFN2I= -k8s.io/code-generator v0.30.2 h1:ZY1+aGkqZVwKIyGsOzquaeZ5rSfE6wZHur8z3jQAaiw= -k8s.io/code-generator v0.30.2/go.mod h1:RQP5L67QxqgkVquk704CyvWFIq0e6RCMmLTXxjE8dVA= -k8s.io/component-base v0.30.2 h1:pqGBczYoW1sno8q9ObExUqrYSKhtE5rW3y6gX88GZII= -k8s.io/component-base v0.30.2/go.mod h1:yQLkQDrkK8J6NtP+MGJOws+/PPeEXNpwFixsUI7h/OE= -k8s.io/component-helpers v0.30.2 h1:kDMYLiWEYeWU7H6jBI+Ua1i2hqNh0DzqDHNIppFC3po= -k8s.io/component-helpers v0.30.2/go.mod h1:tI0anfS6AbRqooaICkGg7UVAQLedOauVSQW9srDBnJw= -k8s.io/controller-manager v0.30.2 h1:tC7V7IdGUW2I4de3bXx4m2fS3naP7VlCYlECCajK9fU= -k8s.io/controller-manager v0.30.2/go.mod h1:CYltIHGhCgldEkXT5vS2JHCCWM1WyBI4kA2UfP9cZvY= -k8s.io/csi-translation-lib v0.30.2 h1:ZcFVMWDHg7feW3mtdl+xClgmw1Yxv7m9ysOKt8h3K8Y= -k8s.io/csi-translation-lib v0.30.2/go.mod h1:jFT8vquP6eSDUwDHk0mKT6uKFWlZp60ecUEUhmlGsOY= +k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU= +k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI= +k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40= +k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ= +k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U= +k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apiserver v0.31.1 h1:Sars5ejQDCRBY5f7R3QFHdqN3s61nhkpaX8/k1iEw1c= +k8s.io/apiserver v0.31.1/go.mod h1:lzDhpeToamVZJmmFlaLwdYZwd7zB+WYRYIboqA1kGxM= +k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0= +k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg= +k8s.io/cloud-provider v0.31.1 h1:40b6AgDizwm5eWratZbqubTHMob25VWr6NX2Ei5TwZA= +k8s.io/cloud-provider v0.31.1/go.mod h1:xAdkE7fdZdu9rKLuOZUMBfagu7bM+bas3iPux/2nLGg= +k8s.io/code-generator v0.31.1 h1:GvkRZEP2g2UnB2QKT2Dgc/kYxIkDxCHENv2Q1itioVs= +k8s.io/code-generator v0.31.1/go.mod h1:oL2ky46L48osNqqZAeOcWWy0S5BXj50vVdwOtTefqIs= +k8s.io/component-base v0.31.1 h1:UpOepcrX3rQ3ab5NB6g5iP0tvsgJWzxTyAo20sgYSy8= +k8s.io/component-base v0.31.1/go.mod h1:WGeaw7t/kTsqpVTaCoVEtillbqAhF2/JgvO0LDOMa0w= +k8s.io/component-helpers v0.31.1 h1:5hZUf3747atdgtR3gPntrG35rC2CkK7rYq2KUraz6Os= +k8s.io/component-helpers v0.31.1/go.mod h1:ye0Gi8KzFNTfpIuzvVDtxJQMP/0Owkukf1vGf22Hl6U= +k8s.io/controller-manager v0.31.1 h1:bwiy8y//EG5lJL2mdbOvZWrOgw2EXXIvwp95VYgoIis= +k8s.io/controller-manager v0.31.1/go.mod h1:O440MSE6EI1AEVhB2Fc8FYqv6r8BHrSXjm5aj3886No= +k8s.io/csi-translation-lib v0.31.1 h1:ps9kya8+ih0CVL59JO2B4AYH8U/e3WLQxl9sx19NjjM= +k8s.io/csi-translation-lib v0.31.1/go.mod h1:VeYSucPZJbAt6RT25AzfG7WjyxCcmqxtr4V/CaDdNZc= k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kms v0.30.2 h1:VSZILO/tkzrz5Tu2j+yFQZ2Dc5JerQZX2GqhFJbQrfw= -k8s.io/kms v0.30.2/go.mod h1:GrMurD0qk3G4yNgGcsCEmepqf9KyyIrTXYR2lyUOJC4= -k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b h1:Q9xmGWBvOGd8UJyccgpYlLosk/JlfP3xQLNkQlHJeXw= -k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc= -k8s.io/kube-scheduler v0.30.2 h1:2uR6qVkAV4ySzAQws5XDTWu62mRCxwm2m9oS0EIhAQI= -k8s.io/kube-scheduler v0.30.2/go.mod h1:ft17TR1cD7ZgLC5m3xkpvU4wK2X5ccbsg/b+a3HdR2Y= -k8s.io/kubelet v0.30.2 h1:Ck4E/pHndI20IzDXxS57dElhDGASPO5pzXF7BcKfmCY= -k8s.io/kubelet v0.30.2/go.mod h1:DSwwTbLQmdNkebAU7ypIALR4P9aXZNFwgRmedojUE94= -k8s.io/kubernetes v1.30.2 h1:11WhS78OYX/lnSy6TXxPO6Hk+E5K9ZNrEsk9JgMSX8I= -k8s.io/kubernetes v1.30.2/go.mod h1:yPbIk3MhmhGigX62FLJm+CphNtjxqCvAIFQXup6RKS0= -k8s.io/metrics v0.30.2 h1:zj4kIPTCfEbY0RHEogpA7QtlItU7xaO11+Gz1zVDxlc= -k8s.io/metrics v0.30.2/go.mod h1:GpoO5XTy/g8CclVLtgA5WTrr2Cy5vCsqr5Xa/0ETWIk= -k8s.io/mount-utils v0.30.2 h1:2KDVY9hXyDyRw9EO4lmox4+Nn5atVOq+4ffZ/br2aAU= -k8s.io/mount-utils v0.30.2/go.mod h1:9sCVmwGLcV1MPvbZ+rToMDnl1QcGozy+jBPd0MsQLIo= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.2 h1:N2wvoG4CkNqORML7GHY9xkGKxswDhpAD46poBd/hHHg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= +k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= +k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kms v0.31.1 h1:cGLyV3cIwb0ovpP/jtyIe2mEuQ/MkbhmeBF2IYCA9Io= +k8s.io/kms v0.31.1/go.mod h1:OZKwl1fan3n3N5FFxnW5C4V3ygrah/3YXeJWS3O6+94= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= +k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= +k8s.io/kube-scheduler v0.31.1 h1:hbTiOUqEgPuXa85/J2ZYzIK7aYZruuOaQAirv5TQXjQ= +k8s.io/kube-scheduler v0.31.1/go.mod h1:pJKhtHJthZbxXpF+Mecb0wPXecYxsiMJbhuNi0xUsrE= +k8s.io/kubelet v0.31.1 h1:aAxwVxGzbbMKKk/FnSjvkN52K3LdHhjhzmYcyGBuE0c= +k8s.io/kubelet v0.31.1/go.mod h1:8ZbexYHqUO946gXEfFmnMZiK2UKRGhk7LlGvJ71p2Ig= +k8s.io/kubernetes v1.31.1 h1:1fcYJe8SAhtannpChbmnzHLwAV9Je99PrGaFtBvCxms= +k8s.io/kubernetes v1.31.1/go.mod h1:/YGPL//Fb9mdv5vukvAQ7Xon+Bqwry52bmjTdORAw+Q= +k8s.io/metrics v0.31.1 h1:h4I4dakgh/zKflWYAOQhwf0EXaqy8LxAIyE/GBvxqRc= +k8s.io/metrics v0.31.1/go.mod h1:JuH1S9tJiH9q1VCY0yzSCawi7kzNLsDzlWDJN4xR+iA= +k8s.io/mount-utils v0.31.1 h1:f8UrH9kRynljmdNGM6BaCvFUON5ZPKDgE+ltmYqI4wA= +k8s.io/mount-utils v0.31.1/go.mod h1:HV/VYBUGqYUj4vt82YltzpWvgv8FPg0G9ItyInT3NPU= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= +k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 h1:2770sDpzrjjsAtVhSeUFseziht227YAWYHLGNM8QPwY= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= sigs.k8s.io/controller-runtime v0.13.0 h1:iqa5RNciy7ADWnIc8QxCbOX5FEKVR3uxVxKHRMc2WIQ= sigs.k8s.io/controller-runtime v0.13.0/go.mod h1:Zbz+el8Yg31jubvAEyglRZGdLAjplZl+PgtYNI6WNTI= 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/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= stathat.com/c/consistent v1.0.0 h1:ezyc51EGcRPJUxfHGSgJjWzJdj3NiMU9pNfLNGiXV0c= stathat.com/c/consistent v1.0.0/go.mod h1:QkzMWzcbB+yQBL2AttO6sgsQS/JSTapcDISJalmCDS0= volcano.sh/apis v1.10.0-alpha.0.0.20240904072435-17826d64a144 h1:X+HAVl9WcV+hXkmXnkfs4ikaBeAEoH6V+2Wxrb3j4Vs= diff --git a/installer/dockerfile/webhook-manager/Dockerfile b/installer/dockerfile/webhook-manager/Dockerfile index e1c4c57312..1a97486249 100644 --- a/installer/dockerfile/webhook-manager/Dockerfile +++ b/installer/dockerfile/webhook-manager/Dockerfile @@ -20,7 +20,7 @@ ADD . volcano RUN cd volcano && make vc-webhook-manager FROM alpine:latest -ARG KUBE_VERSION="1.30.0" +ARG KUBE_VERSION="1.31.1" ARG TARGETARCH ARG APK_MIRROR RUN if [[ -n "$APK_MIRROR" ]]; then sed -i "s@https://dl-cdn.alpinelinux.org@${APK_MIRROR}@g" /etc/apk/repositories ; fi && \ diff --git a/pkg/scheduler/plugins/nodeorder/nodeorder.go b/pkg/scheduler/plugins/nodeorder/nodeorder.go index f5d00c2856..1fe2de00a3 100644 --- a/pkg/scheduler/plugins/nodeorder/nodeorder.go +++ b/pkg/scheduler/plugins/nodeorder/nodeorder.go @@ -289,7 +289,7 @@ func (pp *nodeOrderPlugin) OnSessionOpen(ssn *framework.Session) { p, _ = interpodaffinity.New(context.TODO(), plArgs, handle) interPodAffinity := p.(*interpodaffinity.InterPodAffinity) - p, _ = tainttoleration.New(context.TODO(), nil, handle) + p, _ = tainttoleration.New(context.TODO(), nil, handle, fts) taintToleration := p.(*tainttoleration.TaintToleration) ptsArgs := &config.PodTopologySpreadArgs{ diff --git a/pkg/scheduler/plugins/predicates/predicates.go b/pkg/scheduler/plugins/predicates/predicates.go index e74dbb680a..8e34f42212 100644 --- a/pkg/scheduler/plugins/predicates/predicates.go +++ b/pkg/scheduler/plugins/predicates/predicates.go @@ -310,7 +310,7 @@ func (pp *predicatesPlugin) OnSessionOpen(ssn *framework.Session) { plugin, _ = nodeports.New(context.TODO(), nil, handle) nodePortFilter := plugin.(*nodeports.NodePorts) // 4. TaintToleration - plugin, _ = tainttoleration.New(context.TODO(), nil, handle) + plugin, _ = tainttoleration.New(context.TODO(), nil, handle, features) tolerationFilter := plugin.(*tainttoleration.TaintToleration) // 5. InterPodAffinity plArgs := &config.InterPodAffinityArgs{} diff --git a/pkg/scheduler/plugins/util/k8s/framework.go b/pkg/scheduler/plugins/util/k8s/framework.go index 3874403185..8876a03d19 100644 --- a/pkg/scheduler/plugins/util/k8s/framework.go +++ b/pkg/scheduler/plugins/util/k8s/framework.go @@ -29,6 +29,7 @@ import ( "k8s.io/kubernetes/pkg/scheduler/apis/config" "k8s.io/kubernetes/pkg/scheduler/framework" "k8s.io/kubernetes/pkg/scheduler/framework/parallelize" + "k8s.io/kubernetes/pkg/scheduler/util/assumecache" scheduling "volcano.sh/volcano/pkg/scheduler/capabilities/volumebinding" ) @@ -153,6 +154,10 @@ func (f *Framework) Parallelizer() parallelize.Parallelizer { return parallelize.NewParallelizer(16) } +func (f *Framework) ResourceClaimCache() *assumecache.AssumeCache { + return nil +} + // NewFrameworkHandle creates a FrameworkHandle interface, which is used by k8s plugins. func NewFrameworkHandle(nodeMap map[string]*framework.NodeInfo, client kubernetes.Interface, informerFactory informers.SharedInformerFactory) framework.Handle { snapshot := NewSnapshot(nodeMap) From d38bc3ec0cd219b60da35e2198b914aa4d778a6d Mon Sep 17 00:00:00 2001 From: vie-serendipity <2733147505@qq.com> Date: Sat, 12 Oct 2024 17:46:40 +0800 Subject: [PATCH 2/4] feat: sync the changes in k8s regarding volumebinding Signed-off-by: vie-serendipity <2733147505@qq.com> --- go.mod | 1 - go.sum | 4 +- .../volumebinding/assume_cache.go | 387 +----------------- .../volumebinding/assume_cache_test.go | 69 +--- .../capabilities/volumebinding/binder.go | 14 +- .../capabilities/volumebinding/binder_test.go | 41 +- .../volumebinding/volume_binding.go | 4 +- 7 files changed, 63 insertions(+), 457 deletions(-) diff --git a/go.mod b/go.mod index 1a50b70f7d..df450e93d7 100644 --- a/go.mod +++ b/go.mod @@ -140,7 +140,6 @@ require ( replace ( github.com/opencontainers/runc => github.com/opencontainers/runc v1.0.3 - google.golang.org/grpc => google.golang.org/grpc v1.57.0 k8s.io/api => k8s.io/api v0.31.1 k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.31.1 k8s.io/apimachinery => k8s.io/apimachinery v0.31.1 diff --git a/go.sum b/go.sum index 6f0afcfd87..0c564d611e 100644 --- a/go.sum +++ b/go.sum @@ -360,8 +360,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1: google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= -google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw= -google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= 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= diff --git a/pkg/scheduler/capabilities/volumebinding/assume_cache.go b/pkg/scheduler/capabilities/volumebinding/assume_cache.go index 945c7a3eff..ee5a5d79b5 100644 --- a/pkg/scheduler/capabilities/volumebinding/assume_cache.go +++ b/pkg/scheduler/capabilities/volumebinding/assume_cache.go @@ -18,353 +18,17 @@ package volumebinding import ( "fmt" - "strconv" - "sync" "k8s.io/klog/v2" v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/client-go/tools/cache" storagehelpers "k8s.io/component-helpers/storage/volume" + "k8s.io/kubernetes/pkg/scheduler/util/assumecache" ) -// AssumeCache is a cache on top of the informer that allows for updating -// objects outside of informer events and also restoring the informer -// cache's version of the object. Objects are assumed to be -// Kubernetes API objects that implement meta.Interface -type AssumeCache interface { - // Assume updates the object in-memory only - Assume(obj interface{}) error - - // Restore the informer cache's version of the object - Restore(objName string) - - // Get the object by name - Get(objName string) (interface{}, error) - - // GetAPIObj gets the API object by name - GetAPIObj(objName string) (interface{}, error) - - // List all the objects in the cache - List(indexObj interface{}) []interface{} -} - -type errWrongType struct { - typeName string - object interface{} -} - -func (e *errWrongType) Error() string { - return fmt.Sprintf("could not convert object to type %v: %+v", e.typeName, e.object) -} - -type errNotFound struct { - typeName string - objectName string -} - -func (e *errNotFound) Error() string { - return fmt.Sprintf("could not find %v %q", e.typeName, e.objectName) -} - -type errObjectName struct { - detailedErr error -} - -func (e *errObjectName) Error() string { - return fmt.Sprintf("failed to get object name: %v", e.detailedErr) -} - -// assumeCache stores two pointers to represent a single object: -// - The pointer to the informer object. -// - The pointer to the latest object, which could be the same as -// the informer object, or an in-memory object. -// -// An informer update always overrides the latest object pointer. -// -// Assume() only updates the latest object pointer. -// Restore() sets the latest object pointer back to the informer object. -// Get/List() always returns the latest object pointer. -type assumeCache struct { - // The logger that was chosen when setting up the cache. - // Will be used for all operations. - logger klog.Logger - - // Synchronizes updates to store - rwMutex sync.RWMutex - - // describes the object stored - description string - - // Stores objInfo pointers - store cache.Indexer - - // Index function for object - indexFunc cache.IndexFunc - indexName string -} - -type objInfo struct { - // name of the object - name string - - // Latest version of object could be cached-only or from informer - latestObj interface{} - - // Latest object from informer - apiObj interface{} -} - -func objInfoKeyFunc(obj interface{}) (string, error) { - objInfo, ok := obj.(*objInfo) - if !ok { - return "", &errWrongType{"objInfo", obj} - } - return objInfo.name, nil -} - -func (c *assumeCache) objInfoIndexFunc(obj interface{}) ([]string, error) { - objInfo, ok := obj.(*objInfo) - if !ok { - return []string{""}, &errWrongType{"objInfo", obj} - } - return c.indexFunc(objInfo.latestObj) -} - -// NewAssumeCache creates an assume cache for general objects. -func NewAssumeCache(logger klog.Logger, informer cache.SharedIndexInformer, description, indexName string, indexFunc cache.IndexFunc) AssumeCache { - c := &assumeCache{ - logger: logger, - description: description, - indexFunc: indexFunc, - indexName: indexName, - } - indexers := cache.Indexers{} - if indexName != "" && indexFunc != nil { - indexers[indexName] = c.objInfoIndexFunc - } - c.store = cache.NewIndexer(objInfoKeyFunc, indexers) - - // Unit tests don't use informers - if informer != nil { - informer.AddEventHandler( - cache.ResourceEventHandlerFuncs{ - AddFunc: c.add, - UpdateFunc: c.update, - DeleteFunc: c.delete, - }, - ) - } - return c -} - -func (c *assumeCache) add(obj interface{}) { - if obj == nil { - return - } - - name, err := cache.MetaNamespaceKeyFunc(obj) - if err != nil { - c.logger.Error(&errObjectName{err}, "Add failed") - return - } - - c.rwMutex.Lock() - defer c.rwMutex.Unlock() - - if objInfo, _ := c.getObjInfo(name); objInfo != nil { - newVersion, err := c.getObjVersion(name, obj) - if err != nil { - c.logger.Error(err, "Add failed: couldn't get object version") - return - } - - storedVersion, err := c.getObjVersion(name, objInfo.latestObj) - if err != nil { - c.logger.Error(err, "Add failed: couldn't get stored object version") - return - } - - // Only update object if version is newer. - // This is so we don't override assumed objects due to informer resync. - if newVersion <= storedVersion { - c.logger.V(10).Info("Skip adding object to assume cache because version is not newer than storedVersion", "description", c.description, "cacheKey", name, "newVersion", newVersion, "storedVersion", storedVersion) - return - } - } - - objInfo := &objInfo{name: name, latestObj: obj, apiObj: obj} - if err = c.store.Update(objInfo); err != nil { - c.logger.Info("Error occurred while updating stored object", "err", err) - } else { - c.logger.V(10).Info("Adding object to assume cache", "description", c.description, "cacheKey", name, "assumeCache", obj) - } -} - -func (c *assumeCache) update(oldObj interface{}, newObj interface{}) { - c.add(newObj) -} - -func (c *assumeCache) delete(obj interface{}) { - if obj == nil { - return - } - - name, err := cache.DeletionHandlingMetaNamespaceKeyFunc(obj) - if err != nil { - c.logger.Error(&errObjectName{err}, "Failed to delete") - return - } - - c.rwMutex.Lock() - defer c.rwMutex.Unlock() - - objInfo := &objInfo{name: name} - err = c.store.Delete(objInfo) - if err != nil { - c.logger.Error(err, "Failed to delete", "description", c.description, "cacheKey", name) - } -} - -func (c *assumeCache) getObjVersion(name string, obj interface{}) (int64, error) { - objAccessor, err := meta.Accessor(obj) - if err != nil { - return -1, err - } - - objResourceVersion, err := strconv.ParseInt(objAccessor.GetResourceVersion(), 10, 64) - if err != nil { - return -1, fmt.Errorf("error parsing ResourceVersion %q for %v %q: %s", objAccessor.GetResourceVersion(), c.description, name, err) - } - return objResourceVersion, nil -} - -func (c *assumeCache) getObjInfo(name string) (*objInfo, error) { - obj, ok, err := c.store.GetByKey(name) - if err != nil { - return nil, err - } - if !ok { - return nil, &errNotFound{c.description, name} - } - - objInfo, ok := obj.(*objInfo) - if !ok { - return nil, &errWrongType{"objInfo", obj} - } - return objInfo, nil -} - -func (c *assumeCache) Get(objName string) (interface{}, error) { - c.rwMutex.RLock() - defer c.rwMutex.RUnlock() - - objInfo, err := c.getObjInfo(objName) - if err != nil { - return nil, err - } - return objInfo.latestObj, nil -} - -func (c *assumeCache) GetAPIObj(objName string) (interface{}, error) { - c.rwMutex.RLock() - defer c.rwMutex.RUnlock() - - objInfo, err := c.getObjInfo(objName) - if err != nil { - return nil, err - } - return objInfo.apiObj, nil -} - -func (c *assumeCache) List(indexObj interface{}) []interface{} { - c.rwMutex.RLock() - defer c.rwMutex.RUnlock() - - allObjs := []interface{}{} - var objs []interface{} - if c.indexName != "" { - o, err := c.store.Index(c.indexName, &objInfo{latestObj: indexObj}) - if err != nil { - c.logger.Error(err, "List index error") - return nil - } - objs = o - } else { - objs = c.store.List() - } - - for _, obj := range objs { - objInfo, ok := obj.(*objInfo) - if !ok { - c.logger.Error(&errWrongType{"objInfo", obj}, "List error") - continue - } - allObjs = append(allObjs, objInfo.latestObj) - } - return allObjs -} - -func (c *assumeCache) Assume(obj interface{}) error { - name, err := cache.MetaNamespaceKeyFunc(obj) - if err != nil { - return &errObjectName{err} - } - - c.rwMutex.Lock() - defer c.rwMutex.Unlock() - - objInfo, err := c.getObjInfo(name) - if err != nil { - return err - } - - newVersion, err := c.getObjVersion(name, obj) - if err != nil { - return err - } - - storedVersion, err := c.getObjVersion(name, objInfo.latestObj) - if err != nil { - return err - } - - if newVersion < storedVersion { - return fmt.Errorf("%v %q is out of sync (stored: %d, assume: %d)", c.description, name, storedVersion, newVersion) - } - - // Only update the cached object - objInfo.latestObj = obj - c.logger.V(4).Info("Assumed object", "description", c.description, "cacheKey", name, "version", newVersion) - return nil -} - -func (c *assumeCache) Restore(objName string) { - c.rwMutex.Lock() - defer c.rwMutex.Unlock() - - objInfo, err := c.getObjInfo(objName) - if err != nil { - // This could be expected if object got deleted - c.logger.V(5).Info("Restore object", "description", c.description, "cacheKey", objName, "err", err) - } else { - objInfo.latestObj = objInfo.apiObj - c.logger.V(4).Info("Restored object", "description", c.description, "cacheKey", objName) - } -} - // PVAssumeCache is a AssumeCache for PersistentVolume objects -type PVAssumeCache interface { - AssumeCache - - GetPV(pvName string) (*v1.PersistentVolume, error) - GetAPIPV(pvName string) (*v1.PersistentVolume, error) - ListPVs(storageClassName string) []*v1.PersistentVolume -} - -type pvAssumeCache struct { - AssumeCache +type PVAssumeCache struct { + *assumecache.AssumeCache logger klog.Logger } @@ -376,15 +40,15 @@ func pvStorageClassIndexFunc(obj interface{}) ([]string, error) { } // NewPVAssumeCache creates a PV assume cache. -func NewPVAssumeCache(logger klog.Logger, informer cache.SharedIndexInformer) PVAssumeCache { +func NewPVAssumeCache(logger klog.Logger, informer assumecache.Informer) *PVAssumeCache { logger = klog.LoggerWithName(logger, "PV Cache") - return &pvAssumeCache{ - AssumeCache: NewAssumeCache(logger, informer, "v1.PersistentVolume", "storageclass", pvStorageClassIndexFunc), + return &PVAssumeCache{ + AssumeCache: assumecache.NewAssumeCache(logger, informer, "v1.PersistentVolume", "storageclass", pvStorageClassIndexFunc), logger: logger, } } -func (c *pvAssumeCache) GetPV(pvName string) (*v1.PersistentVolume, error) { +func (c *PVAssumeCache) GetPV(pvName string) (*v1.PersistentVolume, error) { obj, err := c.Get(pvName) if err != nil { return nil, err @@ -392,24 +56,24 @@ func (c *pvAssumeCache) GetPV(pvName string) (*v1.PersistentVolume, error) { pv, ok := obj.(*v1.PersistentVolume) if !ok { - return nil, &errWrongType{"v1.PersistentVolume", obj} + return nil, &assumecache.WrongTypeError{TypeName: "v1.PersistentVolume", Object: obj} } return pv, nil } -func (c *pvAssumeCache) GetAPIPV(pvName string) (*v1.PersistentVolume, error) { +func (c *PVAssumeCache) GetAPIPV(pvName string) (*v1.PersistentVolume, error) { obj, err := c.GetAPIObj(pvName) if err != nil { return nil, err } pv, ok := obj.(*v1.PersistentVolume) if !ok { - return nil, &errWrongType{"v1.PersistentVolume", obj} + return nil, &assumecache.WrongTypeError{TypeName: "v1.PersistentVolume", Object: obj} } return pv, nil } -func (c *pvAssumeCache) ListPVs(storageClassName string) []*v1.PersistentVolume { +func (c *PVAssumeCache) ListPVs(storageClassName string) []*v1.PersistentVolume { objs := c.List(&v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ StorageClassName: storageClassName, @@ -419,7 +83,7 @@ func (c *pvAssumeCache) ListPVs(storageClassName string) []*v1.PersistentVolume for _, obj := range objs { pv, ok := obj.(*v1.PersistentVolume) if !ok { - c.logger.Error(&errWrongType{"v1.PersistentVolume", obj}, "ListPVs") + c.logger.Error(&assumecache.WrongTypeError{TypeName: "v1.PersistentVolume", Object: obj}, "ListPVs") continue } pvs = append(pvs, pv) @@ -428,30 +92,21 @@ func (c *pvAssumeCache) ListPVs(storageClassName string) []*v1.PersistentVolume } // PVCAssumeCache is a AssumeCache for PersistentVolumeClaim objects -type PVCAssumeCache interface { - AssumeCache - - // GetPVC returns the PVC from the cache with given pvcKey. - // pvcKey is the result of MetaNamespaceKeyFunc on PVC obj - GetPVC(pvcKey string) (*v1.PersistentVolumeClaim, error) - GetAPIPVC(pvcKey string) (*v1.PersistentVolumeClaim, error) -} - -type pvcAssumeCache struct { - AssumeCache +type PVCAssumeCache struct { + *assumecache.AssumeCache logger klog.Logger } // NewPVCAssumeCache creates a PVC assume cache. -func NewPVCAssumeCache(logger klog.Logger, informer cache.SharedIndexInformer) PVCAssumeCache { +func NewPVCAssumeCache(logger klog.Logger, informer assumecache.Informer) *PVCAssumeCache { logger = klog.LoggerWithName(logger, "PVC Cache") - return &pvcAssumeCache{ - AssumeCache: NewAssumeCache(logger, informer, "v1.PersistentVolumeClaim", "", nil), + return &PVCAssumeCache{ + AssumeCache: assumecache.NewAssumeCache(logger, informer, "v1.PersistentVolumeClaim", "", nil), logger: logger, } } -func (c *pvcAssumeCache) GetPVC(pvcKey string) (*v1.PersistentVolumeClaim, error) { +func (c *PVCAssumeCache) GetPVC(pvcKey string) (*v1.PersistentVolumeClaim, error) { obj, err := c.Get(pvcKey) if err != nil { return nil, err @@ -459,19 +114,19 @@ func (c *pvcAssumeCache) GetPVC(pvcKey string) (*v1.PersistentVolumeClaim, error pvc, ok := obj.(*v1.PersistentVolumeClaim) if !ok { - return nil, &errWrongType{"v1.PersistentVolumeClaim", obj} + return nil, &assumecache.WrongTypeError{TypeName: "v1.PersistentVolumeClaim", Object: obj} } return pvc, nil } -func (c *pvcAssumeCache) GetAPIPVC(pvcKey string) (*v1.PersistentVolumeClaim, error) { +func (c *PVCAssumeCache) GetAPIPVC(pvcKey string) (*v1.PersistentVolumeClaim, error) { obj, err := c.GetAPIObj(pvcKey) if err != nil { return nil, err } pvc, ok := obj.(*v1.PersistentVolumeClaim) if !ok { - return nil, &errWrongType{"v1.PersistentVolumeClaim", obj} + return nil, &assumecache.WrongTypeError{TypeName: "v1.PersistentVolumeClaim", Object: obj} } return pvc, nil } diff --git a/pkg/scheduler/capabilities/volumebinding/assume_cache_test.go b/pkg/scheduler/capabilities/volumebinding/assume_cache_test.go index 7391a412f8..4256789a2f 100644 --- a/pkg/scheduler/capabilities/volumebinding/assume_cache_test.go +++ b/pkg/scheduler/capabilities/volumebinding/assume_cache_test.go @@ -24,9 +24,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/component-helpers/storage/volume" "k8s.io/klog/v2/ktesting" + "k8s.io/kubernetes/pkg/scheduler/util/assumecache" ) -func verifyListPVs(t *testing.T, cache PVAssumeCache, expectedPVs map[string]*v1.PersistentVolume, storageClassName string) { +func verifyListPVs(t *testing.T, cache *PVAssumeCache, expectedPVs map[string]*v1.PersistentVolume, storageClassName string) { pvList := cache.ListPVs(storageClassName) if len(pvList) != len(expectedPVs) { t.Errorf("ListPVs() returned %v PVs, expected %v", len(pvList), len(expectedPVs)) @@ -42,7 +43,7 @@ func verifyListPVs(t *testing.T, cache PVAssumeCache, expectedPVs map[string]*v1 } } -func verifyPV(cache PVAssumeCache, name string, expectedPV *v1.PersistentVolume) error { +func verifyPV(cache *PVAssumeCache, name string, expectedPV *v1.PersistentVolume) error { pv, err := cache.GetPV(name) if err != nil { return err @@ -99,13 +100,9 @@ func TestAssumePV(t *testing.T) { for name, scenario := range scenarios { cache := NewPVAssumeCache(logger, nil) - internalCache, ok := cache.(*pvAssumeCache).AssumeCache.(*assumeCache) - if !ok { - t.Fatalf("Failed to get internal cache") - } // Add oldPV to cache - internalCache.add(scenario.oldPV) + assumecache.AddTestObject(cache.AssumeCache, scenario.oldPV) if err := verifyPV(cache, scenario.oldPV.Name, scenario.oldPV); err != nil { t.Errorf("Failed to GetPV() after initial update: %v", err) continue @@ -134,10 +131,6 @@ func TestAssumePV(t *testing.T) { func TestRestorePV(t *testing.T) { logger, _ := ktesting.NewTestContext(t) cache := NewPVAssumeCache(logger, nil) - internalCache, ok := cache.(*pvAssumeCache).AssumeCache.(*assumeCache) - if !ok { - t.Fatalf("Failed to get internal cache") - } oldPV := makePV("pv1", "").withVersion("5").PersistentVolume newPV := makePV("pv1", "").withVersion("5").PersistentVolume @@ -146,7 +139,7 @@ func TestRestorePV(t *testing.T) { cache.Restore("nothing") // Add oldPV to cache - internalCache.add(oldPV) + assumecache.AddTestObject(cache.AssumeCache, oldPV) if err := verifyPV(cache, oldPV.Name, oldPV); err != nil { t.Fatalf("Failed to GetPV() after initial update: %v", err) } @@ -175,10 +168,6 @@ func TestRestorePV(t *testing.T) { func TestBasicPVCache(t *testing.T) { logger, _ := ktesting.NewTestContext(t) cache := NewPVAssumeCache(logger, nil) - internalCache, ok := cache.(*pvAssumeCache).AssumeCache.(*assumeCache) - if !ok { - t.Fatalf("Failed to get internal cache") - } // Get object that doesn't exist pv, err := cache.GetPV("nothere") @@ -194,7 +183,7 @@ func TestBasicPVCache(t *testing.T) { for i := 0; i < 10; i++ { pv := makePV(fmt.Sprintf("test-pv%v", i), "").withVersion("1").PersistentVolume pvs[pv.Name] = pv - internalCache.add(pv) + assumecache.AddTestObject(cache.AssumeCache, pv) } // List them @@ -203,7 +192,7 @@ func TestBasicPVCache(t *testing.T) { // Update a PV updatedPV := makePV("test-pv3", "").withVersion("2").PersistentVolume pvs[updatedPV.Name] = updatedPV - internalCache.update(nil, updatedPV) + assumecache.UpdateTestObject(cache.AssumeCache, updatedPV) // List them verifyListPVs(t, cache, pvs, "") @@ -211,7 +200,7 @@ func TestBasicPVCache(t *testing.T) { // Delete a PV deletedPV := pvs["test-pv7"] delete(pvs, deletedPV.Name) - internalCache.delete(deletedPV) + assumecache.DeleteTestObject(cache.AssumeCache, deletedPV) // List them verifyListPVs(t, cache, pvs, "") @@ -220,17 +209,13 @@ func TestBasicPVCache(t *testing.T) { func TestPVCacheWithStorageClasses(t *testing.T) { logger, _ := ktesting.NewTestContext(t) cache := NewPVAssumeCache(logger, nil) - internalCache, ok := cache.(*pvAssumeCache).AssumeCache.(*assumeCache) - if !ok { - t.Fatalf("Failed to get internal cache") - } // Add a bunch of PVs pvs1 := map[string]*v1.PersistentVolume{} for i := 0; i < 10; i++ { pv := makePV(fmt.Sprintf("test-pv%v", i), "class1").withVersion("1").PersistentVolume pvs1[pv.Name] = pv - internalCache.add(pv) + assumecache.AddTestObject(cache.AssumeCache, pv) } // Add a bunch of PVs @@ -238,7 +223,7 @@ func TestPVCacheWithStorageClasses(t *testing.T) { for i := 0; i < 10; i++ { pv := makePV(fmt.Sprintf("test2-pv%v", i), "class2").withVersion("1").PersistentVolume pvs2[pv.Name] = pv - internalCache.add(pv) + assumecache.AddTestObject(cache.AssumeCache, pv) } // List them @@ -248,7 +233,7 @@ func TestPVCacheWithStorageClasses(t *testing.T) { // Update a PV updatedPV := makePV("test-pv3", "class1").withVersion("2").PersistentVolume pvs1[updatedPV.Name] = updatedPV - internalCache.update(nil, updatedPV) + assumecache.UpdateTestObject(cache.AssumeCache, updatedPV) // List them verifyListPVs(t, cache, pvs1, "class1") @@ -257,7 +242,7 @@ func TestPVCacheWithStorageClasses(t *testing.T) { // Delete a PV deletedPV := pvs1["test-pv7"] delete(pvs1, deletedPV.Name) - internalCache.delete(deletedPV) + assumecache.DeleteTestObject(cache.AssumeCache, deletedPV) // List them verifyListPVs(t, cache, pvs1, "class1") @@ -267,16 +252,12 @@ func TestPVCacheWithStorageClasses(t *testing.T) { func TestAssumeUpdatePVCache(t *testing.T) { logger, _ := ktesting.NewTestContext(t) cache := NewPVAssumeCache(logger, nil) - internalCache, ok := cache.(*pvAssumeCache).AssumeCache.(*assumeCache) - if !ok { - t.Fatalf("Failed to get internal cache") - } pvName := "test-pv0" // Add a PV pv := makePV(pvName, "").withVersion("1").PersistentVolume - internalCache.add(pv) + assumecache.AddTestObject(cache.AssumeCache, pv) if err := verifyPV(cache, pvName, pv); err != nil { t.Fatalf("failed to get PV: %v", err) } @@ -292,7 +273,7 @@ func TestAssumeUpdatePVCache(t *testing.T) { } // Add old PV - internalCache.add(pv) + assumecache.AddTestObject(cache.AssumeCache, pv) if err := verifyPV(cache, pvName, newPV); err != nil { t.Fatalf("failed to get PV after old PV added: %v", err) } @@ -309,7 +290,7 @@ func makeClaim(name, version, namespace string) *v1.PersistentVolumeClaim { } } -func verifyPVC(cache PVCAssumeCache, pvcKey string, expectedPVC *v1.PersistentVolumeClaim) error { +func verifyPVC(cache *PVCAssumeCache, pvcKey string, expectedPVC *v1.PersistentVolumeClaim) error { pvc, err := cache.GetPVC(pvcKey) if err != nil { return err @@ -361,13 +342,9 @@ func TestAssumePVC(t *testing.T) { for name, scenario := range scenarios { cache := NewPVCAssumeCache(logger, nil) - internalCache, ok := cache.(*pvcAssumeCache).AssumeCache.(*assumeCache) - if !ok { - t.Fatalf("Failed to get internal cache") - } // Add oldPVC to cache - internalCache.add(scenario.oldPVC) + assumecache.AddTestObject(cache.AssumeCache, scenario.oldPVC) if err := verifyPVC(cache, getPVCName(scenario.oldPVC), scenario.oldPVC); err != nil { t.Errorf("Failed to GetPVC() after initial update: %v", err) continue @@ -396,10 +373,6 @@ func TestAssumePVC(t *testing.T) { func TestRestorePVC(t *testing.T) { logger, _ := ktesting.NewTestContext(t) cache := NewPVCAssumeCache(logger, nil) - internalCache, ok := cache.(*pvcAssumeCache).AssumeCache.(*assumeCache) - if !ok { - t.Fatalf("Failed to get internal cache") - } oldPVC := makeClaim("pvc1", "5", "ns1") newPVC := makeClaim("pvc1", "5", "ns1") @@ -408,7 +381,7 @@ func TestRestorePVC(t *testing.T) { cache.Restore("nothing") // Add oldPVC to cache - internalCache.add(oldPVC) + assumecache.AddTestObject(cache.AssumeCache, oldPVC) if err := verifyPVC(cache, getPVCName(oldPVC), oldPVC); err != nil { t.Fatalf("Failed to GetPVC() after initial update: %v", err) } @@ -437,17 +410,13 @@ func TestRestorePVC(t *testing.T) { func TestAssumeUpdatePVCCache(t *testing.T) { logger, _ := ktesting.NewTestContext(t) cache := NewPVCAssumeCache(logger, nil) - internalCache, ok := cache.(*pvcAssumeCache).AssumeCache.(*assumeCache) - if !ok { - t.Fatalf("Failed to get internal cache") - } pvcName := "test-pvc0" pvcNamespace := "test-ns" // Add a PVC pvc := makeClaim(pvcName, "1", pvcNamespace) - internalCache.add(pvc) + assumecache.AddTestObject(cache.AssumeCache, pvc) if err := verifyPVC(cache, getPVCName(pvc), pvc); err != nil { t.Fatalf("failed to get PVC: %v", err) } @@ -463,7 +432,7 @@ func TestAssumeUpdatePVCCache(t *testing.T) { } // Add old PVC - internalCache.add(pvc) + assumecache.AddTestObject(cache.AssumeCache, pvc) if err := verifyPVC(cache, getPVCName(pvc), newPVC); err != nil { t.Fatalf("failed to get PVC after old PVC added: %v", err) } diff --git a/pkg/scheduler/capabilities/volumebinding/binder.go b/pkg/scheduler/capabilities/volumebinding/binder.go index f20ea286d2..a52b899030 100644 --- a/pkg/scheduler/capabilities/volumebinding/binder.go +++ b/pkg/scheduler/capabilities/volumebinding/binder.go @@ -18,6 +18,7 @@ package volumebinding import ( "context" + "errors" "fmt" "sort" "strings" @@ -48,6 +49,7 @@ import ( v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper" "k8s.io/kubernetes/pkg/features" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/volumebinding/metrics" + "k8s.io/kubernetes/pkg/scheduler/util/assumecache" "k8s.io/kubernetes/pkg/volume/util" ) @@ -221,8 +223,8 @@ type volumeBinder struct { nodeLister corelisters.NodeLister csiNodeLister storagelisters.CSINodeLister - pvcCache PVCAssumeCache - pvCache PVAssumeCache + pvcCache *PVCAssumeCache + pvCache *PVAssumeCache // Amount of time to wait for the bind operation to succeed bindTimeout time.Duration @@ -731,7 +733,7 @@ func (b *volumeBinder) checkBindings(logger klog.Logger, pod *v1.Pod, bindings [ if pvc.Spec.VolumeName != "" { pv, err := b.pvCache.GetAPIPV(pvc.Spec.VolumeName) if err != nil { - if _, ok := err.(*errNotFound); ok { + if errors.Is(err, assumecache.ErrNotFound) { // We tolerate NotFound error here, because PV is possibly // not found because of API delay, we can check next time. // And if PV does not exist because it's deleted, PVC will @@ -884,7 +886,7 @@ func (b *volumeBinder) checkBoundClaims(logger klog.Logger, claims []*v1.Persist pvName := pvc.Spec.VolumeName pv, err := b.pvCache.GetPV(pvName) if err != nil { - if _, ok := err.(*errNotFound); ok { + if errors.Is(err, assumecache.ErrNotFound) { err = nil } return true, false, err @@ -923,7 +925,7 @@ func (b *volumeBinder) findMatchingVolumes(logger klog.Logger, pod *v1.Pod, clai pvs := unboundVolumesDelayBinding[storageClassName] // Find a matching PV - pv, err := volume.FindMatchingVolume(pvc, pvs, node, chosenPVs, true) + pv, err := volume.FindMatchingVolume(pvc, pvs, node, chosenPVs, true, utilfeature.DefaultFeatureGate.Enabled(features.VolumeAttributesClass)) if err != nil { return false, nil, nil, err } @@ -1114,8 +1116,6 @@ func isCSIMigrationOnForPlugin(pluginName string) bool { return true case csiplugins.PortworxVolumePluginName: return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationPortworx) - case csiplugins.RBDVolumePluginName: - return utilfeature.DefaultFeatureGate.Enabled(features.CSIMigrationRBD) } return false } diff --git a/pkg/scheduler/capabilities/volumebinding/binder_test.go b/pkg/scheduler/capabilities/volumebinding/binder_test.go index 98c5e979aa..f2c3792de9 100644 --- a/pkg/scheduler/capabilities/volumebinding/binder_test.go +++ b/pkg/scheduler/capabilities/volumebinding/binder_test.go @@ -20,17 +20,16 @@ import ( "context" "fmt" "os" + "reflect" "sort" "testing" "time" "github.com/google/go-cmp/cmp" - storagev1beta1 "k8s.io/api/storage/v1beta1" - "k8s.io/apimachinery/pkg/api/equality" - storageinformersv1beta1 "k8s.io/client-go/informers/storage/v1beta1" v1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" + storagev1beta1 "k8s.io/api/storage/v1beta1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" @@ -40,6 +39,7 @@ import ( "k8s.io/client-go/informers" coreinformers "k8s.io/client-go/informers/core/v1" storageinformers "k8s.io/client-go/informers/storage/v1" + storageinformersv1beta1 "k8s.io/client-go/informers/storage/v1beta1" clientset "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" k8stesting "k8s.io/client-go/testing" @@ -49,6 +49,7 @@ import ( _ "k8s.io/klog/v2/ktesting/init" "k8s.io/kubernetes/pkg/controller" pvtesting "k8s.io/kubernetes/pkg/controller/volume/persistentvolume/testing" + "k8s.io/kubernetes/pkg/scheduler/util/assumecache" ) var ( @@ -140,8 +141,6 @@ type testEnv struct { internalPodInformer coreinformers.PodInformer internalNodeInformer coreinformers.NodeInformer internalCSINodeInformer storageinformers.CSINodeInformer - internalPVCache *assumeCache - internalPVCCache *assumeCache // For CSIStorageCapacity feature testing: internalCSIDriverInformer storageinformers.CSIDriverInformer @@ -260,18 +259,6 @@ func newTestBinder(t *testing.T, ctx context.Context) *testEnv { t.Fatalf("Failed to convert to internal binder") } - pvCache := internalBinder.pvCache - internalPVCache, ok := pvCache.(*pvAssumeCache).AssumeCache.(*assumeCache) - if !ok { - t.Fatalf("Failed to convert to internal PV cache") - } - - pvcCache := internalBinder.pvcCache - internalPVCCache, ok := pvcCache.(*pvcAssumeCache).AssumeCache.(*assumeCache) - if !ok { - t.Fatalf("Failed to convert to internal PVC cache") - } - return &testEnv{ client: client, reactor: reactor, @@ -280,8 +267,6 @@ func newTestBinder(t *testing.T, ctx context.Context) *testEnv { internalPodInformer: podInformer, internalNodeInformer: nodeInformer, internalCSINodeInformer: csiNodeInformer, - internalPVCache: internalPVCache, - internalPVCCache: internalPVCCache, internalCSIDriverInformer: csiDriverInformer, internalCSIStorageCapacityInformer: csiStorageCapacityInformer, @@ -315,9 +300,8 @@ func (env *testEnv) addCSIStorageCapacities(capacities []*storagev1beta1.CSIStor } func (env *testEnv) initClaims(cachedPVCs []*v1.PersistentVolumeClaim, apiPVCs []*v1.PersistentVolumeClaim) { - internalPVCCache := env.internalPVCCache for _, pvc := range cachedPVCs { - internalPVCCache.add(pvc) + assumecache.AddTestObject(env.internalBinder.pvcCache.AssumeCache, pvc) if apiPVCs == nil { env.reactor.AddClaim(pvc) } @@ -328,9 +312,8 @@ func (env *testEnv) initClaims(cachedPVCs []*v1.PersistentVolumeClaim, apiPVCs [ } func (env *testEnv) initVolumes(cachedPVs []*v1.PersistentVolume, apiPVs []*v1.PersistentVolume) { - internalPVCache := env.internalPVCache for _, pv := range cachedPVs { - internalPVCache.add(pv) + assumecache.AddTestObject(env.internalBinder.pvCache.AssumeCache, pv) if apiPVs == nil { env.reactor.AddVolume(pv) } @@ -351,7 +334,7 @@ func (env *testEnv) updateVolumes(ctx context.Context, pvs []*v1.PersistentVolum } return wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, 3*time.Second, false, func(ctx context.Context) (bool, error) { for _, pv := range pvs { - obj, err := env.internalPVCache.GetAPIObj(pv.Name) + obj, err := env.internalBinder.pvCache.GetAPIObj(pv.Name) if obj == nil || err != nil { return false, nil } @@ -377,7 +360,7 @@ func (env *testEnv) updateClaims(ctx context.Context, pvcs []*v1.PersistentVolum } return wait.PollUntilContextTimeout(ctx, 100*time.Millisecond, 3*time.Second, false, func(ctx context.Context) (bool, error) { for _, pvc := range pvcs { - obj, err := env.internalPVCCache.GetAPIObj(getPVCName(pvc)) + obj, err := env.internalBinder.pvcCache.GetAPIObj(getPVCName(pvc)) if obj == nil || err != nil { return false, nil } @@ -395,13 +378,13 @@ func (env *testEnv) updateClaims(ctx context.Context, pvcs []*v1.PersistentVolum func (env *testEnv) deleteVolumes(pvs []*v1.PersistentVolume) { for _, pv := range pvs { - env.internalPVCache.delete(pv) + assumecache.DeleteTestObject(env.internalBinder.pvCache.AssumeCache, pv) } } func (env *testEnv) deleteClaims(pvcs []*v1.PersistentVolumeClaim) { for _, pvc := range pvcs { - env.internalPVCCache.delete(pvc) + assumecache.DeleteTestObject(env.internalBinder.pvcCache.AssumeCache, pvc) } } @@ -2457,12 +2440,12 @@ func TestGetEligibleNodes(t *testing.T) { eligibleNodes := testEnv.binder.GetEligibleNodes(logger, scenario.pvcs) // Validate - if equality.Semantic.DeepEqual(scenario.eligibleNodes, eligibleNodes) { + if reflect.DeepEqual(scenario.eligibleNodes, eligibleNodes) { fmt.Println("foo") } if compDiff := cmp.Diff(scenario.eligibleNodes, eligibleNodes, cmp.Comparer(func(a, b sets.Set[string]) bool { - return equality.Semantic.DeepEqual(a, b) + return reflect.DeepEqual(a, b) })); compDiff != "" { t.Errorf("Unexpected eligible nodes (-want +got):\n%s", compDiff) } diff --git a/pkg/scheduler/capabilities/volumebinding/volume_binding.go b/pkg/scheduler/capabilities/volumebinding/volume_binding.go index 2a5dbcfabe..cc9b31cd22 100644 --- a/pkg/scheduler/capabilities/volumebinding/volume_binding.go +++ b/pkg/scheduler/capabilities/volumebinding/volume_binding.go @@ -93,7 +93,7 @@ func (pl *VolumeBinding) Name() string { // EventsToRegister returns the possible events that may make a Pod // failed by this plugin schedulable. -func (pl *VolumeBinding) EventsToRegister() []framework.ClusterEventWithHint { +func (pl *VolumeBinding) EventsToRegister(_ context.Context) ([]framework.ClusterEventWithHint, error) { events := []framework.ClusterEventWithHint{ // Pods may fail because of missing or mis-configured storage class // (e.g., allowedTopologies, volumeBindingMode), and hence may become @@ -123,7 +123,7 @@ func (pl *VolumeBinding) EventsToRegister() []framework.ClusterEventWithHint { {Event: framework.ClusterEvent{Resource: framework.CSIDriver, ActionType: framework.Add | framework.Update}}, {Event: framework.ClusterEvent{Resource: framework.CSIStorageCapacity, ActionType: framework.Add | framework.Update}}, } - return events + return events, nil } // podHasPVCs returns 2 values: From 2cf0cbe31519a2fb0b4346ec6acf0d52229c80dd Mon Sep 17 00:00:00 2001 From: vie-serendipity <2733147505@qq.com> Date: Wed, 16 Oct 2024 11:13:21 +0800 Subject: [PATCH 3/4] chore: update licenses, make manifests, and upgrade the version of controller gen Signed-off-by: vie-serendipity <2733147505@qq.com> feat: upgrade version of kind and kubectl feat: upgrade controller-gen to 0.16.4 and make manifests Signed-off-by: vie-serendipity <2733147505@qq.com> feat: upgrade apis and update readme Signed-off-by: vie-serendipity <2733147505@qq.com> --- .github/workflows/e2e_parallel_jobs.yaml | 4 +- .github/workflows/e2e_scheduling_actions.yaml | 4 +- .github/workflows/e2e_scheduling_basic.yaml | 4 +- .github/workflows/e2e_sequence.yaml | 4 +- .github/workflows/e2e_vcctl.yaml | 4 +- Makefile | 2 +- README.md | 16 +- .../bases/flow.volcano.sh_jobflows.yaml | 2 +- .../bases/flow.volcano.sh_jobtemplates.yaml | 45 ++- .../volcano/bases/batch.volcano.sh_jobs.yaml | 45 ++- .../bases/bus.volcano.sh_commands.yaml | 2 +- .../nodeinfo.volcano.sh_numatopologies.yaml | 2 +- .../scheduling.volcano.sh_podgroups.yaml | 2 +- .../bases/scheduling.volcano.sh_queues.yaml | 2 +- go.mod | 2 +- go.sum | 4 +- hack/lib/install.sh | 2 +- .../dockerfile/webhook-manager/Dockerfile | 2 +- .../crd/bases/flow.volcano.sh_jobflows.yaml | 2 +- .../bases/flow.volcano.sh_jobtemplates.yaml | 45 ++- .../crd/bases/batch.volcano.sh_jobs.yaml | 45 ++- .../crd/bases/bus.volcano.sh_commands.yaml | 2 +- .../nodeinfo.volcano.sh_numatopologies.yaml | 2 +- .../scheduling.volcano.sh_podgroups.yaml | 2 +- .../bases/scheduling.volcano.sh_queues.yaml | 2 +- installer/volcano-development.yaml | 100 +++++-- .../antlr/antlr4/runtime/Go/antlr/v4/LICENSE | 26 -- .../github.com/antlr4-go/antlr/v4/LICENSE | 28 ++ licenses/github.com/fxamacker/cbor/v2/LICENSE | 21 ++ .../grpc-gateway/v2/{LICENSE.txt => LICENSE} | 0 .../github.com/opencontainers/runc/LICENSE | 191 +++++++++++++ licenses/github.com/x448/float16/LICENSE | 22 ++ .../evanphx/json-patch.v4}/LICENSE | 0 licenses/sigs.k8s.io/yaml/LICENSE | 256 ++++++++++++++++++ .../yaml/goyaml.v2}/LICENSE | 0 licenses/sigs.k8s.io/yaml/goyaml.v3/LICENSE | 50 ++++ 36 files changed, 829 insertions(+), 113 deletions(-) delete mode 100644 licenses/github.com/antlr/antlr4/runtime/Go/antlr/v4/LICENSE create mode 100644 licenses/github.com/antlr4-go/antlr/v4/LICENSE create mode 100644 licenses/github.com/fxamacker/cbor/v2/LICENSE rename licenses/github.com/grpc-ecosystem/grpc-gateway/v2/{LICENSE.txt => LICENSE} (100%) create mode 100644 licenses/github.com/opencontainers/runc/LICENSE create mode 100644 licenses/github.com/x448/float16/LICENSE rename licenses/{github.com/evanphx/json-patch => gopkg.in/evanphx/json-patch.v4}/LICENSE (100%) rename licenses/{github.com/matttproud/golang_protobuf_extensions => sigs.k8s.io/yaml/goyaml.v2}/LICENSE (100%) create mode 100644 licenses/sigs.k8s.io/yaml/goyaml.v3/LICENSE diff --git a/.github/workflows/e2e_parallel_jobs.yaml b/.github/workflows/e2e_parallel_jobs.yaml index 542c6edea4..e85ba26754 100644 --- a/.github/workflows/e2e_parallel_jobs.yaml +++ b/.github/workflows/e2e_parallel_jobs.yaml @@ -31,8 +31,8 @@ jobs: - name: Install dependences run: | - GO111MODULE="on" go install sigs.k8s.io/kind@v0.23.0 - curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.30.1/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl + GO111MODULE="on" go install sigs.k8s.io/kind@v0.24.0 + curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.31.0/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/e2e_scheduling_actions.yaml b/.github/workflows/e2e_scheduling_actions.yaml index b9afa12359..0123e41834 100644 --- a/.github/workflows/e2e_scheduling_actions.yaml +++ b/.github/workflows/e2e_scheduling_actions.yaml @@ -31,8 +31,8 @@ jobs: - name: Install dependences run: | - GO111MODULE="on" go install sigs.k8s.io/kind@v0.23.0 - curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.30.1/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl + GO111MODULE="on" go install sigs.k8s.io/kind@v0.24.0 + curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.31.0/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/e2e_scheduling_basic.yaml b/.github/workflows/e2e_scheduling_basic.yaml index 9c025cfeaf..b0dfc625e5 100644 --- a/.github/workflows/e2e_scheduling_basic.yaml +++ b/.github/workflows/e2e_scheduling_basic.yaml @@ -31,8 +31,8 @@ jobs: - name: Install dependences run: | - GO111MODULE="on" go install sigs.k8s.io/kind@v0.23.0 - curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.30.1/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl + GO111MODULE="on" go install sigs.k8s.io/kind@v0.24.0 + curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.31.0/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/e2e_sequence.yaml b/.github/workflows/e2e_sequence.yaml index edff9c12b3..2aa319b5fb 100644 --- a/.github/workflows/e2e_sequence.yaml +++ b/.github/workflows/e2e_sequence.yaml @@ -31,8 +31,8 @@ jobs: - name: Install dependences run: | - GO111MODULE="on" go install sigs.k8s.io/kind@v0.23.0 - curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.30.1/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl + GO111MODULE="on" go install sigs.k8s.io/kind@v0.24.0 + curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.31.0/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl - name: Checkout code uses: actions/checkout@v3 diff --git a/.github/workflows/e2e_vcctl.yaml b/.github/workflows/e2e_vcctl.yaml index 0ad9acb476..9c54a2e0dc 100644 --- a/.github/workflows/e2e_vcctl.yaml +++ b/.github/workflows/e2e_vcctl.yaml @@ -31,8 +31,8 @@ jobs: - name: Install dependences run: | - GO111MODULE="on" go install sigs.k8s.io/kind@v0.23.0 - curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.30.1/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl + GO111MODULE="on" go install sigs.k8s.io/kind@v0.24.0 + curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.31.0/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl - name: Checkout code uses: actions/checkout@v3 diff --git a/Makefile b/Makefile index 5bb995f4fc..4b8154776e 100644 --- a/Makefile +++ b/Makefile @@ -186,7 +186,7 @@ ifeq (, $(shell which controller-gen)) CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\ cd $$CONTROLLER_GEN_TMP_DIR ;\ go mod init tmp ;\ - GOOS=${OS} go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0 ;\ + GOOS=${OS} go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.4 ;\ rm -rf $$CONTROLLER_GEN_TMP_DIR ;\ } CONTROLLER_GEN=$(GOBIN)/controller-gen diff --git a/README.md b/README.md index 8a3265c87e..997d03c561 100644 --- a/README.md +++ b/README.md @@ -147,14 +147,14 @@ kubectl create -f _output/release/volcano-monitoring-latest.yaml ## Kubernetes compatibility -| | Kubernetes 1.17 | Kubernetes 1.18 | Kubernetes 1.19 | Kubernetes 1.20 | Kubernetes 1.21 | Kubernetes 1.22 | Kubernetes 1.23 | Kubernetes 1.24 | Kubernetes 1.25 | Kubernetes 1.26 | Kubernetes 1.27 | Kubernetes 1.28 | Kubernetes 1.29 |Kubernetes 1.30 | -|-----------------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|---------------| -| Volcano v1.6 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | - | - | - | - | - |- | -| Volcano v1.7 | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |_ | -| Volcano v1.8 | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |- | -| Volcano v1.9 | - | - | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |- | -| Volcano v1.10 | - | - | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |✓ | -| Volcano HEAD (master) | - | - | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |✓ | +| | Kubernetes 1.17 | Kubernetes 1.18 | Kubernetes 1.19 | Kubernetes 1.20 | Kubernetes 1.21 | Kubernetes 1.22 | Kubernetes 1.23 | Kubernetes 1.24 | Kubernetes 1.25 | Kubernetes 1.26 | Kubernetes 1.27 | Kubernetes 1.28 | Kubernetes 1.29 |Kubernetes 1.30 |Kubernetes 1.31 | +|-----------------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|-----------------|---------------|---------------| +| Volcano v1.6 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | - | - | - | - | - |- |- | +| Volcano v1.7 | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |_ |_ | +| Volcano v1.8 | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |- |_ | +| Volcano v1.9 | - | - | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |- |_ | +| Volcano v1.10 | - | - | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |✓ |_ | +| Volcano HEAD (master) | - | - | - | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |✓ |✓ | Key: * `✓` Volcano and the Kubernetes version are exactly compatible. diff --git a/config/crd/jobflow/bases/flow.volcano.sh_jobflows.yaml b/config/crd/jobflow/bases/flow.volcano.sh_jobflows.yaml index c774ae2d39..6c0a212e22 100644 --- a/config/crd/jobflow/bases/flow.volcano.sh_jobflows.yaml +++ b/config/crd/jobflow/bases/flow.volcano.sh_jobflows.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: jobflows.flow.volcano.sh spec: group: flow.volcano.sh diff --git a/config/crd/jobflow/bases/flow.volcano.sh_jobtemplates.yaml b/config/crd/jobflow/bases/flow.volcano.sh_jobtemplates.yaml index b695dfe48c..2555f5aa9f 100644 --- a/config/crd/jobflow/bases/flow.volcano.sh_jobtemplates.yaml +++ b/config/crd/jobflow/bases/flow.volcano.sh_jobtemplates.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: jobtemplates.flow.volcano.sh spec: group: flow.volcano.sh @@ -832,6 +832,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -938,6 +939,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1019,6 +1021,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -1136,6 +1140,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1537,6 +1542,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1643,6 +1649,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1724,6 +1731,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -1841,6 +1850,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2256,6 +2266,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2362,6 +2373,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2443,6 +2455,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -2560,6 +2574,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2724,13 +2739,10 @@ spec: properties: name: type: string - source: - properties: - resourceClaimName: - type: string - resourceClaimTemplateName: - type: string - type: object + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string required: - name type: object @@ -2806,6 +2818,8 @@ spec: type: integer type: array x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string sysctls: items: properties: @@ -2945,10 +2959,12 @@ spec: diskURI: type: string fsType: + default: ext4 type: string kind: type: string readOnly: + default: false type: boolean required: - diskName @@ -3325,6 +3341,13 @@ spec: required: - path type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object iscsi: properties: chapAuthDiscovery: @@ -3338,6 +3361,7 @@ spec: iqn: type: string iscsiInterface: + default: default type: string lun: format: int32 @@ -3586,6 +3610,7 @@ spec: image: type: string keyring: + default: /etc/ceph/keyring type: string monitors: items: @@ -3593,6 +3618,7 @@ spec: type: array x-kubernetes-list-type: atomic pool: + default: rbd type: string readOnly: type: boolean @@ -3604,6 +3630,7 @@ spec: type: object x-kubernetes-map-type: atomic user: + default: admin type: string required: - image @@ -3612,6 +3639,7 @@ spec: scaleIO: properties: fsType: + default: xfs type: string gateway: type: string @@ -3629,6 +3657,7 @@ spec: sslEnabled: type: boolean storageMode: + default: ThinProvisioned type: string storagePool: type: string diff --git a/config/crd/volcano/bases/batch.volcano.sh_jobs.yaml b/config/crd/volcano/bases/batch.volcano.sh_jobs.yaml index a68838f518..cbb78a3528 100644 --- a/config/crd/volcano/bases/batch.volcano.sh_jobs.yaml +++ b/config/crd/volcano/bases/batch.volcano.sh_jobs.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: jobs.batch.volcano.sh spec: group: batch.volcano.sh @@ -850,6 +850,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -956,6 +957,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1037,6 +1039,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -1154,6 +1158,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1555,6 +1560,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1661,6 +1667,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1742,6 +1749,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -1859,6 +1868,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2274,6 +2284,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2380,6 +2391,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2461,6 +2473,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -2578,6 +2592,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2742,13 +2757,10 @@ spec: properties: name: type: string - source: - properties: - resourceClaimName: - type: string - resourceClaimTemplateName: - type: string - type: object + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string required: - name type: object @@ -2824,6 +2836,8 @@ spec: type: integer type: array x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string sysctls: items: properties: @@ -2963,10 +2977,12 @@ spec: diskURI: type: string fsType: + default: ext4 type: string kind: type: string readOnly: + default: false type: boolean required: - diskName @@ -3343,6 +3359,13 @@ spec: required: - path type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object iscsi: properties: chapAuthDiscovery: @@ -3356,6 +3379,7 @@ spec: iqn: type: string iscsiInterface: + default: default type: string lun: format: int32 @@ -3604,6 +3628,7 @@ spec: image: type: string keyring: + default: /etc/ceph/keyring type: string monitors: items: @@ -3611,6 +3636,7 @@ spec: type: array x-kubernetes-list-type: atomic pool: + default: rbd type: string readOnly: type: boolean @@ -3622,6 +3648,7 @@ spec: type: object x-kubernetes-map-type: atomic user: + default: admin type: string required: - image @@ -3630,6 +3657,7 @@ spec: scaleIO: properties: fsType: + default: xfs type: string gateway: type: string @@ -3647,6 +3675,7 @@ spec: sslEnabled: type: boolean storageMode: + default: ThinProvisioned type: string storagePool: type: string diff --git a/config/crd/volcano/bases/bus.volcano.sh_commands.yaml b/config/crd/volcano/bases/bus.volcano.sh_commands.yaml index 8f2b7bc403..caa4785b43 100644 --- a/config/crd/volcano/bases/bus.volcano.sh_commands.yaml +++ b/config/crd/volcano/bases/bus.volcano.sh_commands.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: commands.bus.volcano.sh spec: group: bus.volcano.sh diff --git a/config/crd/volcano/bases/nodeinfo.volcano.sh_numatopologies.yaml b/config/crd/volcano/bases/nodeinfo.volcano.sh_numatopologies.yaml index d6318fcfca..c8687b5492 100644 --- a/config/crd/volcano/bases/nodeinfo.volcano.sh_numatopologies.yaml +++ b/config/crd/volcano/bases/nodeinfo.volcano.sh_numatopologies.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: numatopologies.nodeinfo.volcano.sh spec: group: nodeinfo.volcano.sh diff --git a/config/crd/volcano/bases/scheduling.volcano.sh_podgroups.yaml b/config/crd/volcano/bases/scheduling.volcano.sh_podgroups.yaml index f70fc4769b..503122dd20 100644 --- a/config/crd/volcano/bases/scheduling.volcano.sh_podgroups.yaml +++ b/config/crd/volcano/bases/scheduling.volcano.sh_podgroups.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: podgroups.scheduling.volcano.sh spec: group: scheduling.volcano.sh diff --git a/config/crd/volcano/bases/scheduling.volcano.sh_queues.yaml b/config/crd/volcano/bases/scheduling.volcano.sh_queues.yaml index 11eb3e4ca5..10b562da21 100644 --- a/config/crd/volcano/bases/scheduling.volcano.sh_queues.yaml +++ b/config/crd/volcano/bases/scheduling.volcano.sh_queues.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: queues.scheduling.volcano.sh spec: group: scheduling.volcano.sh diff --git a/go.mod b/go.mod index df450e93d7..0649e5ebf7 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,7 @@ require ( sigs.k8s.io/controller-runtime v0.13.0 sigs.k8s.io/yaml v1.4.0 stathat.com/c/consistent v1.0.0 - volcano.sh/apis v1.10.0-alpha.0.0.20240904072435-17826d64a144 + volcano.sh/apis v1.10.0-alpha.0.0.20241016111016-bb93758bd51f ) require ( diff --git a/go.sum b/go.sum index 0c564d611e..fb1eeaf9e8 100644 --- a/go.sum +++ b/go.sum @@ -448,5 +448,5 @@ sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= stathat.com/c/consistent v1.0.0 h1:ezyc51EGcRPJUxfHGSgJjWzJdj3NiMU9pNfLNGiXV0c= stathat.com/c/consistent v1.0.0/go.mod h1:QkzMWzcbB+yQBL2AttO6sgsQS/JSTapcDISJalmCDS0= -volcano.sh/apis v1.10.0-alpha.0.0.20240904072435-17826d64a144 h1:X+HAVl9WcV+hXkmXnkfs4ikaBeAEoH6V+2Wxrb3j4Vs= -volcano.sh/apis v1.10.0-alpha.0.0.20240904072435-17826d64a144/go.mod h1:z8hhFZ2qcUMR1JIjVYmBqL98CVaXNzsQAcqKiytQW9s= +volcano.sh/apis v1.10.0-alpha.0.0.20241016111016-bb93758bd51f h1:wqvGQgzYCPJSS07xE1LZbJ/Mxb1f/xFWThnII6BzMhg= +volcano.sh/apis v1.10.0-alpha.0.0.20241016111016-bb93758bd51f/go.mod h1:XHIjTlHDMZTLRg2Y2JAkj85iP0iiet2tv+HfPQZrsHs= diff --git a/hack/lib/install.sh b/hack/lib/install.sh index 56f05d95ef..e1c31abc7d 100644 --- a/hack/lib/install.sh +++ b/hack/lib/install.sh @@ -69,7 +69,7 @@ function check-kind { which kind >/dev/null 2>&1 if [[ $? -ne 0 ]]; then echo "Installing kind ..." - GOOS=${OS} go install sigs.k8s.io/kind@v0.23.0 + GOOS=${OS} go install sigs.k8s.io/kind@v0.24.0 else echo -n "Found kind, version: " && kind version fi diff --git a/installer/dockerfile/webhook-manager/Dockerfile b/installer/dockerfile/webhook-manager/Dockerfile index 1a97486249..f6d41250eb 100644 --- a/installer/dockerfile/webhook-manager/Dockerfile +++ b/installer/dockerfile/webhook-manager/Dockerfile @@ -20,7 +20,7 @@ ADD . volcano RUN cd volcano && make vc-webhook-manager FROM alpine:latest -ARG KUBE_VERSION="1.31.1" +ARG KUBE_VERSION="1.31.0" ARG TARGETARCH ARG APK_MIRROR RUN if [[ -n "$APK_MIRROR" ]]; then sed -i "s@https://dl-cdn.alpinelinux.org@${APK_MIRROR}@g" /etc/apk/repositories ; fi && \ diff --git a/installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobflows.yaml b/installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobflows.yaml index 5cb8515667..9f94cca0d0 100644 --- a/installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobflows.yaml +++ b/installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobflows.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: jobflows.flow.volcano.sh spec: group: flow.volcano.sh diff --git a/installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobtemplates.yaml b/installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobtemplates.yaml index 57f1a32ce6..2702917f52 100644 --- a/installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobtemplates.yaml +++ b/installer/helm/chart/volcano/charts/jobflow/crd/bases/flow.volcano.sh_jobtemplates.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: jobtemplates.flow.volcano.sh spec: group: flow.volcano.sh @@ -831,6 +831,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -937,6 +938,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1018,6 +1020,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -1135,6 +1139,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1536,6 +1541,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1642,6 +1648,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1723,6 +1730,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -1840,6 +1849,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2255,6 +2265,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2361,6 +2372,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2442,6 +2454,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -2559,6 +2573,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2723,13 +2738,10 @@ spec: properties: name: type: string - source: - properties: - resourceClaimName: - type: string - resourceClaimTemplateName: - type: string - type: object + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string required: - name type: object @@ -2805,6 +2817,8 @@ spec: type: integer type: array x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string sysctls: items: properties: @@ -2944,10 +2958,12 @@ spec: diskURI: type: string fsType: + default: ext4 type: string kind: type: string readOnly: + default: false type: boolean required: - diskName @@ -3324,6 +3340,13 @@ spec: required: - path type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object iscsi: properties: chapAuthDiscovery: @@ -3337,6 +3360,7 @@ spec: iqn: type: string iscsiInterface: + default: default type: string lun: format: int32 @@ -3585,6 +3609,7 @@ spec: image: type: string keyring: + default: /etc/ceph/keyring type: string monitors: items: @@ -3592,6 +3617,7 @@ spec: type: array x-kubernetes-list-type: atomic pool: + default: rbd type: string readOnly: type: boolean @@ -3603,6 +3629,7 @@ spec: type: object x-kubernetes-map-type: atomic user: + default: admin type: string required: - image @@ -3611,6 +3638,7 @@ spec: scaleIO: properties: fsType: + default: xfs type: string gateway: type: string @@ -3628,6 +3656,7 @@ spec: sslEnabled: type: boolean storageMode: + default: ThinProvisioned type: string storagePool: type: string diff --git a/installer/helm/chart/volcano/crd/bases/batch.volcano.sh_jobs.yaml b/installer/helm/chart/volcano/crd/bases/batch.volcano.sh_jobs.yaml index 07f9085c71..2c82e9526d 100644 --- a/installer/helm/chart/volcano/crd/bases/batch.volcano.sh_jobs.yaml +++ b/installer/helm/chart/volcano/crd/bases/batch.volcano.sh_jobs.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: jobs.batch.volcano.sh spec: group: batch.volcano.sh @@ -849,6 +849,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -955,6 +956,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1036,6 +1038,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -1153,6 +1157,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1554,6 +1559,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1660,6 +1666,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1741,6 +1748,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -1858,6 +1867,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2273,6 +2283,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2379,6 +2390,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2460,6 +2472,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -2577,6 +2591,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2741,13 +2756,10 @@ spec: properties: name: type: string - source: - properties: - resourceClaimName: - type: string - resourceClaimTemplateName: - type: string - type: object + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string required: - name type: object @@ -2823,6 +2835,8 @@ spec: type: integer type: array x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string sysctls: items: properties: @@ -2962,10 +2976,12 @@ spec: diskURI: type: string fsType: + default: ext4 type: string kind: type: string readOnly: + default: false type: boolean required: - diskName @@ -3342,6 +3358,13 @@ spec: required: - path type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object iscsi: properties: chapAuthDiscovery: @@ -3355,6 +3378,7 @@ spec: iqn: type: string iscsiInterface: + default: default type: string lun: format: int32 @@ -3603,6 +3627,7 @@ spec: image: type: string keyring: + default: /etc/ceph/keyring type: string monitors: items: @@ -3610,6 +3635,7 @@ spec: type: array x-kubernetes-list-type: atomic pool: + default: rbd type: string readOnly: type: boolean @@ -3621,6 +3647,7 @@ spec: type: object x-kubernetes-map-type: atomic user: + default: admin type: string required: - image @@ -3629,6 +3656,7 @@ spec: scaleIO: properties: fsType: + default: xfs type: string gateway: type: string @@ -3646,6 +3674,7 @@ spec: sslEnabled: type: boolean storageMode: + default: ThinProvisioned type: string storagePool: type: string diff --git a/installer/helm/chart/volcano/crd/bases/bus.volcano.sh_commands.yaml b/installer/helm/chart/volcano/crd/bases/bus.volcano.sh_commands.yaml index a488d3ba05..0bbe14cb1b 100644 --- a/installer/helm/chart/volcano/crd/bases/bus.volcano.sh_commands.yaml +++ b/installer/helm/chart/volcano/crd/bases/bus.volcano.sh_commands.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: commands.bus.volcano.sh spec: group: bus.volcano.sh diff --git a/installer/helm/chart/volcano/crd/bases/nodeinfo.volcano.sh_numatopologies.yaml b/installer/helm/chart/volcano/crd/bases/nodeinfo.volcano.sh_numatopologies.yaml index f26b7074b9..0261450e37 100644 --- a/installer/helm/chart/volcano/crd/bases/nodeinfo.volcano.sh_numatopologies.yaml +++ b/installer/helm/chart/volcano/crd/bases/nodeinfo.volcano.sh_numatopologies.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: numatopologies.nodeinfo.volcano.sh spec: group: nodeinfo.volcano.sh diff --git a/installer/helm/chart/volcano/crd/bases/scheduling.volcano.sh_podgroups.yaml b/installer/helm/chart/volcano/crd/bases/scheduling.volcano.sh_podgroups.yaml index 9245460609..0035d4e6b6 100644 --- a/installer/helm/chart/volcano/crd/bases/scheduling.volcano.sh_podgroups.yaml +++ b/installer/helm/chart/volcano/crd/bases/scheduling.volcano.sh_podgroups.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: podgroups.scheduling.volcano.sh spec: group: scheduling.volcano.sh diff --git a/installer/helm/chart/volcano/crd/bases/scheduling.volcano.sh_queues.yaml b/installer/helm/chart/volcano/crd/bases/scheduling.volcano.sh_queues.yaml index c2dee4b0a3..f6b75d185d 100644 --- a/installer/helm/chart/volcano/crd/bases/scheduling.volcano.sh_queues.yaml +++ b/installer/helm/chart/volcano/crd/bases/scheduling.volcano.sh_queues.yaml @@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: queues.scheduling.volcano.sh spec: group: scheduling.volcano.sh diff --git a/installer/volcano-development.yaml b/installer/volcano-development.yaml index 6ebe086dce..5af43dd68f 100644 --- a/installer/volcano-development.yaml +++ b/installer/volcano-development.yaml @@ -241,7 +241,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: jobs.batch.volcano.sh spec: group: batch.volcano.sh @@ -1088,6 +1088,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1194,6 +1195,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1275,6 +1277,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -1392,6 +1396,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1793,6 +1798,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1899,6 +1905,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -1980,6 +1987,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -2097,6 +2106,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2512,6 +2522,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2618,6 +2629,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2699,6 +2711,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -2816,6 +2830,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -2980,13 +2995,10 @@ spec: properties: name: type: string - source: - properties: - resourceClaimName: - type: string - resourceClaimTemplateName: - type: string - type: object + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string required: - name type: object @@ -3062,6 +3074,8 @@ spec: type: integer type: array x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string sysctls: items: properties: @@ -3201,10 +3215,12 @@ spec: diskURI: type: string fsType: + default: ext4 type: string kind: type: string readOnly: + default: false type: boolean required: - diskName @@ -3581,6 +3597,13 @@ spec: required: - path type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object iscsi: properties: chapAuthDiscovery: @@ -3594,6 +3617,7 @@ spec: iqn: type: string iscsiInterface: + default: default type: string lun: format: int32 @@ -3842,6 +3866,7 @@ spec: image: type: string keyring: + default: /etc/ceph/keyring type: string monitors: items: @@ -3849,6 +3874,7 @@ spec: type: array x-kubernetes-list-type: atomic pool: + default: rbd type: string readOnly: type: boolean @@ -3860,6 +3886,7 @@ spec: type: object x-kubernetes-map-type: atomic user: + default: admin type: string required: - image @@ -3868,6 +3895,7 @@ spec: scaleIO: properties: fsType: + default: xfs type: string gateway: type: string @@ -3885,6 +3913,7 @@ spec: sslEnabled: type: boolean storageMode: + default: ThinProvisioned type: string storagePool: type: string @@ -4153,7 +4182,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: commands.bus.volcano.sh spec: group: bus.volcano.sh @@ -4554,7 +4583,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: podgroups.scheduling.volcano.sh spec: group: scheduling.volcano.sh @@ -4716,7 +4745,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: queues.scheduling.volcano.sh spec: group: scheduling.volcano.sh @@ -4934,7 +4963,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: numatopologies.nodeinfo.volcano.sh spec: group: nodeinfo.volcano.sh @@ -5296,7 +5325,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: jobtemplates.flow.volcano.sh spec: group: flow.volcano.sh @@ -6125,6 +6154,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -6231,6 +6261,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -6312,6 +6343,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -6429,6 +6462,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -6830,6 +6864,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -6936,6 +6971,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -7017,6 +7053,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -7134,6 +7172,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -7549,6 +7588,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -7655,6 +7695,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -7736,6 +7777,8 @@ spec: properties: name: type: string + request: + type: string required: - name type: object @@ -7853,6 +7896,7 @@ spec: format: int32 type: integer service: + default: "" type: string required: - port @@ -8017,13 +8061,10 @@ spec: properties: name: type: string - source: - properties: - resourceClaimName: - type: string - resourceClaimTemplateName: - type: string - type: object + resourceClaimName: + type: string + resourceClaimTemplateName: + type: string required: - name type: object @@ -8099,6 +8140,8 @@ spec: type: integer type: array x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string sysctls: items: properties: @@ -8238,10 +8281,12 @@ spec: diskURI: type: string fsType: + default: ext4 type: string kind: type: string readOnly: + default: false type: boolean required: - diskName @@ -8618,6 +8663,13 @@ spec: required: - path type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object iscsi: properties: chapAuthDiscovery: @@ -8631,6 +8683,7 @@ spec: iqn: type: string iscsiInterface: + default: default type: string lun: format: int32 @@ -8879,6 +8932,7 @@ spec: image: type: string keyring: + default: /etc/ceph/keyring type: string monitors: items: @@ -8886,6 +8940,7 @@ spec: type: array x-kubernetes-list-type: atomic pool: + default: rbd type: string readOnly: type: boolean @@ -8897,6 +8952,7 @@ spec: type: object x-kubernetes-map-type: atomic user: + default: admin type: string required: - image @@ -8905,6 +8961,7 @@ spec: scaleIO: properties: fsType: + default: xfs type: string gateway: type: string @@ -8922,6 +8979,7 @@ spec: sslEnabled: type: boolean storageMode: + default: ThinProvisioned type: string storagePool: type: string @@ -9127,7 +9185,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.15.0 + controller-gen.kubebuilder.io/version: v0.16.4 name: jobflows.flow.volcano.sh spec: group: flow.volcano.sh diff --git a/licenses/github.com/antlr/antlr4/runtime/Go/antlr/v4/LICENSE b/licenses/github.com/antlr/antlr4/runtime/Go/antlr/v4/LICENSE deleted file mode 100644 index 52cf18e425..0000000000 --- a/licenses/github.com/antlr/antlr4/runtime/Go/antlr/v4/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright 2021 The ANTLR Project - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/github.com/antlr4-go/antlr/v4/LICENSE b/licenses/github.com/antlr4-go/antlr/v4/LICENSE new file mode 100644 index 0000000000..a22292eb5a --- /dev/null +++ b/licenses/github.com/antlr4-go/antlr/v4/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2012-2023 The ANTLR Project. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +3. Neither name of copyright holders nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/licenses/github.com/fxamacker/cbor/v2/LICENSE b/licenses/github.com/fxamacker/cbor/v2/LICENSE new file mode 100644 index 0000000000..eaa8504921 --- /dev/null +++ b/licenses/github.com/fxamacker/cbor/v2/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019-present Faye Amacker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/licenses/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE.txt b/licenses/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE similarity index 100% rename from licenses/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE.txt rename to licenses/github.com/grpc-ecosystem/grpc-gateway/v2/LICENSE diff --git a/licenses/github.com/opencontainers/runc/LICENSE b/licenses/github.com/opencontainers/runc/LICENSE new file mode 100644 index 0000000000..27448585ad --- /dev/null +++ b/licenses/github.com/opencontainers/runc/LICENSE @@ -0,0 +1,191 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2014 Docker, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/github.com/x448/float16/LICENSE b/licenses/github.com/x448/float16/LICENSE new file mode 100644 index 0000000000..bf6e357854 --- /dev/null +++ b/licenses/github.com/x448/float16/LICENSE @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2019 Montgomery Edwards⁴⁴⁸ and Faye Amacker + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/licenses/github.com/evanphx/json-patch/LICENSE b/licenses/gopkg.in/evanphx/json-patch.v4/LICENSE similarity index 100% rename from licenses/github.com/evanphx/json-patch/LICENSE rename to licenses/gopkg.in/evanphx/json-patch.v4/LICENSE diff --git a/licenses/sigs.k8s.io/yaml/LICENSE b/licenses/sigs.k8s.io/yaml/LICENSE index 7805d36de7..093d6d3edf 100644 --- a/licenses/sigs.k8s.io/yaml/LICENSE +++ b/licenses/sigs.k8s.io/yaml/LICENSE @@ -48,3 +48,259 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# The forked go-yaml.v3 library under this project is covered by two +different licenses (MIT and Apache): + +#### MIT License #### + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original MIT license, with the additional +copyright staring in 2011 when the project was ported over: + + apic.go emitterc.go parserc.go readerc.go scannerc.go + writerc.go yamlh.go yamlprivateh.go + +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### Apache License ### + +All the remaining project files are covered by the Apache license: + +Copyright (c) 2011-2019 Canonical Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +# The forked go-yaml.v2 library under the project is covered by an +Apache license: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/licenses/github.com/matttproud/golang_protobuf_extensions/LICENSE b/licenses/sigs.k8s.io/yaml/goyaml.v2/LICENSE similarity index 100% rename from licenses/github.com/matttproud/golang_protobuf_extensions/LICENSE rename to licenses/sigs.k8s.io/yaml/goyaml.v2/LICENSE diff --git a/licenses/sigs.k8s.io/yaml/goyaml.v3/LICENSE b/licenses/sigs.k8s.io/yaml/goyaml.v3/LICENSE new file mode 100644 index 0000000000..2683e4bb1f --- /dev/null +++ b/licenses/sigs.k8s.io/yaml/goyaml.v3/LICENSE @@ -0,0 +1,50 @@ + +This project is covered by two different licenses: MIT and Apache. + +#### MIT License #### + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original MIT license, with the additional +copyright staring in 2011 when the project was ported over: + + apic.go emitterc.go parserc.go readerc.go scannerc.go + writerc.go yamlh.go yamlprivateh.go + +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### Apache License ### + +All the remaining project files are covered by the Apache license: + +Copyright (c) 2011-2019 Canonical Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. From efc379c51031bf604d54579948302c1b4b6dfff2 Mon Sep 17 00:00:00 2001 From: vie-serendipity <2733147505@qq.com> Date: Fri, 18 Oct 2024 14:00:48 +0800 Subject: [PATCH 4/4] feat: update volumebinding codes with 1.31 k8s Signed-off-by: vie-serendipity <2733147505@qq.com> feat: add capacityCheckEnabled back Signed-off-by: vie-serendipity <2733147505@qq.com> feat: remove klog 1.0 Signed-off-by: vie-serendipity <2733147505@qq.com> --- go.mod | 1 - go.sum | 6 - .../capabilities/volumebinding/binder.go | 14 +- .../volumebinding/volume_binding.go | 156 +++++- .../volumebinding/volume_binding_test.go | 521 ++++++++++++++++++ 5 files changed, 680 insertions(+), 18 deletions(-) diff --git a/go.mod b/go.mod index 0649e5ebf7..79b9740b97 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,6 @@ require ( k8s.io/component-base v0.31.1 k8s.io/component-helpers v0.31.1 k8s.io/csi-translation-lib v0.31.1 - k8s.io/klog v1.0.0 k8s.io/klog/v2 v2.130.1 k8s.io/kubernetes v1.31.1 k8s.io/metrics v0.0.0 diff --git a/go.sum b/go.sum index fb1eeaf9e8..a141a0707d 100644 --- a/go.sum +++ b/go.sum @@ -50,12 +50,8 @@ github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -<<<<<<< HEAD -======= github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= ->>>>>>> ba15423f3 (feat: change gomod to adapt to k8s 1.31) github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -416,8 +412,6 @@ k8s.io/csi-translation-lib v0.31.1 h1:ps9kya8+ih0CVL59JO2B4AYH8U/e3WLQxl9sx19Njj k8s.io/csi-translation-lib v0.31.1/go.mod h1:VeYSucPZJbAt6RT25AzfG7WjyxCcmqxtr4V/CaDdNZc= k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 h1:NGrVE502P0s0/1hudf8zjgwki1X/TByhmAoILTarmzo= k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0/IM1Dj+82ZwjfxUP1IxaHE+8= -k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kms v0.31.1 h1:cGLyV3cIwb0ovpP/jtyIe2mEuQ/MkbhmeBF2IYCA9Io= diff --git a/pkg/scheduler/capabilities/volumebinding/binder.go b/pkg/scheduler/capabilities/volumebinding/binder.go index a52b899030..8a3d9871bf 100644 --- a/pkg/scheduler/capabilities/volumebinding/binder.go +++ b/pkg/scheduler/capabilities/volumebinding/binder.go @@ -28,6 +28,7 @@ import ( storagev1 "k8s.io/api/storage/v1" storagev1beta1 "k8s.io/api/storage/v1beta1" apierrors "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/util/sets" @@ -1012,12 +1013,9 @@ func (b *volumeBinder) revertAssumedPVCs(claims []*v1.PersistentVolumeClaim) { // hasEnoughCapacity checks whether the provisioner has enough capacity left for a new volume of the given size // that is available from the node. func (b *volumeBinder) hasEnoughCapacity(logger klog.Logger, provisioner string, claim *v1.PersistentVolumeClaim, storageClass *storagev1.StorageClass, node *v1.Node) (bool, error) { - // This is an optional feature. If disabled, we assume that - // there is enough storage. if !b.capacityCheckEnabled { return true, nil } - quantity, ok := claim.Spec.Resources.Requests[v1.ResourceStorage] if !ok { // No capacity to check for. @@ -1064,12 +1062,16 @@ func (b *volumeBinder) hasEnoughCapacity(logger klog.Logger, provisioner string, } func capacitySufficient(capacity *storagev1beta1.CSIStorageCapacity, sizeInBytes int64) bool { - limit := capacity.Capacity + limit := volumeLimit(capacity) + return limit != nil && limit.Value() >= sizeInBytes +} + +func volumeLimit(capacity *storagev1beta1.CSIStorageCapacity) *resource.Quantity { if capacity.MaximumVolumeSize != nil { // Prefer MaximumVolumeSize if available, it is more precise. - limit = capacity.MaximumVolumeSize + return capacity.MaximumVolumeSize } - return limit != nil && limit.Value() >= sizeInBytes + return capacity.Capacity } func (b *volumeBinder) nodeHasAccess(logger klog.Logger, node *v1.Node, capacity *storagev1beta1.CSIStorageCapacity) bool { diff --git a/pkg/scheduler/capabilities/volumebinding/volume_binding.go b/pkg/scheduler/capabilities/volumebinding/volume_binding.go index cc9b31cd22..d6975db4bf 100644 --- a/pkg/scheduler/capabilities/volumebinding/volume_binding.go +++ b/pkg/scheduler/capabilities/volumebinding/volume_binding.go @@ -24,6 +24,9 @@ import ( "time" v1 "k8s.io/api/core/v1" + storagev1 "k8s.io/api/storage/v1" + storagev1beta1 "k8s.io/api/storage/v1beta1" + apiequality "k8s.io/apimachinery/pkg/api/equality" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/runtime" corelisters "k8s.io/client-go/listers/core/v1" @@ -35,6 +38,7 @@ import ( "k8s.io/kubernetes/pkg/scheduler/framework/plugins/feature" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper" "k8s.io/kubernetes/pkg/scheduler/framework/plugins/names" + "k8s.io/kubernetes/pkg/scheduler/util" "volcano.sh/volcano/cmd/scheduler/app/options" ) @@ -98,14 +102,15 @@ func (pl *VolumeBinding) EventsToRegister(_ context.Context) ([]framework.Cluste // Pods may fail because of missing or mis-configured storage class // (e.g., allowedTopologies, volumeBindingMode), and hence may become // schedulable upon StorageClass Add or Update events. - {Event: framework.ClusterEvent{Resource: framework.StorageClass, ActionType: framework.Add | framework.Update}}, + {Event: framework.ClusterEvent{Resource: framework.StorageClass, ActionType: framework.Add | framework.Update}, QueueingHintFn: pl.isSchedulableAfterStorageClassChange}, + // We bind PVCs with PVs, so any changes may make the pods schedulable. - {Event: framework.ClusterEvent{Resource: framework.PersistentVolumeClaim, ActionType: framework.Add | framework.Update}}, + {Event: framework.ClusterEvent{Resource: framework.PersistentVolumeClaim, ActionType: framework.Add | framework.Update}, QueueingHintFn: pl.isSchedulableAfterPersistentVolumeClaimChange}, {Event: framework.ClusterEvent{Resource: framework.PersistentVolume, ActionType: framework.Add | framework.Update}}, + // Pods may fail to find available PVs because the node labels do not // match the storage class's allowed topologies or PV's node affinity. // A new or updated node may make pods schedulable. - {Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel}}, // // A note about UpdateNodeTaint event: // NodeAdd QueueingHint isn't always called because of the internal feature called preCheck. @@ -116,16 +121,157 @@ func (pl *VolumeBinding) EventsToRegister(_ context.Context) ([]framework.Cluste // We can remove UpdateNodeTaint when we remove the preCheck feature. // See: https://github.com/kubernetes/kubernetes/issues/110175 {Event: framework.ClusterEvent{Resource: framework.Node, ActionType: framework.Add | framework.UpdateNodeLabel | framework.UpdateNodeTaint}}, + // We rely on CSI node to translate in-tree PV to CSI. - {Event: framework.ClusterEvent{Resource: framework.CSINode, ActionType: framework.Add | framework.Update}}, + // TODO: kube-schduler will unregister the CSINode events once all the volume plugins has completed their CSI migration. + {Event: framework.ClusterEvent{Resource: framework.CSINode, ActionType: framework.Add | framework.Update}, QueueingHintFn: pl.isSchedulableAfterCSINodeChange}, + // When CSIStorageCapacity is enabled, pods may become schedulable // on CSI driver & storage capacity changes. {Event: framework.ClusterEvent{Resource: framework.CSIDriver, ActionType: framework.Add | framework.Update}}, - {Event: framework.ClusterEvent{Resource: framework.CSIStorageCapacity, ActionType: framework.Add | framework.Update}}, + {Event: framework.ClusterEvent{Resource: framework.CSIStorageCapacity, ActionType: framework.Add | framework.Update}, QueueingHintFn: pl.isSchedulableAfterCSIStorageCapacityChange}, } return events, nil } +func (pl *VolumeBinding) isSchedulableAfterCSINodeChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) { + if oldObj == nil { + logger.V(5).Info("CSINode creation could make the pod schedulable") + return framework.Queue, nil + } + oldCSINode, modifiedCSINode, err := util.As[*storagev1.CSINode](oldObj, newObj) + if err != nil { + return framework.Queue, err + } + + logger = klog.LoggerWithValues( + logger, + "Pod", klog.KObj(pod), + "CSINode", klog.KObj(modifiedCSINode), + ) + + if oldCSINode.ObjectMeta.Annotations[v1.MigratedPluginsAnnotationKey] != modifiedCSINode.ObjectMeta.Annotations[v1.MigratedPluginsAnnotationKey] { + logger.V(5).Info("CSINode's migrated plugins annotation is updated and that may make the pod schedulable") + return framework.Queue, nil + } + + logger.V(5).Info("CISNode was created or updated but it doesn't make this pod schedulable") + return framework.QueueSkip, nil +} + +func (pl *VolumeBinding) isSchedulableAfterPersistentVolumeClaimChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) { + _, newPVC, err := util.As[*v1.PersistentVolumeClaim](oldObj, newObj) + if err != nil { + return framework.Queue, err + } + + logger = klog.LoggerWithValues( + logger, + "Pod", klog.KObj(pod), + "PersistentVolumeClaim", klog.KObj(newPVC), + ) + + if pod.Namespace != newPVC.Namespace { + logger.V(5).Info("PersistentVolumeClaim was created or updated, but it doesn't make this pod schedulable because the PVC belongs to a different namespace") + return framework.QueueSkip, nil + } + + for _, vol := range pod.Spec.Volumes { + var pvcName string + switch { + case vol.PersistentVolumeClaim != nil: + pvcName = vol.PersistentVolumeClaim.ClaimName + case vol.Ephemeral != nil: + pvcName = ephemeral.VolumeClaimName(pod, &vol) + default: + continue + } + + if pvcName == newPVC.Name { + // Return Queue because, in this case, + // all PVC creations and almost all PVC updates could make the Pod schedulable. + logger.V(5).Info("PersistentVolumeClaim the pod requires was created or updated, potentially making the target Pod schedulable") + return framework.Queue, nil + } + } + + logger.V(5).Info("PersistentVolumeClaim was created or updated, but it doesn't make this pod schedulable") + return framework.QueueSkip, nil +} + +// isSchedulableAfterStorageClassChange checks whether an StorageClass event might make a Pod schedulable or not. +// Any StorageClass addition and a StorageClass update to allowedTopologies +// might make a Pod schedulable. +// Note that an update to volume binding mode is not allowed and we don't have to consider while examining the update event. +func (pl *VolumeBinding) isSchedulableAfterStorageClassChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) { + oldSC, newSC, err := util.As[*storagev1.StorageClass](oldObj, newObj) + if err != nil { + return framework.Queue, err + } + + logger = klog.LoggerWithValues( + logger, + "Pod", klog.KObj(pod), + "StorageClass", klog.KObj(newSC), + ) + + if oldSC == nil { + // No further filtering can be made for a creation event, + // and we just always return Queue. + logger.V(5).Info("A new StorageClass was created, which could make a Pod schedulable") + return framework.Queue, nil + } + + if !apiequality.Semantic.DeepEqual(newSC.AllowedTopologies, oldSC.AllowedTopologies) { + logger.V(5).Info("StorageClass got an update in AllowedTopologies", "AllowedTopologies", newSC.AllowedTopologies) + return framework.Queue, nil + } + + logger.V(5).Info("StorageClass was updated, but it doesn't make this pod schedulable") + return framework.QueueSkip, nil +} + +// isSchedulableAfterCSIStorageCapacityChange checks whether a CSIStorageCapacity event +// might make a Pod schedulable or not. +// Any CSIStorageCapacity addition and a CSIStorageCapacity update to volume limit +// (calculated based on capacity and maximumVolumeSize) might make a Pod schedulable. +// Note that an update to nodeTopology and storageClassName is not allowed and +// we don't have to consider while examining the update event. +func (pl *VolumeBinding) isSchedulableAfterCSIStorageCapacityChange(logger klog.Logger, pod *v1.Pod, oldObj, newObj interface{}) (framework.QueueingHint, error) { + oldCap, newCap, err := util.As[*storagev1beta1.CSIStorageCapacity](oldObj, newObj) + if err != nil { + return framework.Queue, err + } + + if oldCap == nil { + logger.V(5).Info( + "A new CSIStorageCapacity was created, which could make a Pod schedulable", + "Pod", klog.KObj(pod), + "CSIStorageCapacity", klog.KObj(newCap), + ) + return framework.Queue, nil + } + + oldLimit := volumeLimit(oldCap) + newLimit := volumeLimit(newCap) + + logger = klog.LoggerWithValues( + logger, + "Pod", klog.KObj(pod), + "CSIStorageCapacity", klog.KObj(newCap), + "volumeLimit(new)", newLimit, + "volumeLimit(old)", oldLimit, + ) + + if newLimit != nil && (oldLimit == nil || newLimit.Value() > oldLimit.Value()) { + logger.V(5).Info("VolumeLimit was increased, which could make a Pod schedulable") + return framework.Queue, nil + } + + logger.V(5).Info("CSIStorageCapacity was updated, but it doesn't make this pod schedulable") + return framework.QueueSkip, nil +} + // podHasPVCs returns 2 values: // - the first one to denote if the given "pod" has any PVC defined. // - the second one to return any error if the requested PVC is illegal. diff --git a/pkg/scheduler/capabilities/volumebinding/volume_binding_test.go b/pkg/scheduler/capabilities/volumebinding/volume_binding_test.go index c29dd7a2b7..b569fa08c1 100644 --- a/pkg/scheduler/capabilities/volumebinding/volume_binding_test.go +++ b/pkg/scheduler/capabilities/volumebinding/volume_binding_test.go @@ -25,6 +25,7 @@ import ( "github.com/stretchr/testify/assert" v1 "k8s.io/api/core/v1" storagev1 "k8s.io/api/storage/v1" + storagev1beta1 "k8s.io/api/storage/v1beta1" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/sets" @@ -895,3 +896,523 @@ func TestVolumeBinding(t *testing.T) { }) } } + +func TestIsSchedulableAfterCSINodeChange(t *testing.T) { + table := []struct { + name string + oldObj interface{} + newObj interface{} + err bool + expect framework.QueueingHint + }{ + { + name: "unexpected objects are passed", + oldObj: new(struct{}), + newObj: new(struct{}), + err: true, + expect: framework.Queue, + }, + { + name: "CSINode is newly created", + newObj: &storagev1.CSINode{ + ObjectMeta: metav1.ObjectMeta{ + Name: "csinode-a", + }, + }, + oldObj: nil, + err: false, + expect: framework.Queue, + }, + { + name: "CSINode's migrated-plugins annotations is added", + oldObj: &storagev1.CSINode{ + ObjectMeta: metav1.ObjectMeta{ + Name: "csinode-a", + Annotations: map[string]string{ + v1.MigratedPluginsAnnotationKey: "test1", + }, + }, + }, + newObj: &storagev1.CSINode{ + ObjectMeta: metav1.ObjectMeta{ + Name: "csinode-a", + Annotations: map[string]string{ + v1.MigratedPluginsAnnotationKey: "test1, test2", + }, + }, + }, + err: false, + expect: framework.Queue, + }, + { + name: "CSINode's migrated-plugins annotation is updated", + oldObj: &storagev1.CSINode{ + ObjectMeta: metav1.ObjectMeta{ + Name: "csinode-a", + Annotations: map[string]string{ + v1.MigratedPluginsAnnotationKey: "test1", + }, + }, + }, + newObj: &storagev1.CSINode{ + ObjectMeta: metav1.ObjectMeta{ + Name: "csinode-a", + Annotations: map[string]string{ + v1.MigratedPluginsAnnotationKey: "test2", + }, + }, + }, + err: false, + expect: framework.Queue, + }, + { + name: "CSINode is updated but migrated-plugins annotation gets unchanged", + oldObj: &storagev1.CSINode{ + ObjectMeta: metav1.ObjectMeta{ + Name: "csinode-a", + Annotations: map[string]string{ + v1.MigratedPluginsAnnotationKey: "test1", + }, + }, + }, + newObj: &storagev1.CSINode{ + ObjectMeta: metav1.ObjectMeta{ + Name: "csinode-a", + Annotations: map[string]string{ + v1.MigratedPluginsAnnotationKey: "test1", + }, + }, + }, + err: false, + expect: framework.QueueSkip, + }, + } + for _, item := range table { + t.Run(item.name, func(t *testing.T) { + pl := &VolumeBinding{} + pod := makePod("pod-a").Pod + logger, _ := ktesting.NewTestContext(t) + qhint, err := pl.isSchedulableAfterCSINodeChange(logger, pod, item.oldObj, item.newObj) + if (err != nil) != item.err { + t.Errorf("isSchedulableAfterCSINodeChange failed - got: %q", err) + } + if qhint != item.expect { + t.Errorf("QHint does not match: %v, want: %v", qhint, item.expect) + } + }) + } +} + +func TestIsSchedulableAfterPersistentVolumeClaimChange(t *testing.T) { + table := []struct { + name string + pod *v1.Pod + oldPVC interface{} + newPVC interface{} + wantErr bool + expect framework.QueueingHint + }{ + { + name: "pod has no pvc or ephemeral volumes", + pod: makePod("pod-a").withEmptyDirVolume().Pod, + oldPVC: makePVC("pvc-b", "sc-a").PersistentVolumeClaim, + newPVC: makePVC("pvc-b", "sc-a").PersistentVolumeClaim, + wantErr: false, + expect: framework.QueueSkip, + }, + { + name: "pvc with the same name as the one used by the pod in a different namespace is modified", + pod: makePod("pod-a"). + withNamespace("ns-a"). + withPVCVolume("pvc-a", ""). + withPVCVolume("pvc-b", ""). + Pod, + oldPVC: nil, + newPVC: makePVC("pvc-b", "").PersistentVolumeClaim, + wantErr: false, + expect: framework.QueueSkip, + }, + { + name: "pod has no pvc that is being modified", + pod: makePod("pod-a"). + withPVCVolume("pvc-a", ""). + withPVCVolume("pvc-c", ""). + Pod, + oldPVC: makePVC("pvc-b", "").PersistentVolumeClaim, + newPVC: makePVC("pvc-b", "").PersistentVolumeClaim, + wantErr: false, + expect: framework.QueueSkip, + }, + { + name: "pod has no generic ephemeral volume that is being modified", + pod: makePod("pod-a"). + withGenericEphemeralVolume("ephemeral-a"). + withGenericEphemeralVolume("ephemeral-c"). + Pod, + oldPVC: makePVC("pod-a-ephemeral-b", "").PersistentVolumeClaim, + newPVC: makePVC("pod-a-ephemeral-b", "").PersistentVolumeClaim, + wantErr: false, + expect: framework.QueueSkip, + }, + { + name: "pod has the pvc that is being modified", + pod: makePod("pod-a"). + withPVCVolume("pvc-a", ""). + withPVCVolume("pvc-b", ""). + Pod, + oldPVC: makePVC("pvc-b", "").PersistentVolumeClaim, + newPVC: makePVC("pvc-b", "").PersistentVolumeClaim, + wantErr: false, + expect: framework.Queue, + }, + { + name: "pod has the generic ephemeral volume that is being modified", + pod: makePod("pod-a"). + withGenericEphemeralVolume("ephemeral-a"). + withGenericEphemeralVolume("ephemeral-b"). + Pod, + oldPVC: makePVC("pod-a-ephemeral-b", "").PersistentVolumeClaim, + newPVC: makePVC("pod-a-ephemeral-b", "").PersistentVolumeClaim, + wantErr: false, + expect: framework.Queue, + }, + { + name: "type conversion error", + oldPVC: new(struct{}), + newPVC: new(struct{}), + wantErr: true, + expect: framework.Queue, + }, + } + + for _, item := range table { + t.Run(item.name, func(t *testing.T) { + pl := &VolumeBinding{} + logger, _ := ktesting.NewTestContext(t) + qhint, err := pl.isSchedulableAfterPersistentVolumeClaimChange(logger, item.pod, item.oldPVC, item.newPVC) + if (err != nil) != item.wantErr { + t.Errorf("isSchedulableAfterPersistentVolumeClaimChange failed - got: %q", err) + } + if qhint != item.expect { + t.Errorf("QHint does not match: %v, want: %v", qhint, item.expect) + } + }) + } +} + +func TestIsSchedulableAfterStorageClassChange(t *testing.T) { + table := []struct { + name string + pod *v1.Pod + oldSC interface{} + newSC interface{} + pvcLister tf.PersistentVolumeClaimLister + err bool + expect framework.QueueingHint + }{ + { + name: "When a new StorageClass is created, it returns Queue", + pod: makePod("pod-a").Pod, + oldSC: nil, + newSC: &storagev1.StorageClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: "sc-a", + }, + }, + err: false, + expect: framework.Queue, + }, + { + name: "When the AllowedTopologies are changed, it returns Queue", + pod: makePod("pod-a").Pod, + oldSC: &storagev1.StorageClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: "sc-a", + }, + }, + newSC: &storagev1.StorageClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: "sc-a", + }, + AllowedTopologies: []v1.TopologySelectorTerm{ + { + MatchLabelExpressions: []v1.TopologySelectorLabelRequirement{ + { + Key: "kubernetes.io/hostname", + Values: []string{"node-a"}, + }, + }, + }, + }, + }, + err: false, + expect: framework.Queue, + }, + { + name: "When there are no changes to the StorageClass, it returns QueueSkip", + pod: makePod("pod-a").Pod, + oldSC: &storagev1.StorageClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: "sc-a", + }, + }, + newSC: &storagev1.StorageClass{ + ObjectMeta: metav1.ObjectMeta{ + Name: "sc-a", + }, + }, + err: false, + expect: framework.QueueSkip, + }, + { + name: "type conversion error", + oldSC: new(struct{}), + newSC: new(struct{}), + err: true, + expect: framework.Queue, + }, + } + + for _, item := range table { + t.Run(item.name, func(t *testing.T) { + pl := &VolumeBinding{PVCLister: item.pvcLister} + logger, _ := ktesting.NewTestContext(t) + qhint, err := pl.isSchedulableAfterStorageClassChange(logger, item.pod, item.oldSC, item.newSC) + if (err != nil) != item.err { + t.Errorf("isSchedulableAfterStorageClassChange failed - got: %q", err) + } + if qhint != item.expect { + t.Errorf("QHint does not match: %v, want: %v", qhint, item.expect) + } + }) + } +} + +func TestIsSchedulableAfterCSIStorageCapacityChange(t *testing.T) { + table := []struct { + name string + pod *v1.Pod + oldCap interface{} + newCap interface{} + wantErr bool + expect framework.QueueingHint + }{ + { + name: "When a new CSIStorageCapacity is created, it returns Queue", + pod: makePod("pod-a").Pod, + oldCap: nil, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + }, + wantErr: false, + expect: framework.Queue, + }, + { + name: "When the volume limit is increase(Capacity set), it returns Queue", + pod: makePod("pod-a").Pod, + oldCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + }, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + }, + wantErr: false, + expect: framework.Queue, + }, + { + name: "When the volume limit is increase(MaximumVolumeSize set), it returns Queue", + pod: makePod("pod-a").Pod, + oldCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + }, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + MaximumVolumeSize: resource.NewQuantity(100, resource.DecimalSI), + }, + wantErr: false, + expect: framework.Queue, + }, + { + name: "When the volume limit is increase(Capacity increase), it returns Queue", + pod: makePod("pod-a").Pod, + oldCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(50, resource.DecimalSI), + }, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + }, + wantErr: false, + expect: framework.Queue, + }, + { + name: "When the volume limit is increase(MaximumVolumeSize unset), it returns Queue", + pod: makePod("pod-a").Pod, + oldCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + MaximumVolumeSize: resource.NewQuantity(50, resource.DecimalSI), + }, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + }, + wantErr: false, + expect: framework.Queue, + }, + { + name: "When the volume limit is increase(MaximumVolumeSize increase), it returns Queue", + pod: makePod("pod-a").Pod, + oldCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + MaximumVolumeSize: resource.NewQuantity(50, resource.DecimalSI), + }, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + MaximumVolumeSize: resource.NewQuantity(60, resource.DecimalSI), + }, + wantErr: false, + expect: framework.Queue, + }, + { + name: "When there are no changes to the CSIStorageCapacity, it returns QueueSkip", + pod: makePod("pod-a").Pod, + oldCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + MaximumVolumeSize: resource.NewQuantity(50, resource.DecimalSI), + }, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + MaximumVolumeSize: resource.NewQuantity(50, resource.DecimalSI), + }, + wantErr: false, + expect: framework.QueueSkip, + }, + { + name: "When the volume limit is equal(Capacity), it returns QueueSkip", + pod: makePod("pod-a").Pod, + oldCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + }, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + }, + wantErr: false, + expect: framework.QueueSkip, + }, + { + name: "When the volume limit is equal(MaximumVolumeSize unset), it returns QueueSkip", + pod: makePod("pod-a").Pod, + oldCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + MaximumVolumeSize: resource.NewQuantity(50, resource.DecimalSI), + }, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(50, resource.DecimalSI), + }, + wantErr: false, + expect: framework.QueueSkip, + }, + { + name: "When the volume limit is decrease(Capacity), it returns QueueSkip", + pod: makePod("pod-a").Pod, + oldCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(100, resource.DecimalSI), + }, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + Capacity: resource.NewQuantity(90, resource.DecimalSI), + }, + wantErr: false, + expect: framework.QueueSkip, + }, + { + name: "When the volume limit is decrease(MaximumVolumeSize), it returns QueueSkip", + pod: makePod("pod-a").Pod, + oldCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + MaximumVolumeSize: resource.NewQuantity(100, resource.DecimalSI), + }, + newCap: &storagev1beta1.CSIStorageCapacity{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cap-a", + }, + MaximumVolumeSize: resource.NewQuantity(90, resource.DecimalSI), + }, + wantErr: false, + expect: framework.QueueSkip, + }, + { + name: "type conversion error", + oldCap: new(struct{}), + newCap: new(struct{}), + wantErr: true, + expect: framework.Queue, + }, + } + + for _, item := range table { + t.Run(item.name, func(t *testing.T) { + pl := &VolumeBinding{} + logger, _ := ktesting.NewTestContext(t) + qhint, err := pl.isSchedulableAfterCSIStorageCapacityChange(logger, item.pod, item.oldCap, item.newCap) + if (err != nil) != item.wantErr { + t.Errorf("error is unexpectedly returned or not returned from isSchedulableAfterCSIStorageCapacityChange. wantErr: %v actual error: %q", item.wantErr, err) + } + if qhint != item.expect { + t.Errorf("QHint does not match: %v, want: %v", qhint, item.expect) + } + }) + } +}