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

Create scaling objects instead of hpa #1116

Merged
merged 31 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
eed35a3
Create ScaledObjects instead of HPAs
Richard87 May 10, 2024
44a08ad
fix dependencies
Richard87 May 10, 2024
3d9835d
Merge branch 'refs/heads/master' into create-scaling-objects-instead-…
Richard87 May 10, 2024
9697649
update mocks and test infrastructure with new kedaClient
Richard87 May 10, 2024
32f59c2
fail tests instead of panicks
Richard87 May 10, 2024
27f6959
change test to verify ScaledObjects instead of HPAs
Richard87 May 10, 2024
90b9738
remove legacy code
Richard87 May 10, 2024
7237aa7
revert gomod change
Richard87 May 10, 2024
5fe72a4
fix bugi n makefile
Richard87 May 10, 2024
4aa7659
move kedaclient to kubeutil
Richard87 May 10, 2024
ba8c465
refactor validation, add more details to tests, configure default min…
Richard87 May 13, 2024
b9275a5
refactor validation, add more details to tests, configure default min…
Richard87 May 13, 2024
2099cd9
cleanup naming
Richard87 May 13, 2024
75f4c27
retain keda label
Richard87 May 13, 2024
bac3d0a
use json-patch v5
Richard87 May 13, 2024
c405532
use threeway patch
Richard87 May 13, 2024
e2201e3
update gomod
Richard87 May 13, 2024
3891ca9
rename default target
Richard87 May 13, 2024
653f83b
fix test
Richard87 May 14, 2024
c1cb9da
fix makefile
Richard87 May 15, 2024
e6b73f4
Update pkg/apis/utils/init.go
Richard87 May 15, 2024
a93377d
remove scaler.go and move util function to scaledobject_test.go
Richard87 May 15, 2024
100ff46
removed duplicate errors
Richard87 May 15, 2024
e46353e
replace empty errors array with nil
Richard87 May 15, 2024
7cf6520
remove isValid and just check if isErrors is nil
Richard87 May 15, 2024
e5fe62f
Update pkg/apis/deployment/deployment.go
Richard87 May 15, 2024
2a99f63
type recconcile -> reconcile
Richard87 May 15, 2024
ade947d
skip removing HPA if its not owned by a RadixDeployment
Richard87 May 15, 2024
c2425a6
Radix Operator have permission to manage scaledobjects
Richard87 May 15, 2024
f2b9708
Radix App reader and App Admin have get/list/watch permission to mana…
Richard87 May 16, 2024
acdb0e7
bump chart version
Richard87 May 16, 2024
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
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,18 @@ CUSTOM_RESOURCE_VERSION=v1

.PHONY: code-gen
code-gen: bootstrap
echo
mkdir -p $$(pwd)/github.com/equinor/radix-operator/ && ln --symbolic --target=$$(pwd)/pkg/ $$(pwd)/github.com/equinor/radix-operator/pkg

$$(go env GOPATH)/pkg/mod/k8s.io/code-generator@$(KUBE_CODEGEN_VERSION)/generate-groups.sh all \
$(ROOT_PACKAGE)/pkg/client \
$(ROOT_PACKAGE)/pkg/apis \
$(CUSTOM_RESOURCE_NAME):$(CUSTOM_RESOURCE_VERSION) \
--go-header-file hack/boilerplate.txt

# Remove hack
rm -Rf $$(pwd)/github.com
rm $$(pwd)/pkg/pkg # sometimes the link target is not removed when link is removed

.PHONY: crds
crds: temp-crds radixapplication-crd radixbatch-crd radixdnsalias-crd delete-temp-crds

Expand Down
58 changes: 31 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ require (
github.com/cert-manager/cert-manager v1.14.2
github.com/equinor/radix-common v1.7.1
github.com/golang/mock v1.6.0
github.com/google/uuid v1.5.0
github.com/google/uuid v1.6.0
github.com/kedacore/keda/v2 v2.13.1
github.com/pkg/errors v0.9.1
github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.70.0
github.com/prometheus-operator/prometheus-operator/pkg/client v0.70.0
github.com/prometheus/client_golang v1.18.0
github.com/prometheus/client_golang v1.19.0
github.com/rs/zerolog v1.32.0
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.21.0
golang.org/x/sync v0.5.0
github.com/stretchr/testify v1.9.0
golang.org/x/crypto v0.22.0
golang.org/x/sync v0.7.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.29.0
k8s.io/apiextensions-apiserver v0.29.0
k8s.io/apimachinery v0.29.0
k8s.io/client-go v0.29.0
k8s.io/api v0.29.2
k8s.io/apiextensions-apiserver v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
sigs.k8s.io/secrets-store-csi-driver v1.4.0
sigs.k8s.io/yaml v1.4.0
)
Expand All @@ -31,16 +32,18 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/emicklei/go-restful/v3 v3.11.2 // indirect
github.com/evanphx/json-patch v5.8.1+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.8.1 // indirect
github.com/expr-lang/expr v1.15.8 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-openapi/jsonpointer v0.20.2 // indirect
github.com/go-openapi/jsonreference v0.20.4 // indirect
github.com/go-openapi/swag v0.22.7 // 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.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
Expand All @@ -52,42 +55,43 @@ require (
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/mapstructure v1.5.0 // 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/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.1 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20231226003508-02704c960a9b // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/oauth2 v0.19.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/klog/v2 v2.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20240103051144-eec4567ac022 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
sigs.k8s.io/controller-runtime v0.16.3 // indirect
k8s.io/component-base v0.29.2 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // indirect
knative.dev/pkg v0.0.0-20240116073220-b488e7be5902 // indirect
sigs.k8s.io/controller-runtime v0.17.3 // indirect
sigs.k8s.io/gateway-api v1.0.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
Expand Down
Loading
Loading