Skip to content

Add Kafka scaler options to scale.keda kafka trigger - #4107

Open
akshat-lakhera wants to merge 1 commit into
knative:mainfrom
akshat-lakhera:feat/4044-keda-scaling
Open

akshat-lakhera wants to merge 1 commit into
knative:mainfrom
akshat-lakhera:feat/4044-keda-scaling

Conversation

@akshat-lakhera

Copy link
Copy Markdown

Part of #4044.

This adds the remaining Kafka scaler options to the kafka trigger under scale.keda in func.yaml: offsetResetPolicy (earliest or latest), allowIdleConsumers, excludePersistentLag, scaleToZeroOnInvalidOffset and limitToPartitionsWithLag.

Each one is optional and only goes into the ScaledObject trigger metadata when it's set, using KEDA's own key names, so KEDA's defaults apply otherwise. Validation rejects these fields on a non-kafka trigger, rejects an offsetResetPolicy other than earliest or latest, and rejects allowIdleConsumers together with limitToPartitionsWithLag, since KEDA doesn't allow that combination. I regenerated the JSON schema and updated func_yaml.md.

I left out the HTTPScaledObject settings from the issue because that resource is being deprecated. pollingInterval and cooldownPeriod already landed in #4063 and #4069.

Tests: table tests for the validation and for the generated trigger metadata, covering unset, explicit false and all-set cases. go test ./pkg/keda/... ./pkg/functions/... and go vet pass.

Signed-off-by: Akshat Lakhera <akshatlnct2024@gmail.com>
@knative-prow

knative-prow Bot commented Oct 22, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: akshat-lakhera
Once this PR has been reviewed and has the lgtm label, please assign aliok for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added size/L 🤖 PR changes 100-499 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels Oct 22, 2026
@knative-prow

knative-prow Bot commented Oct 22, 2026

Copy link
Copy Markdown

Hi @akshat-lakhera. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test 🤖 Needs an org member to approve testing size/L 🤖 PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant