-
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
feat: Kafka scaler move sasl and tls config to TriggerAuthentication metadata #4024
Conversation
Hi team, |
Hi @JorTurFer, thanks for approving my other MR so quickly, even during weekend 🙏 Could you help to guide me on this one as well ? |
@dttung2905 I think that we should not move this config, but support specifying thsi option in both places. This way we maintain backwards compatibility. There should be a check when this option is specified in both places (with different values), in this case we should fail. WDYT @kedacore/keda-contributors ? |
Thanks for the feedback. Yes I can make it backward compatible too. Am I right to say that we will support having |
Hi @zroubalik , I have make changes to accommodate backward compatibility. Also a few checks I have implemented
Could you help to review it ? |
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 the addition, the only nit is the changelog. Let see what other think.
CHANGELOG.md
Outdated
@@ -42,7 +42,7 @@ To learn more about active deprecations, we recommend checking [GitHub Discussio | |||
|
|||
### Breaking Changes | |||
|
|||
- TODO | |||
- Kafka: Move `sasl` and `tls` config to `TriggerAuthentication` metadata ([#4024](https://github.com/kedacore/keda/pull/4024)) |
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.
Is this really a Brekaing Change? I am not sure, @tomkerkhove @JorTurFer wdyt?
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.
Not necessarily though. Before we decided to make it backward compatible, I classified it as breaking changes. I can move it out of this section
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.
I don't think so, because it's backward compatible
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.
Based on the doc changes it looks like a breaking change as we are removing fields/parameters which we already support
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.
I'd say that docs are outdated because based on the code, the values are read from both places
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.
So instead of a secret, isn't the real fix that we need a plain text option in a CRD instead of moving this to metadata?
Something like:
plainText:
- parameter: tls
value: true
Because it feels better to me to keep everything part of the CRD "body" rather than some in metadata and other in the payload/body.
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.
@tomkerkhove Thanks so much for the suggestion. I'm really curious to know how does it look like with your suggestion in ScaledObject
. 🤔 My guess is below ( pls cmiiw )
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: pulsar-scaledobject
namespace: default
spec:
scaleTargetRef:
name: pulsar-consumer
pollingInterval: 30
plainText:
- parameter: tls
value: true
Hi team,
What do you think about Tom's suggestion?
I'm totally fine with both approaches but I think parking it under metadata would be slightly better in terms of consistency across other scalers ( take pulsar for example )
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.
My suggestion is not for ScaledObject, but for Trigger Authentication instead where we already have multiple auth providers and this could be another one
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.
Sorry for the delay, I understand what @tomkerkhove proposes here, I have been thinking about the same approach, though I am not 100% sure we should provide a plaintext in TriggerAuth. Users might start using this not ideal approach for storing sensitive data. Or am I too sensitive and we should let them do this? :)
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.
@kedacore/keda-core-contributors do you have an opinion on the plainText
field in TA?
/run-e2e kafka* |
CHANGELOG.md
Outdated
@@ -42,7 +42,7 @@ To learn more about active deprecations, we recommend checking [GitHub Discussio | |||
|
|||
### Breaking Changes | |||
|
|||
- TODO | |||
- Kafka: Move `sasl` and `tls` config to `TriggerAuthentication` metadata ([#4024](https://github.com/kedacore/keda/pull/4024)) |
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.
I don't think so, because it's backward compatible
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
…ify implementation Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
a7ff0e3
to
9e03d79
Compare
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
As agreed on standup, the best location for this should be: triggers:
- type: kafka
metadata:
bootstrapServers: kafka.svc:9092
consumerGroup: my-group
topic: test-topic
lagThreshold: '5'
activationLagThreshold: '3'
offsetResetPolicy: latest
allowIdleConsumers: false
scaleToZeroOnInvalidOffset: false
excludePersistentLag: false
version: 1.0.0
+ saslAuthType: plaintext|scram_sha256|scram_sha512|oauthbearer|none
+ enableTls: true|false |
Closing this MR in favour of MR #4322 |
Move
sasl
andtls
config tometadata
section ofTriggerAuthentication
Checklist
enableTls
andsaslAuthType
for Kafka Scaler ScaledObject keda-docs#1016Relates to #3611
Relates to #