Skip to content

Commit

Permalink
feat: update keda to support autoscaling/v2 (#6413)
Browse files Browse the repository at this point in the history
* feat: update keda

* feat: add license

* feat: add license

* feat: sort imports

* polish: go package imports

* feat: go imports

* feat: pass test coverage

* feat: add test file

* feat: update go mod

* feat: pass test cover

* feat: use controller-runtime instead of http

* fix: handle err

* feat: sort imports

* polish: merge go mod

* polish: avoiding scaledObj nil pointer exception

* feat: tab go mod
  • Loading branch information
CeerDecy authored Aug 23, 2024
1 parent 7d0ae78 commit b115484
Show file tree
Hide file tree
Showing 16 changed files with 318 additions and 2,245 deletions.
117 changes: 60 additions & 57 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/antonmedv/expr v1.9.0
github.com/apache/thrift v0.16.0
github.com/appscode/go v0.0.0-20191119085241-0887d8ec2ecc
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/bluele/gcache v0.0.2
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869
github.com/bugaolengdeyuxiaoer/go-ansiterm v0.0.0-20211110022506-7e621b9b6908
Expand All @@ -39,7 +39,7 @@ require (
github.com/caarlos0/env v0.0.0-20180521112546-3e0f30cbf50b
github.com/cespare/xxhash v1.1.0
github.com/cespare/xxhash/v2 v2.3.0
github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/dlclark/regexp2 v1.4.0
github.com/docker/docker v25.0.3+incompatible
github.com/docker/spdystream v0.2.0
Expand All @@ -52,26 +52,26 @@ require (
github.com/erda-project/erda-oap-thirdparty-protocol v0.0.0-20210907135609-15886a136d5b
github.com/erda-project/erda-proto-go v1.4.0
github.com/erda-project/erda-sourcecov v0.1.0
github.com/fatih/color v1.13.0
github.com/fatih/color v1.16.0
github.com/fntlnz/mountinfo v0.0.0-20171106231217-40cb42681fad
github.com/fsnotify/fsnotify v1.7.0
github.com/getkin/kin-openapi v0.76.0
github.com/gin-gonic/gin v1.7.0
github.com/go-echarts/go-echarts/v2 v2.2.4
github.com/go-errors/errors v1.4.2
github.com/go-errors/errors v1.5.1
github.com/go-openapi/loads v0.19.4
github.com/go-openapi/spec v0.19.8
github.com/go-openapi/strfmt v0.19.5
github.com/go-playground/validator v9.31.0+incompatible
github.com/go-redis/redis v6.15.9+incompatible
github.com/go-sql-driver/mysql v1.7.0
github.com/go-sql-driver/mysql v1.8.1
github.com/gobwas/glob v0.2.3
github.com/gocql/gocql v0.0.0-20210707082121-9a3953d1826d
github.com/gocql/gocql v1.6.0
github.com/gofrs/flock v0.8.1
github.com/gofrs/uuid v4.4.0+incompatible
github.com/gogap/errors v0.0.0-20200228125012-531a6449b28c
github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3
github.com/golang-jwt/jwt v3.2.1+incompatible
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/mock v1.6.0
github.com/golang/snappy v0.0.4
github.com/google/go-cmp v0.6.0
Expand Down Expand Up @@ -111,10 +111,10 @@ require (
github.com/pelletier/go-toml v1.9.5
github.com/pingcap/parser v0.0.0-20201022083903-fbe80b0c40bb
github.com/pingcap/tidb v1.1.0-beta.0.20200921100526-29e8c0913100
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.19.0
github.com/prometheus/common v0.52.2
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/common v0.55.0
github.com/prometheus/prometheus v2.3.2+incompatible
github.com/pyroscope-io/pyroscope v0.37.2
github.com/rakyll/statik v0.1.7
Expand All @@ -138,8 +138,8 @@ require (
github.com/shogo82148/androidbinary v1.0.2
github.com/shopspring/decimal v1.3.1
github.com/sirupsen/logrus v1.9.3
github.com/spf13/afero v1.10.0
github.com/spf13/cast v1.5.0
github.com/spf13/afero v1.11.0
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
github.com/spotify/flink-on-k8s-operator v0.5.1-alpha.3
github.com/stretchr/testify v1.9.0
Expand All @@ -151,24 +151,24 @@ require (
github.com/xormplus/builder v0.0.0-20181220055446-b12ceebee76f
github.com/xormplus/core v0.0.0-20181016121923-6bfce2eb8867
github.com/xormplus/xorm v0.0.0-20181212020813-da46657160ff
go.etcd.io/etcd/api/v3 v3.5.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/client/v3 v3.5.14
go.opentelemetry.io/otel v1.27.0
go.etcd.io/etcd/api/v3 v3.5.15
go.etcd.io/etcd/client/pkg/v3 v3.5.15
go.etcd.io/etcd/client/v3 v3.5.15
go.opentelemetry.io/otel v1.28.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0
go.opentelemetry.io/otel/sdk v1.27.0
go.opentelemetry.io/otel/trace v1.27.0
go.opentelemetry.io/proto/otlp v1.2.0
go.uber.org/automaxprocs v1.5.1
go.opentelemetry.io/otel/sdk v1.28.0
go.opentelemetry.io/otel/trace v1.28.0
go.opentelemetry.io/proto/otlp v1.3.1
go.uber.org/automaxprocs v1.5.3
go.uber.org/ratelimit v0.2.0
golang.org/x/net v0.25.0
golang.org/x/sync v0.7.0
golang.org/x/text v0.15.0
golang.org/x/net v0.27.0
golang.org/x/sync v0.8.0
golang.org/x/text v0.16.0
golang.org/x/time v0.5.0
google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5
google.golang.org/grpc v1.64.0
google.golang.org/genproto v0.0.0-20240730163845-b1a4ccb954bf // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240725223205-93522f1f2a9f
google.golang.org/grpc v1.65.0
google.golang.org/protobuf v1.34.2
gopkg.in/Knetic/govaluate.v3 v3.0.0
gopkg.in/flosch/pongo2.v3 v3.0.0-20141028000813-5e81b817a0c4
Expand All @@ -189,9 +189,9 @@ require (
istio.io/client-go v0.0.0-20201005161859-d8818315d678
k8s.io/api v0.30.2
k8s.io/apiextensions-apiserver v0.30.0
k8s.io/apimachinery v0.30.2
k8s.io/apimachinery v0.31.0-beta.0
k8s.io/apiserver v0.30.2
k8s.io/autoscaler/vertical-pod-autoscaler v1.1.2
k8s.io/autoscaler/vertical-pod-autoscaler v1.2.0
k8s.io/client-go v12.0.0+incompatible
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.120.1
Expand All @@ -200,7 +200,7 @@ require (
k8s.io/kubernetes v1.29.3
k8s.io/utils v0.0.0-20240310230437-4693a0247e57
modernc.org/mathutil v1.6.0
sigs.k8s.io/controller-runtime v0.17.2
sigs.k8s.io/controller-runtime v0.17.5
sigs.k8s.io/sig-storage-lib-external-provisioner/v6 v6.3.0
sigs.k8s.io/yaml v1.4.0
xorm.io/builder v0.3.11-0.20220531020008-1bd24a7dc978
Expand All @@ -214,7 +214,7 @@ require (
github.com/ClickHouse/ch-go v0.61.3 // indirect
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect
github.com/CloudyKit/jet v2.1.2+incompatible // indirect
github.com/DataDog/zstd v1.4.1 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
Expand Down Expand Up @@ -295,7 +295,7 @@ require (
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
Expand All @@ -304,9 +304,9 @@ require (
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.22.0 // indirect
github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogap/stack v0.0.0-20150131034635-fef68dddd4f8 // indirect
Expand All @@ -327,7 +327,7 @@ require (
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 // indirect
github.com/huandu/xstrings v1.4.0 // indirect
Expand All @@ -353,7 +353,7 @@ require (
github.com/kr/text v0.2.0 // indirect
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/lestrrat/go-envload v0.0.0-20180220120943-6ed08b54a570 // indirect
github.com/lestrrat/go-strftime v0.0.0-20180220042222-ba3bf9c1d042 // indirect
github.com/lib/pq v1.10.9 // indirect
Expand Down Expand Up @@ -388,10 +388,10 @@ require (
github.com/pingcap/kvproto v0.0.0-20200818080353-7aaed8998596 // indirect
github.com/pingcap/log v0.0.0-20200828042413-fce0951f1463 // indirect
github.com/pingcap/tipb v0.0.0-20200618092958-4fad48b4c8c3 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/pyroscope-io/jfr-parser v0.6.0 // indirect
github.com/rancher/lasso v0.0.0-20240603075835-701e919d08b7 // indirect
github.com/rancher/norman v0.0.0-20240503193601-9f5f6586bb5b // indirect
Expand All @@ -407,17 +407,14 @@ require (
github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect
github.com/scylladb/go-reflectx v1.0.1 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/segmentio/kafka-go v0.4.31 // indirect
github.com/segmentio/kafka-go v0.4.47 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/shabbyrobe/xmlwriter v0.0.0-20200208144257-9fca06d00ffa // indirect
github.com/shoenig/go-m1cpu v0.1.6 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20190625010220-02440ea7a285 // indirect
github.com/tealeg/xlsx v1.0.5 // indirect
github.com/tebeka/strftime v0.1.5 // indirect
github.com/tidwall/gjson v1.14.1 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tikv/pd v1.1.0-beta.0.20200907080620-6830f5bb92a2 // indirect
github.com/tjfoc/gmsm v1.3.2 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
Expand All @@ -427,7 +424,7 @@ require (
github.com/ugorji/go/codec v1.1.7 // indirect
github.com/ulikunitz/xz v0.5.10 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.6.0 // indirect
github.com/valyala/fasthttp v1.51.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
Expand All @@ -438,28 +435,28 @@ require (
go.elastic.co/apm/v2 v2.1.0 // indirect
go.elastic.co/fastjson v1.1.0 // indirect
go.etcd.io/etcd v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738 // indirect
go.mongodb.org/mongo-driver v1.11.4 // indirect
go.mongodb.org/mongo-driver v1.16.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.50.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.starlark.net v0.0.0-20231121155337-90ade8b19d09 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/arch v0.0.0-20190312162104-788fe5ffcd8c // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/oauth2 v0.20.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/tools v0.20.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/tools v0.23.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240730163845-b1a4ccb954bf // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand All @@ -474,9 +471,15 @@ require (
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 // indirect
sigs.k8s.io/cli-utils v0.35.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/kustomize/api v0.17.3 // indirect
sigs.k8s.io/kustomize/kyaml v0.17.2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/expr-lang/expr v1.16.9 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/kedacore/keda/v2 v2.15.1
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
knative.dev/pkg v0.0.0-20240805063731-c88d5dad9653 // indirect
)

replace (
Expand Down
Loading

0 comments on commit b115484

Please sign in to comment.