mailu: prefer postmark smtp token for relay

This commit is contained in:
Brad Stein 2026-01-20 01:04:04 -03:00
parent a86d68ca74
commit a8be46b422

View File

@ -335,13 +335,14 @@ spec:
export INITIAL_ADMIN_PW="{{ .Data.data.password }}" export INITIAL_ADMIN_PW="{{ .Data.data.password }}"
{{ end }} {{ end }}
{{ with secret "kv/data/atlas/shared/postmark-relay" }} {{ with secret "kv/data/atlas/shared/postmark-relay" }}
{{- $apikey := index .Data.data "apikey" -}} {{- $access := index .Data.data "accesskey" -}}
{{- if $apikey }} {{- $secret := index .Data.data "secretkey" -}}
export RELAYUSER="{{ $apikey }}" {{- if and $access $secret }}
export RELAYPASSWORD="{{ $apikey }}" export RELAYUSER="{{ $access }}"
export RELAYPASSWORD="{{ $secret }}"
{{- else }} {{- else }}
export RELAYUSER="{{ index .Data.data "accesskey" }}" export RELAYUSER="{{ index .Data.data "apikey" }}"
export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" export RELAYPASSWORD="{{ index .Data.data "apikey" }}"
{{- end }} {{- end }}
{{ end }} {{ end }}
spec: spec:
@ -403,13 +404,14 @@ spec:
export INITIAL_ADMIN_PW="{{ .Data.data.password }}" export INITIAL_ADMIN_PW="{{ .Data.data.password }}"
{{ end }} {{ end }}
{{ with secret "kv/data/atlas/shared/postmark-relay" }} {{ with secret "kv/data/atlas/shared/postmark-relay" }}
{{- $apikey := index .Data.data "apikey" -}} {{- $access := index .Data.data "accesskey" -}}
{{- if $apikey }} {{- $secret := index .Data.data "secretkey" -}}
export RELAYUSER="{{ $apikey }}" {{- if and $access $secret }}
export RELAYPASSWORD="{{ $apikey }}" export RELAYUSER="{{ $access }}"
export RELAYPASSWORD="{{ $secret }}"
{{- else }} {{- else }}
export RELAYUSER="{{ index .Data.data "accesskey" }}" export RELAYUSER="{{ index .Data.data "apikey" }}"
export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" export RELAYPASSWORD="{{ index .Data.data "apikey" }}"
{{- end }} {{- end }}
{{ end }} {{ end }}
spec: spec:
@ -471,13 +473,14 @@ spec:
export INITIAL_ADMIN_PW="{{ .Data.data.password }}" export INITIAL_ADMIN_PW="{{ .Data.data.password }}"
{{ end }} {{ end }}
{{ with secret "kv/data/atlas/shared/postmark-relay" }} {{ with secret "kv/data/atlas/shared/postmark-relay" }}
{{- $apikey := index .Data.data "apikey" -}} {{- $access := index .Data.data "accesskey" -}}
{{- if $apikey }} {{- $secret := index .Data.data "secretkey" -}}
export RELAYUSER="{{ $apikey }}" {{- if and $access $secret }}
export RELAYPASSWORD="{{ $apikey }}" export RELAYUSER="{{ $access }}"
export RELAYPASSWORD="{{ $secret }}"
{{- else }} {{- else }}
export RELAYUSER="{{ index .Data.data "accesskey" }}" export RELAYUSER="{{ index .Data.data "apikey" }}"
export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" export RELAYPASSWORD="{{ index .Data.data "apikey" }}"
{{- end }} {{- end }}
{{ end }} {{ end }}
spec: spec:
@ -539,13 +542,14 @@ spec:
export INITIAL_ADMIN_PW="{{ .Data.data.password }}" export INITIAL_ADMIN_PW="{{ .Data.data.password }}"
{{ end }} {{ end }}
{{ with secret "kv/data/atlas/shared/postmark-relay" }} {{ with secret "kv/data/atlas/shared/postmark-relay" }}
{{- $apikey := index .Data.data "apikey" -}} {{- $access := index .Data.data "accesskey" -}}
{{- if $apikey }} {{- $secret := index .Data.data "secretkey" -}}
export RELAYUSER="{{ $apikey }}" {{- if and $access $secret }}
export RELAYPASSWORD="{{ $apikey }}" export RELAYUSER="{{ $access }}"
export RELAYPASSWORD="{{ $secret }}"
{{- else }} {{- else }}
export RELAYUSER="{{ index .Data.data "accesskey" }}" export RELAYUSER="{{ index .Data.data "apikey" }}"
export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" export RELAYPASSWORD="{{ index .Data.data "apikey" }}"
{{- end }} {{- end }}
{{ end }} {{ end }}
spec: spec:
@ -607,13 +611,14 @@ spec:
export INITIAL_ADMIN_PW="{{ .Data.data.password }}" export INITIAL_ADMIN_PW="{{ .Data.data.password }}"
{{ end }} {{ end }}
{{ with secret "kv/data/atlas/shared/postmark-relay" }} {{ with secret "kv/data/atlas/shared/postmark-relay" }}
{{- $apikey := index .Data.data "apikey" -}} {{- $access := index .Data.data "accesskey" -}}
{{- if $apikey }} {{- $secret := index .Data.data "secretkey" -}}
export RELAYUSER="{{ $apikey }}" {{- if and $access $secret }}
export RELAYPASSWORD="{{ $apikey }}" export RELAYUSER="{{ $access }}"
export RELAYPASSWORD="{{ $secret }}"
{{- else }} {{- else }}
export RELAYUSER="{{ index .Data.data "accesskey" }}" export RELAYUSER="{{ index .Data.data "apikey" }}"
export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" export RELAYPASSWORD="{{ index .Data.data "apikey" }}"
{{- end }} {{- end }}
{{ end }} {{ end }}
spec: spec:
@ -675,13 +680,14 @@ spec:
export INITIAL_ADMIN_PW="{{ .Data.data.password }}" export INITIAL_ADMIN_PW="{{ .Data.data.password }}"
{{ end }} {{ end }}
{{ with secret "kv/data/atlas/shared/postmark-relay" }} {{ with secret "kv/data/atlas/shared/postmark-relay" }}
{{- $apikey := index .Data.data "apikey" -}} {{- $access := index .Data.data "accesskey" -}}
{{- if $apikey }} {{- $secret := index .Data.data "secretkey" -}}
export RELAYUSER="{{ $apikey }}" {{- if and $access $secret }}
export RELAYPASSWORD="{{ $apikey }}" export RELAYUSER="{{ $access }}"
export RELAYPASSWORD="{{ $secret }}"
{{- else }} {{- else }}
export RELAYUSER="{{ index .Data.data "accesskey" }}" export RELAYUSER="{{ index .Data.data "apikey" }}"
export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" export RELAYPASSWORD="{{ index .Data.data "apikey" }}"
{{- end }} {{- end }}
{{ end }} {{ end }}
spec: spec: