30 lines
788 B
YAML
30 lines
788 B
YAML
apiVersion: v1
|
|||
|
|
kind: Secret
|
||
|
|
metadata:
|
||
|
|
name: smtp-credentials
|
||
|
|
namespace: api
|
||
|
|
labels:
|
||
|
|
app: api-gateway
|
||
|
|
component: notification
|
||
|
|
type: Opaque
|
||
|
|
data:
|
||
|
|
host: <base64-encoded SMTP hostname>
|
||
|
|
port: <base64-encoded SMTP port, e.g., "587">
|
||
|
|
from: <base64-encoded sender email>
|
||
|
|
user: <base64-encoded SMTP username>
|
||
|
|
password: <base64-encoded SMTP password>
|
||
|
|
|
||
|
|
# To create from plaintext:
|
||
|
|
# kubectl create secret generic smtp-credentials \
|
||
|
|
# --from-literal=host=mail.example.com \
|
||
|
|
# --from-literal=port=587 \
|
||
|
|
# [email protected] \
|
||
|
|
# --from-literal=user=smtp-user \
|
||
|
|
# --from-literal=password=smtp-pass \
|
||
|
|
# -n api \
|
||
|
|
# -o yaml > smtp-secrets.yaml
|
||
|
|
#
|
||
|
|
# Then encrypt with SOPS:
|
||
|
|
# sops -e smtp-secrets.yaml > smtp-secrets.enc.yaml
|
||
|
|
# rm smtp-secrets.yaml
|