fix secret

This commit is contained in:
2025-04-03 15:26:54 +02:00
parent aa6a51e4b5
commit c95f585e80
2 changed files with 27 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,2 +1 @@
**/secret.yaml
**/.DS_Store

View File

@@ -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 }}