Nats 알림 서비스 (Notification Services — Nats)
Nats 알림 서비스는 Nats를 통해 간단한 메시지 알림을 보낼 수 있는 기능입니다. 경량 메시징 플랫폼인 Nats를 알림 채널로 활용하고 싶을 때 유용해요. 서버 주소, 인증, 헤더 등을 설정해 알림을 구성할 수 있습니다.
출처: Argo Rollouts 문서
본문
이 알림 서비스는 Nats를 통해 간단한 메시지를 보낼 수 있습니다.
파라미터 (Parameters)
- Url — Nats 서버 URL. 예:
nats://nats:4222 - Headers — 선택 사항, 메시지와 함께 보낼 추가 헤더
- User — 선택 사항, password와 함께 사용되는 Nats 인증 사용자
- Password — 선택 사항, user와 함께 사용되는 Nats 인증 비밀번호
- Nkey — 선택 사항, Nats 인증 키
예제 (Example)
리소스 어노테이션 (Resource Annotation):
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
annotations:
notifications.argoproj.io/subscribe.on-deployment-ready.nats: "mytopic"
- ConfigMap
apiVersion: v1
kind: ConfigMap
metadata:
name: argo-rollouts-notification-configmap
data:
service.nats: |
url: "nats://nats:4222"
headers:
my-header: "my-value"
template.deployment-ready: |
message: |
Deployment {{.obj.metadata.name}} is ready!
trigger.on-deployment-ready: |
- when: any(obj.status.conditions, {.type == 'Available' && .status == 'True'})
send: [deployment-ready]
- oncePer: obj.metadata.annotations["generation"]
더 알아보기 (Learn more)
- Argo Rollouts 알림 시스템의 트리거와 템플릿 개념
- 알림 서비스 연동 (Slack, MS Teams, Nats 등)
- 어노테이션 기반 알림 구독 설정
- Nats 인증(NKey, user/password) 구성 방법