Support Kafka SASL/TLS in non-Clowder (on-prem) mode#47
Closed
ELK4N4 wants to merge 1 commit intoinsights-onprem:mainfrom
Closed
Support Kafka SASL/TLS in non-Clowder (on-prem) mode#47ELK4N4 wants to merge 1 commit intoinsights-onprem:mainfrom
ELK4N4 wants to merge 1 commit intoinsights-onprem:mainfrom
Conversation
Add mapstructure tags to Kafka security fields so viper maps environment variables to config struct fields: - KAFKA_SASL_USERNAME, KAFKA_SASL_PASSWORD, KAFKA_SASL_MECHANISM, KAFKA_SECURITY_PROTOCOL, KAFKA_SSL_CA_LOCATION Populate these via viper.SetDefault in the non-Clowder init branch. Update Clowder branch to use matching key names for consistency. No changes needed in consumer.go or producer.go — they already use SASL/TLS when cfg.KafkaSASLMechanism is non-empty. Made-with: Cursor
6 tasks
|
@ELK4N4 pls raise the PR against https://github.com/RedHatInsights/ros-ocp-backend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mapstructuretags to Kafka security config fields so viper maps environment variables (KAFKA_SASL_USERNAME,KAFKA_SASL_PASSWORD,KAFKA_SASL_MECHANISM,KAFKA_SECURITY_PROTOCOL,KAFKA_SSL_CA_LOCATION) to theConfigstructviper.SetDefaultin the non-Clowder init branchContext
The cost-onprem Helm chart (insights-onprem/cost-onprem-chart#118) injects these environment variables into ROS pods, but the non-Clowder config path previously ignored them. The consumer and producer code already supports SASL/TLS when
KafkaSASLMechanismis non-empty — only the config wiring was missing.Test plan
Made with Cursor