diff --git a/manifests/smtp-server/create_secret.sh b/manifests/smtp-server/create_secret.sh new file mode 100755 index 0000000..f29ae38 --- /dev/null +++ b/manifests/smtp-server/create_secret.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Please enter your Gmail account"; +read username; + +echo "Please enter your Gmail password"; +read -s password; + +echo "Creating secret" +kubectl create secret generic smtp-account -n monitoring --from-literal=username=${username} --from-literal=password=${password} diff --git a/manifests/smtp-server/smtp.yaml b/manifests/smtp-server/smtp.yaml index 08edafa..b2f6f16 100644 --- a/manifests/smtp-server/smtp.yaml +++ b/manifests/smtp-server/smtp.yaml @@ -33,9 +33,15 @@ spec: protocol: TCP env: - name: GMAIL_USER - value: "youremail@gmail.com" + valueFrom: + secretKeyRef: + name: smtp-account + key: username - name: GMAIL_PASSWORD - value: "yourpassword" + valueFrom: + secretKeyRef: + name: smtp-account + key: password - name: DISABLE_IPV6 value: "True" - name: RELAY_DOMAINS