From db968481aa6e51d3224414dede6e5f011d849c00 Mon Sep 17 00:00:00 2001 From: aviau Date: Sun, 11 Oct 2026 22:10:10 -0400 Subject: [PATCH] feat: databases on user Co-Authored-By: Claude Opus 5.5 --- templates/secrets.yaml | 4 ++++ test/values-full.yaml | 3 +++ values.yaml | 2 ++ 3 files changed, 9 insertions(+) diff --git a/templates/secrets.yaml b/templates/secrets.yaml index 858fbad..8c3823d 100644 --- a/templates/secrets.yaml +++ b/templates/secrets.yaml @@ -2,7 +2,11 @@ {{- range .Values.users }} [[users]] name = {{ .name | quote }} +{{- if .databases }} +databases = [{{ range $i, $d := .databases }}{{ if $i }}, {{ end }}{{ $d | quote }}{{ end }}] +{{- else }} database = {{ .database | quote }} +{{- end }} {{- if hasKey . "authType" }} auth_type = {{ .authType | quote }} {{- end }} diff --git a/test/values-full.yaml b/test/values-full.yaml index adc8a73..3588e5d 100644 --- a/test/values-full.yaml +++ b/test/values-full.yaml @@ -98,6 +98,9 @@ users: poolMode: transaction - username: admin_user password: admin123 + databases: + - primary + - replica shardedTables: - database: primary diff --git a/values.yaml b/values.yaml index 3425451..ef80f67 100644 --- a/values.yaml +++ b/values.yaml @@ -253,6 +253,8 @@ databases: [] # camelCase format. # Set identity on a user to match the identity in its client TLS certificate. # Set authType on a user to override the general authType setting. +# Set databases on a user to a list of database names to give it access to +# multiple databases. It takes precedence over database. # Set serverIamRegion to the AWS region for RDS IAM authentication # when serverAuth is rds_iam. # Set serverIamAssumeRole to an IAM role ARN to assume for RDS IAM authentication