Skip to content

Conversation

@RangerRick
Copy link
Contributor

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:

  • Added username field to externalRedis configuration in charts/diode/values.yaml and documented it in charts/diode/README.md. The username is now required when using an external Redis and is passed into the environment and templates. [1] [2] [3]
  • Updated _helpers.tpl to create and validate the Redis username value, ensuring it's defined when redis.enabled is false.
  • Updated ConfigMap templates (diode-ingester-configmap.yaml, diode-reconciler-configmap.yaml) to include REDIS_USERNAME environment variable. [1] [2]

Server and application changes:

  • Added RedisUsername to config structs in both diode-server/ingester/config.go and diode-server/reconciler/config.go, and updated the main application logic to use the username when connecting to Redis. [1] [2] [3] [4] [5]
  • Updated Docker Compose and sample env files to include REDIS_USERNAME for both ingester and reconciler services. [1] [2] [3]

Testing and environment:

  • Updated test setup and teardown in component_test.go and reconciler_test.go to set and unset REDIS_USERNAME environment variable. [1] [2] [3] [4]

Version bump:

  • Bumped chart version to 1.10.0 in Chart.yaml and updated the README badge. [1] [2]

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

Go test coverage

STATUS ELAPSED PACKAGE COVER PASS FAIL SKIP
🟢 PASS 1.19s github.com/netboxlabs/diode/diode-server/auth 44.7% 42 0 0
🟢 PASS 0.21s github.com/netboxlabs/diode/diode-server/auth/cli 0.0% 0 0 0
🟢 PASS 1.01s github.com/netboxlabs/diode/diode-server/authutil 82.8% 5 0 0
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/dbstore/postgres 0.0% 0 0 0
🟢 PASS 1.11s github.com/netboxlabs/diode/diode-server/entityhash 86.7% 16 0 0
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/errors 0.0% 0 0 0
🟢 PASS 1.33s github.com/netboxlabs/diode/diode-server/ingester 82.7% 25 0 0
🟢 PASS 1.05s github.com/netboxlabs/diode/diode-server/migrator 70.4% 4 0 0
🟢 PASS 4.14s github.com/netboxlabs/diode/diode-server/netboxdiodeplugin 83.6% 40 0 0
🟢 PASS 2.60s github.com/netboxlabs/diode/diode-server/reconciler 82.7% 86 0 0
🟢 PASS 1.01s github.com/netboxlabs/diode/diode-server/reconciler/applier 85.7% 1 0 0
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/reconciler/changeset 0.0% 0 0 0
🟢 PASS 1.07s github.com/netboxlabs/diode/diode-server/reconciler/differ 63.8% 6 0 0
🟢 PASS 1.02s github.com/netboxlabs/diode/diode-server/server 85.7% 14 0 0
🟢 PASS 1.02s github.com/netboxlabs/diode/diode-server/telemetry 28.0% 26 0 0
🟢 PASS 1.02s github.com/netboxlabs/diode/diode-server/telemetry/otel 91.7% 25 0 0
🟢 PASS 0.00s github.com/netboxlabs/diode/diode-server/tls 0.0% 0 0 0
🟢 PASS 1.01s github.com/netboxlabs/diode/diode-server/version 100.0% 2 0 0

Total coverage: 53.9%

@RangerRick RangerRick force-pushed the ranger/redis_username_support branch from 10f12e9 to 938bcf8 Compare November 21, 2025 21:34
@RangerRick RangerRick force-pushed the ranger/redis_username_support branch from 938bcf8 to ab5dc3e Compare November 21, 2025 21:36
@RangerRick RangerRick changed the title feat(redis): add support for specifying username feat(redis): add support for specifying external Redis username Nov 21, 2025
Copy link
Member

@mfiedorowicz mfiedorowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@mfiedorowicz mfiedorowicz merged commit c0031f0 into develop Nov 24, 2025
9 checks passed
@mfiedorowicz mfiedorowicz deleted the ranger/redis_username_support branch November 24, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants