charts/redpanda: support schema_registry_client SASL credentials via secretRef#1503
Open
AldoFusterTurpin wants to merge 1 commit intoredpanda-data:mainfrom
Open
Conversation
…secretRef The V2 Helm chart had no way to configure SASL credentials for the schema registry's internal Kafka client without storing plaintext in the ConfigMap. This adds config.schema_registry_client.saslSecretRef (a reference to a Kubernetes Secret) which injects credentials at pod start via the existing redpanda.yaml.fixups mechanism.
Author
|
@RafalKorepta Could you please take a look when you have some time ? 🙏 I created the PR because I need it for our cluster, but I believe this could be useful for other people as well. Thank you a lot. |
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
The V2 Helm chart had no way to configure SASL credentials for the schema registry's internal Kafka client (schema_registry_client) without storing plaintext passwords in the ConfigMap. This is a regression compared to the V1 operator, which already supports this via operator/pkg/resources/configuration.go.
This PR adds a saslSecretRef field to config.schema_registry_client that references a Kubernetes Secret containing the SASL username and password. Credentials are injected at pod start using the existing redpanda.yaml.fixups mechanism (the same approach already used for tiered storage credentials) so they never appear in plaintext in the ConfigMap or Helm release history.
How it works
The field names written to redpanda.yaml (scram_username, scram_password, sasl_mechanism) are documented Redpanda broker properties:
https://docs.redpanda.com/current/reference/properties/broker-properties/#schema-registry-client
Test plan
Files auto-generated
For reference (even for myself), this is what I did to autogenerate files:
Create the build output directory (not created automatically)
mkdir -p .build
Build the gen and gotohelm tools
PATH="$(pwd)/.build:$PATH" task charts:generate:redpanda
That commands does in order:
The PATH prefix is needed because the task builds its own tools into .build/ and they need to be on the path to run.