Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aliok The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
KEDA metadata must emit SASL plaintext configuration when the mechanism is omitted.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Makes run.kafka.sasl.mechanism optional, defaulting omitted values to SASL/PLAIN.
Changes:
- Relaxes mechanism validation.
- Maps empty mechanisms to KEDA
plaintext. - Updates tests and documentation.
A critical issue remains: empty mechanisms are not emitted in KEDA ScaledObject metadata.
| File | Reviewed changes |
|---|---|
pkg/keda/kafka_scaling.go |
Adds empty-mechanism mapping. |
pkg/keda/kafka_scaling_test.go |
Tests the mapping. |
pkg/keda/deployer_unit_test.go |
Removes obsolete required-mechanism coverage. |
pkg/functions/function.go |
Makes mechanism validation conditional. |
pkg/functions/function_test.go |
Tests empty mechanisms. |
docs/reference/func_yaml.md |
Documents the optional field and default. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Changes
Follow-up to review feedback on #4069 (thanks @gauron99); reproduced on a live
cluster.
run.kafka.sasl.mechanismoptional. func-go's Kafka runtimedefaults an empty mechanism to
PLAIN, so a SASL/PLAIN broker deployed andconsumed fine before
scale.kedalanded. Requiring the field broke that configon every deployer (raw, knative, keda), not only keda. Validation now
constrains only a non-empty value to the mechanisms both sides understand, and
kedaSASLTypemaps""to KEDA'splaintextso the scaler authenticates thesame way the function container does.
/kind bug
Relates to #4069
Release Note
Docs