feat(chart): support existingSecret for DB credentials (Doppler / External Secrets / Vault compatible) - #172
Open
danielqb wants to merge 1 commit into
Open
Conversation
…ernal Secrets / Vault compatible) ## Problem MariaDB and GLPI database credentials were only configurable as plaintext values in values.yaml (mariadb.auth.rootPassword/username/password, etc), always rendered into chart-managed Secrets. There was no way to point the chart at a Secret already populated by an external secrets manager (Doppler, External Secrets Operator, Vault, Sealed Secrets, etc), which is the standard pattern the Bitnami charts support via '<component>.auth.existingSecret'. ## Fix Added two independent existingSecret overrides, following the Bitnami naming convention: - mariadb.auth.existingSecret: for the MariaDB server's own credentials (needs MARIADB_ROOT_PASSWORD, MARIADB_DATABASE, MARIADB_USER, MARIADB_PASSWORD). Used by the MariaDB StatefulSet and the mariadb-timezone Job. When set, mariadb-secret.yaml is skipped. - glpi.database.existingSecret: for the GLPI application's DB credentials (needs MARIADB_DATABASE, MARIADB_USER, MARIADB_PASSWORD - no root password, preserving the existing least-privilege separation between the app-facing secret and the DB-server-facing secret). Used by php-fpm, all 5 init Jobs, and the cronjob. When set, glpi-secret.yaml is skipped. Applies whether mariadb.enabled is true or false. Added glpi.mariadbSecretName / glpi.databaseSecretName helpers in _helpers.tpl that resolve to the existingSecret name when set, or the chart-managed Secret name otherwise. All secretRef consumers now go through these helpers instead of hardcoding mariadb-glpi-secret / glpi-secret. ## Testing - helm lint: 0 failures - helm template (default): both glpi-secret and mariadb-glpi-secret created - helm template --set mariadb.auth.existingSecret=doppler-mariadb-creds: mariadb-glpi-secret NOT created; StatefulSet + timezone Job reference doppler-mariadb-creds - helm template --set glpi.database.existingSecret=doppler-glpi-db-creds: glpi-secret NOT created; all 8 consumers (php-fpm, nginx, 5 jobs, cronjob) reference doppler-glpi-db-creds
eduardofraga
requested changes
Jul 28, 2026
eduardofraga
left a comment
Contributor
There was a problem hiding this comment.
- Move files from kubernetes/glpi to helm/
- Remove mariadb files and use sub-chart from helmforge.
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.
Problem
MariaDB and GLPI database credentials were only configurable as plaintext
values in values.yaml (mariadb.auth.rootPassword/username/password, etc),
always rendered into chart-managed Secrets. There was no way to point the
chart at a Secret already populated by an external secrets manager
(Doppler, External Secrets Operator, Vault, Sealed Secrets, etc), which
is the standard pattern the Bitnami charts support via
'.auth.existingSecret'.
Fix
Added two independent existingSecret overrides, following the Bitnami
naming convention:
mariadb.auth.existingSecret: for the MariaDB server's own credentials
(needs MARIADB_ROOT_PASSWORD, MARIADB_DATABASE, MARIADB_USER,
MARIADB_PASSWORD). Used by the MariaDB StatefulSet and the
mariadb-timezone Job. When set, mariadb-secret.yaml is skipped.
glpi.database.existingSecret: for the GLPI application's DB credentials
(needs MARIADB_DATABASE, MARIADB_USER, MARIADB_PASSWORD - no root
password, preserving the existing least-privilege separation between
the app-facing secret and the DB-server-facing secret). Used by
php-fpm, all 5 init Jobs, and the cronjob. When set, glpi-secret.yaml
is skipped. Applies whether mariadb.enabled is true or false.
Added glpi.mariadbSecretName / glpi.databaseSecretName helpers in
_helpers.tpl that resolve to the existingSecret name when set, or the
chart-managed Secret name otherwise. All secretRef consumers now go
through these helpers instead of hardcoding mariadb-glpi-secret /
glpi-secret.
Testing
mariadb-glpi-secret NOT created; StatefulSet + timezone Job reference
doppler-mariadb-creds
glpi-secret NOT created; all 8 consumers (php-fpm, nginx, 5 jobs,
cronjob) reference doppler-glpi-db-creds