Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PredictKube scaler #2418

Merged
merged 30 commits into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
efd1913
Add PredictKube scaler
daniel-yavorovich Jan 10, 2022
98a2f5c
add auth logic for prometheus and predictkube scalers
alex60217101990 Jan 11, 2022
db228cd
add comments for auth logic
alex60217101990 Jan 12, 2022
a0f80d7
return pre-commit-config
alex60217101990 Jan 12, 2022
4b1334b
fix prometheus_scaler.go
alex60217101990 Jan 12, 2022
360fb6e
fix prometheus_scaler.go
alex60217101990 Jan 12, 2022
f86d99d
fix prometheus_scaler.go
alex60217101990 Jan 12, 2022
eae6c6f
add working e2e test for predictkube scaler
alex60217101990 Jan 13, 2022
50c49ca
Merge pull request #5 from dysnix/predictkube-scaler-prometheus-auth
daniel-yavorovich Jan 17, 2022
681e2d1
Merge pull request #6 from kedacore/main
daniel-yavorovich Jan 17, 2022
dad3bfc
Merge branch 'predictkube-scaler' into main
daniel-yavorovich Jan 17, 2022
4e0bb8d
Merge pull request #7 from dysnix/main
daniel-yavorovich Jan 17, 2022
68c2245
remove metricName field from metadata and add generation enums to Mak…
alex60217101990 Jan 25, 2022
3858893
revert old data
alex60217101990 Jan 25, 2022
37d29b8
Merge remote-tracking branch 'upstream/main' into main
alex60217101990 Jan 25, 2022
5c3c539
Merge branch 'main' into fix-pr-comments
alex60217101990 Jan 25, 2022
ab64321
Merge pull request #8 from dysnix/fix-pr-comments
daniel-yavorovich Jan 25, 2022
d096db8
fix TestPredictKubeParseMetadata
alex60217101990 Jan 25, 2022
f75d259
Merge pull request #9 from dysnix/fix-pr-comments
daniel-yavorovich Jan 25, 2022
65c4b11
fix TestPredictKubeGetMetricSpecForScaling
alex60217101990 Jan 25, 2022
078c4ed
Merge pull request #10 from dysnix/fix-pr-comments
daniel-yavorovich Jan 25, 2022
01521ca
remove generation enums with enums-go
alex60217101990 Jan 25, 2022
8ba8d7c
remove generation enums with enums-go
alex60217101990 Jan 25, 2022
3be6c50
Merge pull request #11 from dysnix/fix-pr-comments
daniel-yavorovich Jan 25, 2022
475cbe0
resolve go.mod, go.sum
alex60217101990 Jan 26, 2022
b46bbbf
Merge branch 'main' into predictkube-scaler
alex60217101990 Jan 26, 2022
7d69136
resolve go.mod, go.sum
alex60217101990 Jan 26, 2022
310121b
fix go.mongodb.org/mongo-driver version
alex60217101990 Jan 26, 2022
fca9ef3
fix go.mongodb.org/mongo-driver version
alex60217101990 Jan 26, 2022
9e0c960
add comment to method
alex60217101990 Jan 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- Add New Relic Scaler ([#2387](https://github.com/kedacore/keda/pull/2387))
- Add ActiveMQ Scaler ([#2305](https://github.com/kedacore/keda/pull/2305))
- Add New Datadog Scaler ([#2354](https://github.com/kedacore/keda/pull/2354))
- Add PredictKube Scaler ([#2418](https://github.com/kedacore/keda/pull/2418))

### Improvements

Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,20 @@ e2e-test-local: ## Run e2e tests against Kubernetes cluster configured in ~/.kub

##@ Development

install-go-enum:
$(GOROOT)/bin/go get github.com/searKing/golang/tools/cmd/go-enum

enums-gen: install-go-enum
$(GOROOT)/bin/go generate ./...

manifests: controller-gen ## Generate ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) crd:crdVersions=v1 rbac:roleName=keda-operator paths="./..." output:crd:artifacts:config=config/crd/bases
# withTriggers is only used for duck typing so we only need the deepcopy methods
# However operator-sdk generate doesn't appear to have an option for that
# until this issue is fixed: https://github.com/kubernetes-sigs/controller-tools/issues/398
rm config/crd/bases/keda.sh_withtriggers.yaml

generate: controller-gen mockgen-gen ## Generate code containing DeepCopy, DeepCopyInto, DeepCopyObject method implementations (API) and mocks.
generate: controller-gen mockgen-gen enums-gen ## Generate code containing DeepCopy, DeepCopyInto, DeepCopyObject method implementations (API) and mocks.
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."

adapter/generated/openapi/zz_generated.openapi.go: go.mod go.sum ## Generate OpenAPI for KEDA Metrics Adapter.
Expand Down
34 changes: 26 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ require (
github.com/Azure/azure-storage-queue-go v0.0.0-20191125232315-636801874cdd
github.com/Azure/go-autorest/autorest v0.11.22
github.com/Azure/go-autorest/autorest/azure/auth v0.5.9
github.com/DataDog/datadog-api-client-go v1.6.0 // indirect
github.com/DataDog/datadog-api-client-go v1.8.0
github.com/Huawei/gophercloud v1.0.21
github.com/Shopify/sarama v1.30.0
github.com/aws/aws-sdk-go v1.42.16
github.com/denisenkom/go-mssqldb v0.11.0
github.com/dysnix/predictkube-libs v0.0.0-20220110175435-6a14c5918e22
github.com/dysnix/predictkube-proto v0.0.0-20211223141524-d309509b6b5f
github.com/elastic/go-elasticsearch/v7 v7.15.1
github.com/go-logr/logr v0.4.0
github.com/go-playground/assert/v2 v2.0.1
github.com/go-playground/validator/v10 v10.9.0
github.com/go-redis/redis/v8 v8.11.4
github.com/go-sql-driver/mysql v1.6.0
github.com/gocql/gocql v0.0.0-20211015133455-b225f9b53fa1
Expand All @@ -32,16 +35,20 @@ require (
github.com/influxdata/influxdb-client-go/v2 v2.6.0
github.com/lib/pq v1.10.4
github.com/mitchellh/hashstructure v1.1.0
github.com/newrelic/newrelic-client-go v0.68.3
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.17.0
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/common v0.32.1
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
github.com/robfig/cron/v3 v3.0.1
github.com/streadway/amqp v1.0.0
github.com/stretchr/testify v1.7.0
github.com/tidwall/gjson v1.12.1
github.com/xdg/scram v1.0.3
github.com/xhit/go-str2duration/v2 v2.0.0
go.mongodb.org/mongo-driver v1.8.0
google.golang.org/api v0.60.0
google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1
Expand Down Expand Up @@ -78,6 +85,7 @@ require (
github.com/NYTimes/gziphandler v1.1.1 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/andybalholm/brotli v1.0.3 // indirect
github.com/armon/go-metrics v0.3.9 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand All @@ -103,16 +111,17 @@ require (
github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/fatih/color v1.9.0 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-logr/zapr v0.4.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
Expand All @@ -122,6 +131,7 @@ require (
github.com/google/uuid v1.3.0 // indirect
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
Expand Down Expand Up @@ -155,35 +165,43 @@ require (
github.com/jpillora/backoff v1.0.0 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/klauspost/compress v1.13.6 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-ieproxy v0.0.1 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.0 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/mitchellh/reflectwalk v1.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/newrelic/newrelic-client-go v0.68.3 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/searKing/golang v1.0.145 // indirect
github.com/searKing/golang/tools/cmd/go-enum v0.0.0-20210618061541-6f9001ab7f06 // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cobra v1.1.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 // indirect
github.com/ulikunitz/unixtime v0.1.2 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.31.0 // indirect
github.com/wagslane/go-password-validator v0.3.0 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.0.2 // indirect
github.com/xdg-go/stringprep v1.0.2 // indirect
Expand All @@ -209,7 +227,7 @@ require (
go.uber.org/zap v1.19.1 // indirect
golang.org/x/crypto v0.0.0-20211115234514-b4de73f9ece8 // indirect
golang.org/x/mod v0.4.2 // indirect
golang.org/x/net v0.0.0-20211101193420-4a448f8816b3 // indirect
golang.org/x/net v0.0.0-20211104170005-ce137452f963 // indirect
golang.org/x/oauth2 v0.0.0-20211028175245-ba495a64dcb5 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c // indirect
Expand Down
Loading