google / knative-gcp

GCP event implementations to use with Knative Eventing.
https://github.com/knative/eventing
Apache License 2.0
160 stars 74 forks source link

Keda API version update #2251

Closed shlimp closed 3 years ago

shlimp commented 3 years ago

Describe the bug I am using cloudpubsubsource to connect to pub/sub. I'm trying to use the keda autoscaler features, and I come across an API version issue. currently, the code uses "keda.k8s.io/v1beta1", as can be seen at https://github.com/google/knative-gcp/blob/930cae634aa9fdb1ee5064091680668e3711f236/pkg/reconciler/intevents/pullsubscription/keda/resources/scaled_object.go

keda.k8s.io is being used in Keda v 1.X. Keda 2.X changed the API name to keda.sh.

in order to get by that I installed keda 1.5.0, which is the latest 1.X version available, yet this version implements keda.k8s.io/v1alpha1.

so currently knative-gcp uses v1beta1, which doesn't have any corresponding version with keda itself, making this feature unusable at all

Expected behavior being able to scale the pubsub source using keda autoscaler

To Reproduce install knative-gcp with ANY keda version

Knative-GCP release version v0.23.0

As Keda is already at 2.5, I think it's worth modifying to use the new API version of keda.sh

nlopezgi commented 3 years ago

Hi @shlimp, The use of Keda features with knative-gcp is experimental (as indicated in the https://github.com/google/knative-gcp/blob/main/docs/examples/keda/README.md); unfortunately we have not had the cycles to maintain this feature so its currently not usable. We apologize for the inconvenience.

shlimp commented 3 years ago

Thanks for the update @nlopezgi.

Out of curiosity, is there a way to manually set the number of replicas for cloudpubsubsource? At that time that would be more then enough for my case, as my main issue currently is that I generate much more messages then I can consume, and the only limitation is just the number of replicas. If I manually change the number of replicas (after deleting the controller, just for experiment) then it manages to keep up without an issue. I tried to dig in but couldn't find any way to control it

nlopezgi commented 3 years ago

@shlimp it is not possible to set this manually.