diff --git a/.github/workflows/notify-on-release.yaml b/.github/workflows/notify-on-release.yaml new file mode 100644 index 00000000..1dd9d4ed --- /dev/null +++ b/.github/workflows/notify-on-release.yaml @@ -0,0 +1,24 @@ +on: + release: + types: [published] + +jobs: + send-message: + runs-on: ubuntu-latest + name: Send message via Matrix + steps: + - name: Send message to mailu-helm-chart channel + id: matrix-chat-message + uses: fadenb/matrix-chat-message@v0.0.6 + with: + homeserver: 'matrix.org' + token: ${{ secrets.MATRIX_TOKEN }} + channel: '!KluZWhQwHDYrOfqJdD:make-it.fr' + message: | + # New release of mailu-helm-chart + \ + Version: **${{ github.event.release.tag_name }}**\ + URL: **${{ github.event.release.html_url }}**\ + \ + Description:\ + ```${{ github.event.release.body }}``` diff --git a/mailu/Chart.yaml b/mailu/Chart.yaml index 69f1cb39..f7ab28ea 100644 --- a/mailu/Chart.yaml +++ b/mailu/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 appVersion: "1.9" -version: 1.0.0-beta.9 +version: 1.0.0-beta.10 name: mailu description: This chart installs the Mailu mail system on kubernetes home: https://mailu.io diff --git a/mailu/templates/_database.tpl b/mailu/templates/_database.tpl index 969ad263..d029779b 100644 --- a/mailu/templates/_database.tpl +++ b/mailu/templates/_database.tpl @@ -78,17 +78,17 @@ {{/* Return the name of the external database */}} {{- define "mailu.database.external.database" -}} -{{ include "common.secrets.lookup" (dict "secret" (include "mailu.database.external.secretName" .) "key" .Values.externalDatabase.existingSecretDatabaseKey "defaultValue" .Values.externalDatabase.database "context" .) }} +{{ (include "common.secrets.lookup" (dict "secret" (include "mailu.database.external.secretName" .) "key" .Values.externalDatabase.existingSecretDatabaseKey "defaultValue" .Values.externalDatabase.database "context" .)) | toString | b64dec }} {{- end -}} {{/* Return the username of the external database */}} {{- define "mailu.database.external.username" -}} -{{ include "common.secrets.lookup" (dict "secret" (include "mailu.database.external.secretName" .) "key" .Values.externalDatabase.existingSecretUsernameKey "defaultValue" .Values.externalDatabase.username "context" .) }} +{{ (include "common.secrets.lookup" (dict "secret" (include "mailu.database.external.secretName" .) "key" .Values.externalDatabase.existingSecretUsernameKey "defaultValue" .Values.externalDatabase.username "context" .)) | toString | b64dec }} {{- end -}} {{/* Return the password of the external database */}} {{- define "mailu.database.external.password" -}} -{{ include "common.secrets.lookup" (dict "secret" (include "mailu.database.external.secretName" .) "key" .Values.externalDatabase.existingSecretPasswordKey "defaultValue" .Values.externalDatabase.password "context" .) }} +{{ (include "common.secrets.lookup" (dict "secret" (include "mailu.database.external.secretName" .) "key" .Values.externalDatabase.existingSecretPasswordKey "defaultValue" .Values.externalDatabase.password "context" .)) | toString | b64dec }} {{- end -}} {{/* Return the name of the mailu database secret with its credentials */}} diff --git a/mailu/templates/secret-external-db.yaml b/mailu/templates/secret-external-db.yaml index d6a882c8..32b72a9c 100644 --- a/mailu/templates/secret-external-db.yaml +++ b/mailu/templates/secret-external-db.yaml @@ -13,8 +13,8 @@ metadata: annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" . ) | nindent 4 }} {{- end }} type: Opaque -stringData: - {{ .Values.externalDatabase.existingSecretDatabaseKey -}}: {{ (include "mailu.database.external.database" . ) | quote }} - {{ .Values.externalDatabase.existingSecretUsernameKey -}}: {{ (include "mailu.database.external.username" . ) | quote }} - {{ .Values.externalDatabase.existingSecretPasswordKey -}}: {{ (include "mailu.database.external.password" . ) | quote }} +data: + {{ .Values.externalDatabase.existingSecretDatabaseKey -}}: {{ (include "mailu.database.external.database" . ) | toString | b64enc | quote }} + {{ .Values.externalDatabase.existingSecretUsernameKey -}}: {{ (include "mailu.database.external.username" . ) | toString | b64enc | quote }} + {{ .Values.externalDatabase.existingSecretPasswordKey -}}: {{ (include "mailu.database.external.password" . ) | toString | b64enc | quote }} {{- end }}