feat(redis): add support for specifying external Redis username #438
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.
TL;DR: Additional changes related to #428
Newer versions of Redis support configuring multiple users each with their own password.
This adds support for optionally specifying the username when making connections.
This pull request adds support for Redis username configuration (for Redis 6 and above) across the Diode Helm chart, server, and related files. This allows deployments to connect to Redis instances that require a username, which is important for environments using Redis ACLs. The chart version is also bumped to
1.10.0.Redis username support:
usernamefield toexternalRedisconfiguration incharts/diode/values.yamland documented it incharts/diode/README.md. The username is now required when using an external Redis and is passed into the environment and templates. [1] [2] [3]_helpers.tplto create and validate the Redis username value, ensuring it's defined whenredis.enabledis false.diode-ingester-configmap.yaml,diode-reconciler-configmap.yaml) to includeREDIS_USERNAMEenvironment variable. [1] [2]Server and application changes:
RedisUsernameto config structs in bothdiode-server/ingester/config.goanddiode-server/reconciler/config.go, and updated the main application logic to use the username when connecting to Redis. [1] [2] [3] [4] [5]REDIS_USERNAMEfor both ingester and reconciler services. [1] [2] [3]Testing and environment:
component_test.goandreconciler_test.goto set and unsetREDIS_USERNAMEenvironment variable. [1] [2] [3] [4]Version bump:
1.10.0inChart.yamland updated the README badge. [1] [2]