Argo CD Notifications install

参考

https://argocd-notifications.readthedocs.io/en/latest/

使用helm3

创建 values.yaml文件

argocdUrl: https://argocd.example.com

notifiers:
  service.email.gmail: |
    username: $email-username
    password: $email-password
    host: smtp.gmail.com
    port: 465
    from: $email-username

secret:
  items:
    email-username: <your-username>
    email-password: <your-password>

templates:
  template.app-deployed: |
    email:
      subject: New version of an application {{.app.metadata.name}} is up and running.
    message: |
      {{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} is now running new version of deployments manifests.
triggers:
  trigger.on-deployed: |
    - description: Application is synced and healthy. Triggered once per commit.
      oncePer: app.status.operationState.syncResult.revision
      send:
      - app-deployed
      when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status == 'Healthy'

安装

helm repo add argo https://argoproj.github.io/argo-helm
helm install argo/argocd-notifications --generate-name -n argocd -f values.yaml

安装结束后会得到

这里可以查看pod的 log 方便 debug

主要配置文件在

Send a Message