knative-extensions / eventing-autoscaler-keda

KEDA support for Knative Event Sources Autoscaling
Apache License 2.0
44 stars 36 forks source link

Controller is watching all CRDs not just Sources #1

Open zroubalik opened 4 years ago

zroubalik commented 4 years ago

The controller is watching all CRDs, not just those with duck.knative.dev/source label. Though they are ignored by controller, it would be nice to fix this, to avoid the flood of messages in the log.

I expected this part of code would do the trick, but it doesn't: https://github.com/zroubalik/autoscaler-keda/blob/85186c0c257126f6aa71fac9b26f9b252210e523/pkg/reconciler/crd/controller.go#L64-L66

Log:

I0716 16:09:16.991938       1 leaderelection.go:242] attempting to acquire leader lease  autoscaler-keda/controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.reconciler.00-of-01...
{"level":"info","ts":"2020-07-16T16:09:17.001Z","logger":"controller","caller":"leaderelection/context.go:146","msg":"\"controller-76fb8d6756-5f4vm_efc63512-fff9-478e-b322-f49b34e0e0d3\" has started leading \"controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.reconciler.00-of-01\""}
I0716 16:09:17.001699       1 leaderelection.go:252] successfully acquired lease autoscaler-keda/controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.reconciler.00-of-01
{"level":"info","ts":"2020-07-16T16:09:17.003Z","logger":"controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.Reconciler","caller":"crd/reconciler.go:98","msg":"GVKKKconfig.openshift.io/v1, Kind=Scheduler","knative.dev/traceid":"0cf0bbb3-b9c5-4149-84e3-c4e14d58bdc2","knative.dev/key":"schedulers.config.openshift.io"}
{"level":"info","ts":"2020-07-16T16:09:17.003Z","logger":"controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.Reconciler","caller":"customresourcedefinition/reconciler.go:291","msg":"Returned an event","knative.dev/traceid":"0cf0bbb3-b9c5-4149-84e3-c4e14d58bdc2","knative.dev/key":"schedulers.config.openshift.io","targetMethod":"ReconcileKind","event":"CustomResourceDefinition reconciliation ignored, KEDA autoscaling for this CRD is not supported: \"/schedulers.config.openshift.io\""}
{"level":"info","ts":"2020-07-16T16:09:17.003Z","logger":"controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.Reconciler","caller":"controller/controller.go:474","msg":"Reconcile succeeded. Time taken: 219.24µs","knative.dev/traceid":"0cf0bbb3-b9c5-4149-84e3-c4e14d58bdc2","knative.dev/key":"schedulers.config.openshift.io"}
{"level":"info","ts":"2020-07-16T16:09:17.003Z","logger":"controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.Reconciler","caller":"crd/reconciler.go:98","msg":"GVKKKconfig.openshift.io/v1, Kind=FeatureGate","knative.dev/traceid":"acfe0c7d-8bdc-4b00-bfeb-d8052fc76a7a","knative.dev/key":"featuregates.config.openshift.io"}
{"level":"info","ts":"2020-07-16T16:09:17.003Z","logger":"controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.Reconciler","caller":"customresourcedefinition/reconciler.go:291","msg":"Returned an event","knative.dev/traceid":"acfe0c7d-8bdc-4b00-bfeb-d8052fc76a7a","knative.dev/key":"featuregates.config.openshift.io","targetMethod":"ReconcileKind","event":"CustomResourceDefinition reconciliation ignored, KEDA autoscaling for this CRD is not supported: \"/featuregates.config.openshift.io\""}
{"level":"info","ts":"2020-07-16T16:09:17.003Z","logger":"controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.Reconciler","caller":"controller/controller.go:474","msg":"Reconcile succeeded. Time taken: 155.731µs","knative.dev/traceid":"acfe0c7d-8bdc-4b00-bfeb-d8052fc76a7a","knative.dev/key":"featuregates.config.openshift.io"}
{"level":"info","ts":"2020-07-16T16:09:17.003Z","logger":"controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.Reconciler","caller":"crd/reconciler.go:98","msg":"GVKKKconfig.openshift.io/v1, Kind=Proxy","knative.dev/traceid":"b3477a47-c9b7-4e61-9823-9176337331f4","knative.dev/key":"proxies.config.openshift.io"}
{"level":"info","ts":"2020-07-16T16:09:17.004Z","logger":"controller.github.com-zroubalik-autoscaler-keda-pkg-reconciler-crd.Reconciler","caller":"customresourcedefinition/reconciler.go:291","msg":"Returned an event","knative.dev/traceid":"b3477a47-c9b7-4e61-9823-9176337331f4","knative.dev/key":"proxies.config.openshift.io","targetMethod":"ReconcileKind","event":"CustomResourceDefinition reconciliation ignored, KEDA autoscaling for this CRD is not supported: \"/proxies.config.openshift.io\""}
github-actions[bot] commented 3 years ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

zroubalik commented 3 years ago

/remove-lifecycle stale

github-actions[bot] commented 3 years ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

zroubalik commented 3 years ago

/remove-lifecycle stale

github-actions[bot] commented 3 years ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

pierDipi commented 2 years ago

/remove-lifecycle stale /triage accepted