diff --git a/services/mailu/helmrelease.yaml b/services/mailu/helmrelease.yaml index 7342141..9779aed 100644 --- a/services/mailu/helmrelease.yaml +++ b/services/mailu/helmrelease.yaml @@ -335,8 +335,14 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "apikey" }}" - export RELAYPASSWORD="{{ index .Data.data "apikey" }}" + {{- $apikey := index .Data.data "apikey" -}} + {{- if $apikey }} + export RELAYUSER="{{ $apikey }}" + export RELAYPASSWORD="{{ $apikey }}" + {{- else }} + export RELAYUSER="{{ index .Data.data "accesskey" }}" + export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" + {{- end }} {{ end }} spec: serviceAccountName: mailu-vault-sync @@ -397,8 +403,14 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "apikey" }}" - export RELAYPASSWORD="{{ index .Data.data "apikey" }}" + {{- $apikey := index .Data.data "apikey" -}} + {{- if $apikey }} + export RELAYUSER="{{ $apikey }}" + export RELAYPASSWORD="{{ $apikey }}" + {{- else }} + export RELAYUSER="{{ index .Data.data "accesskey" }}" + export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" + {{- end }} {{ end }} spec: serviceAccountName: mailu-vault-sync @@ -459,8 +471,14 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "apikey" }}" - export RELAYPASSWORD="{{ index .Data.data "apikey" }}" + {{- $apikey := index .Data.data "apikey" -}} + {{- if $apikey }} + export RELAYUSER="{{ $apikey }}" + export RELAYPASSWORD="{{ $apikey }}" + {{- else }} + export RELAYUSER="{{ index .Data.data "accesskey" }}" + export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" + {{- end }} {{ end }} spec: serviceAccountName: mailu-vault-sync @@ -521,8 +539,14 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "apikey" }}" - export RELAYPASSWORD="{{ index .Data.data "apikey" }}" + {{- $apikey := index .Data.data "apikey" -}} + {{- if $apikey }} + export RELAYUSER="{{ $apikey }}" + export RELAYPASSWORD="{{ $apikey }}" + {{- else }} + export RELAYUSER="{{ index .Data.data "accesskey" }}" + export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" + {{- end }} {{ end }} spec: serviceAccountName: mailu-vault-sync @@ -583,8 +607,14 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "apikey" }}" - export RELAYPASSWORD="{{ index .Data.data "apikey" }}" + {{- $apikey := index .Data.data "apikey" -}} + {{- if $apikey }} + export RELAYUSER="{{ $apikey }}" + export RELAYPASSWORD="{{ $apikey }}" + {{- else }} + export RELAYUSER="{{ index .Data.data "accesskey" }}" + export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" + {{- end }} {{ end }} spec: serviceAccountName: mailu-vault-sync @@ -645,8 +675,14 @@ spec: export INITIAL_ADMIN_PW="{{ .Data.data.password }}" {{ end }} {{ with secret "kv/data/atlas/shared/postmark-relay" }} - export RELAYUSER="{{ index .Data.data "apikey" }}" - export RELAYPASSWORD="{{ index .Data.data "apikey" }}" + {{- $apikey := index .Data.data "apikey" -}} + {{- if $apikey }} + export RELAYUSER="{{ $apikey }}" + export RELAYPASSWORD="{{ $apikey }}" + {{- else }} + export RELAYUSER="{{ index .Data.data "accesskey" }}" + export RELAYPASSWORD="{{ index .Data.data "secretkey" }}" + {{- end }} {{ end }} spec: serviceAccountName: mailu-vault-sync