Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

on-deployed will be triggered when app.status.health.status is 'Progressing' #353

Open
wayttjl opened this issue Oct 25, 2021 Discussed in #352 · 0 comments
Open

on-deployed will be triggered when app.status.health.status is 'Progressing' #353

wayttjl opened this issue Oct 25, 2021 Discussed in #352 · 0 comments

Comments

@wayttjl
Copy link

wayttjl commented Oct 25, 2021

Discussed in #352

Originally posted by wayttjl October 25, 2021
On-deployed will be triggered when app.status.health.status is 'Progressing'
Here below is our on-deployed trigger:

  trigger.on-deployed: |
    - description: Application is synced and healthy. Triggered once per commit.
      oncePer: app.metadata.annotations["imageversion"]
      send:
      - app-deployed
      when: app.status.operationState.phase in ['Succeeded'] and time.Now().Sub(time.Parse(app.status.operationState.startedAt)).Minutes() >= 2 and app.status.health.status == 'Healthy'

And our application's configuration looks like this:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  annotations:
    notifications.argoproj.io/subscribe.on-deployed.jenkins-ok: ""
    notifications.argoproj.io/subscribe.on-sync-failed.jenkins-ng: ""
    notifications.argoproj.io/subscribe.on-health-degraded.jenkins-ng: ""
    imageversion: DEV-0.1.144-SNAPSHOT-87d3cb2
  name: service-sample
  namespace: argocd
  finalizers:
  - resources-finalizer.argocd.argoproj.io
spec:
  destination:
    namespace: default
    server: https://kubernetes.default.svc
  syncPolicy:
    syncOptions:
      - CreateNamespace=true
    automated:
      prune: true
      allowEmpty: true
      selfHeal: true
  project: business-apps
  source:
    path: stable/sample-service
    repoURL: ssh://git@myGitlab:10022/helm-charts.git
    targetRevision: HEAD
    helm:
      values: |
        logGroupName: /aws/eks/NTR-CSI-DEV-eks/app

In my case,after the app's sync succeeded,on the argocd web console the app.status.operationState.phase was 'Succeeded',and app.status.health.status was 'Progressing',but the on-deployed still has been triggered.
It seems that the trigger's configuration did not work as our expected.

My environment:
EKS:1.21
Argocd:quay.io/argoproj/argocd:v2.1.5
Argocd notification:argocd-notifications:v1.1.0

I don't know whether I made wrong configuration somewhere

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant