From c757af0fe9176ac99abf6031bab7983349cdc9c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Guillot?= Date: Tue, 23 Apr 2024 14:21:10 +0200 Subject: [PATCH] feat(helm-chart): add `server.database.dbName` to override default server's Mongo DB name --- apps/helm-chart/src/templates/server/deployment.yaml | 2 +- apps/helm-chart/src/values.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/helm-chart/src/templates/server/deployment.yaml b/apps/helm-chart/src/templates/server/deployment.yaml index 16122e79..ca08d961 100644 --- a/apps/helm-chart/src/templates/server/deployment.yaml +++ b/apps/helm-chart/src/templates/server/deployment.yaml @@ -62,7 +62,7 @@ spec: - name: QUARKUS_MONGODB_CONNECTION_STRING {{- include "nx-cloud-ce.server.database.connection-string" . | nindent 12 }} - name: QUARKUS_MONGODB_DATABASE - value: {{ .Values.server.name }} + value: {{ default .Values.server.name .Values.server.database.dbName }} {{- with .Values.server.envFrom }} envFrom: {{- toYaml . | nindent 10 }} diff --git a/apps/helm-chart/src/values.yaml b/apps/helm-chart/src/values.yaml index 400d673b..79244c76 100644 --- a/apps/helm-chart/src/values.yaml +++ b/apps/helm-chart/src/values.yaml @@ -105,6 +105,8 @@ server: # -- DB configuration when using external MongoDB database: + # @default -- `""` (defaults to server.name=server) + dbName: "" # @default -- `""` (defaults to mongodb.enabled=true) connectionStringSecretName: "" # @default -- `""` (defaults to mongodb.enabled=true)