From c95f585e807ba3556a6bc12786fb32bb80881eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Thu, 3 Apr 2025 15:26:54 +0200 Subject: [PATCH] fix secret --- .gitignore | 1 - deploy/rocket-chat/templates/secret.yaml | 27 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 deploy/rocket-chat/templates/secret.yaml diff --git a/.gitignore b/.gitignore index 9722390..79b5594 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -**/secret.yaml **/.DS_Store diff --git a/deploy/rocket-chat/templates/secret.yaml b/deploy/rocket-chat/templates/secret.yaml new file mode 100644 index 0000000..882ad5b --- /dev/null +++ b/deploy/rocket-chat/templates/secret.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "rocketchat.fullname" . }} + labels: + app.kubernetes.io/name: {{ include "rocketchat.name" . }} + helm.sh/chart: {{ include "rocketchat.chart" . }} + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/managed-by: {{ .Release.Service }} +type: Opaque +data: +{{- if .Values.registrationToken }} + reg-token: {{ .Values.registrationToken | b64enc | quote }} +{{ end }} +{{- if .Values.license }} + license: {{ .Values.license | b64enc | quote }} +{{ end }} +{{- if .Values.smtp.enabled }} +{{- if not .Values.smtp.existingSecret}} + mail-url: {{ printf "smtp://%s:%s@%s:%.0f" .Values.smtp.username .Values.smtp.password .Values.smtp.host .Values.smtp.port | b64enc | quote }} +{{- end }} +{{- end }} +{{- if not .Values.existingMongodbSecret }} + mongo-uri: {{ include "rocketchat.mongodb.url" . | b64enc | quote }} + mongo-oplog-uri: {{ include "rocketchat.mongodb.oplogUrl" . | b64enc | quote }} +{{- end }} \ No newline at end of file