이메일 알림 서비스 (Email Notification Service)
Email 알림 서비스는 SMTP 프로토콜을 사용해 이메일 알림을 보냅니다. Gmail을 비롯한 SMTP 서버 설정과 함께 알림 템플릿에서 제목(subject)을 지정할 수 있습니다.
출처: Argo Rollouts 문서
본문
파라미터 (Parameters)
Email 알림 서비스는 SMTP 프로토콜을 사용해 이메일 알림을 보내며, 다음 설정을 지정해야 합니다.
- host - the SMTP server host name
- port - the SMTP server port
- username - username
- password - password
- from - from email address
- html - optional bool, true or false
- insecure_skip_verify - optional bool, true or false
Gmail 사용하기 (Using Gmail)
Gmail을 SMTP 서비스로 구성할 때:
- username - Must be your Gmail address.
- password - Use an App Password, not your regular Gmail password.
앱 비밀번호를 생성하려면 다음 링크를 따르세요. https://myaccount.google.com/apppasswords
Note: 이 내용은 개인 Gmail 계정(비 Google Workspace)에 적용됩니다. Google Workspace 사용자의 경우 SMTP 설정과 인증 방식이 다를 수 있습니다.
예시 (Example)
다음 스니펫은 Gmail 서비스 구성 예시를 담고 있습니다.
apiVersion: v1
kind: ConfigMap
metadata:
name: argo-rollouts-notification-configmap
data:
service.email.gmail: |
username: $username
password: $password
host: smtp.gmail.com
port: 465
from: $email-address
인증 없이 사용하는 경우:
apiVersion: v1
kind: ConfigMap
metadata:
name: argo-rollouts-notification-configmap
data:
service.email.example: |
host: smtp.example.com
port: 587
from: $email-address
템플릿 (Template)
알림 템플릿은 이메일 알림의 제목(subject) 지정을 지원합니다.
apiVersion: v1
kind: ConfigMap
metadata:
name: argo-rollouts-notification-configmap
data:
template.app-sync-succeeded: |
email:
subject: Application {{.app.metadata.name}} has been successfully synced.
message: |
{{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}.
Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .
더 알아보기 (Learn more)
- 알림 서비스 개요 — 전체 알림 서비스 종류와 설정
- Slack 알림 — Slack 통합
- Webhook 알림 — 사용자 지정 Webhook 통합
- 알림 트리거 — 트리거 확인 명령