-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
accept 'disable' as a valid tls value for kafka scaler #2611
accept 'disable' as a valid tls value for kafka scaler #2611
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gunniwho could you please add some tests for this parameter?
@zroubalik I could try but I don't have any experience writing go code. Should the test be added to the kafka scaler e2e tests? |
@gunniwho thanks, unit tests are enough for this feature imho, they are located here: https://github.com/kedacore/keda/blob/main/pkg/scalers/kafka_scaler_test.go it is just about adding validation for this field. Thanks a lot! |
I'm missing something, is not adding |
I agree with @JorTurFer. In the docs( https://keda.sh/docs/2.6/scalers/apache-kafka/#authentication-parameters ), it is indicated that if you don't pass the tls value, it means it's disabled which is the default. So that's the way to disable tls if you don't want to use it. |
@JorTurFer No, you're absolutely right. However, my motivation for this is that when creating the |
The point is that in this case it could be confusing because TLS sounds like transport encryption and not like client authentication method. Maybe we should rename them into more explicit keys. IMHO we should rename the authentication method and honor TLS key if we want to allow secure/insecure traffic (if Kafka supports it, IDK) or keep it there for backward compatibility during some versions if not. But related with this, I don't see any necessity of adding extra code to explicitly set WDYT @kedacore/keda-core-contributors ? BTW: Thanks for exposing the problem and for the contribution ❤️ ❤️ ❤️ |
@JorTurFer I agree that it would be better to just remove the else block, effectively saying that passing anything other than 'enable' for this value just means that it's not enabled. It was annoying that it was throwing errors for seemingly no reason. Regarding the docs, I also did PR to fix them (for 2.7.0 - was asked to also fix for previous versions). Regarding the TLS naming, I don't have an opinion at all... |
I think this change makes sense so that we only log errors for invalid configuration. What is your question @JorTurFer? I'm not sure if I get the proposal. |
The point is that Related with this PR in specific, my proposal is removing the else block directly |
The |
That's why I propose to extract the real |
0f983d9
to
46f1621
Compare
done |
If I am not mistaken |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
hey @gunniwho , |
413bbb8
to
3f3914a
Compare
Signed-off-by: Gunnar Palsson <gunniwho@gmail.com>
Signed-off-by: Gunnar Palsson <gunniwho@gmail.com>
3f3914a
to
a876497
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution ❤️
Signed-off-by: Gunnar Palsson gunniwho@gmail.com
Provide a description of what has been changed
Accepts
disable
as a valid value for thetls
auth parameter of the kafka scaler.Checklist
Fixes #2608