Skip to content

Support existing or new auth secret in RotateAuth ops editors - #1221

Merged
ArnobKumarSaha merged 3 commits into
masterfrom
arnob-rotate-auth
Nov 24, 2026
Merged

ArnobKumarSaha merged 3 commits into
masterfrom
arnob-rotate-auth

Conversation

@ArnobKumarSaha

@ArnobKumarSaha ArnobKumarSaha commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

RotateAuth form in the KubeDB ops editors now offers an explicit credential source:

  • Generate Random Password (default): spec.authentication is removed from the model so the operator generates the password. Fixes spec.authentication.secretRef.name: Required value when the old secret name field was left empty.
  • Use Existing Secret: dropdown of secrets in the namespace that have username + password keys and whose username matches the database's current auth secret (current auth secret excluded).
  • Create New Secret: name + password. Creates a kubernetes.io/basic-auth Secret with the database's current username, then auto-selects it in spec.authentication.secretRef. An info line under the password shows the username. Password is never written to the OpsRequest.

Username is pinned to the current one because the operator applies the new secret's username, and only some DB webhooks (postgres/mysql/mariadb/mssqlserver/documentdb) reject a username change.

Editors

  • mongodb (commit 1). MongoDB falls back to root if the current auth secret can't be read (per KubeDB docs).
  • cassandra, clickhouse, documentdb, druid, elasticsearch, hanadb, hazelcast, ignite, kafka, mariadb, milvus, mssqlserver, mysql, neo4j, oracle, perconaxtradb, pgbouncer, pgpool, postgres, proxysql, rabbitmq, redis, singlestore, solr (commit 2). No username fallback: if it can't be read, creating a secret is blocked with an error and the dropdown skips the username match.

Not changed

  • memcached (authData key), qdrant and weaviate (API key): their rotate-auth secrets aren't username/password, so they need a different form.
  • zookeeper: no rotate-auth handling found in the operator.

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
… DBs

Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
@ArnobKumarSaha ArnobKumarSaha changed the title Support existing or new auth secret in mongodb rotate auth Support existing or new auth secret in RotateAuth ops editors Nov 24, 2026
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
@ArnobKumarSaha
ArnobKumarSaha merged commit 347a766 into master Nov 24, 2026
8 checks passed
@ArnobKumarSaha
ArnobKumarSaha deleted the arnob-rotate-auth branch November 24, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant