github.com/argoproj/argo-cd/v3@v3.2.1/notifications_catalog/install.yaml (about)

     1  apiVersion: v1
     2  data:
     3    template.app-created: |
     4      email:
     5        subject: Application {{.app.metadata.name}} has been created.
     6      message: Application {{.app.metadata.name}} has been created.
     7      teams:
     8        title: Application {{.app.metadata.name}} has been created.
     9    template.app-deleted: |
    10      email:
    11        subject: Application {{.app.metadata.name}} has been deleted.
    12      message: Application {{.app.metadata.name}} has been deleted.
    13      teams:
    14        title: Application {{.app.metadata.name}} has been deleted.
    15    template.app-deployed: |
    16      email:
    17        subject: New version of an application {{.app.metadata.name}} is up and running.
    18      message: |
    19        {{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} is now running new version of deployments manifests.
    20      slack:
    21        attachments: |
    22          [{
    23            "title": "{{ .app.metadata.name}}",
    24            "title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
    25            "color": "#18be52",
    26            "fields": [
    27            {
    28              "title": "Sync Status",
    29              "value": "{{.app.status.sync.status}}",
    30              "short": true
    31            },
    32            {
    33              "title": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
    34              "value": {{- if .app.spec.source }} ":arrow_heading_up: {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}:arrow_heading_up: {{ $source.repoURL }}{{- end }}" {{- end }},
    35              "short": true
    36            },
    37            {
    38              "title": "Revision",
    39              "value": "{{.app.status.sync.revision}}",
    40              "short": true
    41            }
    42            {{range $index, $c := .app.status.conditions}}
    43            ,
    44            {
    45              "title": "{{$c.type}}",
    46              "value": "{{$c.message}}",
    47              "short": true
    48            }
    49            {{end}}
    50            ]
    51          }]
    52        deliveryPolicy: Post
    53        groupingKey: ""
    54        notifyBroadcast: false
    55      teams:
    56        facts: |
    57          [{
    58            "name": "Sync Status",
    59            "value": "{{.app.status.sync.status}}"
    60          },
    61          {
    62            "name": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
    63            "value": {{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
    64          },
    65          {
    66            "name": "Revision",
    67            "value": "{{.app.status.sync.revision}}"
    68          }
    69          {{range $index, $c := .app.status.conditions}}
    70            ,
    71            {
    72              "name": "{{$c.type}}",
    73              "value": "{{$c.message}}"
    74            }
    75          {{end}}
    76          ]
    77        potentialAction: |
    78          [{
    79            "@type":"OpenUri",
    80            "name":"Operation Application",
    81            "targets":[{
    82              "os":"default",
    83              "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}"
    84            }]
    85          },
    86          {
    87            "@type":"OpenUri",
    88            "name":"Open Repository",
    89            "targets":[{
    90              "os":"default",
    91              "uri":{{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
    92            }]
    93          }]
    94        themeColor: '#000080'
    95        title: New version of an application {{.app.metadata.name}} is up and running.
    96    template.app-health-degraded: |
    97      email:
    98        subject: Application {{.app.metadata.name}} has degraded.
    99      message: |
   100        {{if eq .serviceType "slack"}}:exclamation:{{end}} Application {{.app.metadata.name}} has degraded.
   101        Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.
   102      slack:
   103        attachments: |
   104          [{
   105            "title": "{{ .app.metadata.name}}",
   106            "title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
   107            "color": "#f4c030",
   108            "fields": [
   109            {
   110              "title": "Health Status",
   111              "value": "{{.app.status.health.status}}",
   112              "short": true
   113            },
   114            {
   115              "title": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
   116              "value": {{- if .app.spec.source }} ":arrow_heading_up: {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}:arrow_heading_up: {{ $source.repoURL }}{{- end }}" {{- end }},
   117              "short": true
   118            }
   119            {{range $index, $c := .app.status.conditions}}
   120            ,
   121            {
   122              "title": "{{$c.type}}",
   123              "value": "{{$c.message}}",
   124              "short": true
   125            }
   126            {{end}}
   127            ]
   128          }]
   129        deliveryPolicy: Post
   130        groupingKey: ""
   131        notifyBroadcast: false
   132      teams:
   133        facts: |
   134          [{
   135            "name": "Health Status",
   136            "value": "{{.app.status.health.status}}"
   137          },
   138          {
   139            "name": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
   140            "value": {{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
   141          }
   142          {{range $index, $c := .app.status.conditions}}
   143            ,
   144            {
   145              "name": "{{$c.type}}",
   146              "value": "{{$c.message}}"
   147            }
   148          {{end}}
   149          ]
   150        potentialAction: |
   151          [{
   152            "@type":"OpenUri",
   153            "name":"Open Application",
   154            "targets":[{
   155              "os":"default",
   156              "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}"
   157            }]
   158          },
   159          {
   160            "@type":"OpenUri",
   161            "name":"Open Repository",
   162            "targets":[{
   163              "os":"default",
   164              "uri":{{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
   165            }]
   166          }]
   167        themeColor: '#FF0000'
   168        title: Application {{.app.metadata.name}} has degraded.
   169    template.app-sync-failed: |
   170      email:
   171        subject: Failed to sync application {{.app.metadata.name}}.
   172      message: |
   173        {{if eq .serviceType "slack"}}:exclamation:{{end}}  The sync operation of application {{.app.metadata.name}} has failed at {{.app.status.operationState.finishedAt}} with the following error: {{.app.status.operationState.message}}
   174        Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .
   175      slack:
   176        attachments: |
   177          [{
   178            "title": "{{ .app.metadata.name}}",
   179            "title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
   180            "color": "#E96D76",
   181            "fields": [
   182            {
   183              "title": "Sync Status",
   184              "value": "{{.app.status.sync.status}}",
   185              "short": true
   186            },
   187            {
   188              "title": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
   189              "value": {{- if .app.spec.source }} ":arrow_heading_up: {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}:arrow_heading_up: {{ $source.repoURL }}{{- end }}" {{- end }},
   190              "short": true
   191            }
   192            {{range $index, $c := .app.status.conditions}}
   193            ,
   194            {
   195              "title": "{{$c.type}}",
   196              "value": "{{$c.message}}",
   197              "short": true
   198            }
   199            {{end}}
   200            ]
   201          }]
   202        deliveryPolicy: Post
   203        groupingKey: ""
   204        notifyBroadcast: false
   205      teams:
   206        facts: |
   207          [{
   208            "name": "Sync Status",
   209            "value": "{{.app.status.sync.status}}"
   210          },
   211          {
   212            "name": "Failed at",
   213            "value": "{{.app.status.operationState.finishedAt}}"
   214          },
   215          {
   216            "name": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
   217            "value": {{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
   218          }
   219          {{range $index, $c := .app.status.conditions}}
   220            ,
   221            {
   222              "name": "{{$c.type}}",
   223              "value": "{{$c.message}}"
   224            }
   225          {{end}}
   226          ]
   227        potentialAction: |
   228          [{
   229            "@type":"OpenUri",
   230            "name":"Open Operation",
   231            "targets":[{
   232              "os":"default",
   233              "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true"
   234            }]
   235          },
   236          {
   237            "@type":"OpenUri",
   238            "name":"Open Repository",
   239            "targets":[{
   240              "os":"default",
   241              "uri":{{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}{{ $source.repoURL }}⬆️ {{- end }}" {{- end }}
   242            }]
   243          }]
   244        themeColor: '#FF0000'
   245        title: Failed to sync application {{.app.metadata.name}}.
   246    template.app-sync-running: |
   247      email:
   248        subject: Start syncing application {{.app.metadata.name}}.
   249      message: |
   250        The sync operation of application {{.app.metadata.name}} has started at {{.app.status.operationState.startedAt}}.
   251        Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .
   252      slack:
   253        attachments: |
   254          [{
   255            "title": "{{ .app.metadata.name}}",
   256            "title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
   257            "color": "#0DADEA",
   258            "fields": [
   259            {
   260              "title": "Sync Status",
   261              "value": "{{.app.status.sync.status}}",
   262              "short": true
   263            },
   264            {
   265              "title": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
   266              "value": {{- if .app.spec.source }} ":arrow_heading_up: {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}:arrow_heading_up: {{ $source.repoURL }}{{- end }}" {{- end }},
   267              "short": true
   268            }
   269            {{range $index, $c := .app.status.conditions}}
   270            ,
   271            {
   272              "title": "{{$c.type}}",
   273              "value": "{{$c.message}}",
   274              "short": true
   275            }
   276            {{end}}
   277            ]
   278          }]
   279        deliveryPolicy: Post
   280        groupingKey: ""
   281        notifyBroadcast: false
   282      teams:
   283        facts: |
   284          [{
   285            "name": "Sync Status",
   286            "value": "{{.app.status.sync.status}}"
   287          },
   288          {
   289            "name": "Started at",
   290            "value": "{{.app.status.operationState.startedAt}}"
   291          },
   292          {
   293            "name": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
   294            "value": {{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
   295          }
   296          {{range $index, $c := .app.status.conditions}}
   297            ,
   298            {
   299              "name": "{{$c.type}}",
   300              "value": "{{$c.message}}"
   301            }
   302          {{end}}
   303          ]
   304        potentialAction: |
   305          [{
   306            "@type":"OpenUri",
   307            "name":"Open Operation",
   308            "targets":[{
   309              "os":"default",
   310              "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true"
   311            }]
   312          },
   313          {
   314            "@type":"OpenUri",
   315            "name":"Open Repository",
   316            "targets":[{
   317              "os":"default",
   318              "uri":{{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
   319            }]
   320          }]
   321        title: Start syncing application {{.app.metadata.name}}.
   322    template.app-sync-status-unknown: |
   323      email:
   324        subject: Application {{.app.metadata.name}} sync status is 'Unknown'
   325      message: |
   326        {{if eq .serviceType "slack"}}:exclamation:{{end}} Application {{.app.metadata.name}} sync is 'Unknown'.
   327        Application details: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}.
   328        {{if ne .serviceType "slack"}}
   329        {{range $c := .app.status.conditions}}
   330            * {{$c.message}}
   331        {{end}}
   332        {{end}}
   333      slack:
   334        attachments: |
   335          [{
   336            "title": "{{ .app.metadata.name}}",
   337            "title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
   338            "color": "#E96D76",
   339            "fields": [
   340            {
   341              "title": "Sync Status",
   342              "value": "{{.app.status.sync.status}}",
   343              "short": true
   344            },
   345            {
   346              "title": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
   347              "value": {{- if .app.spec.source }} ":arrow_heading_up: {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}:arrow_heading_up: {{ $source.repoURL }}{{- end }}" {{- end }},
   348              "short": true
   349            }
   350            {{range $index, $c := .app.status.conditions}}
   351            ,
   352            {
   353              "title": "{{$c.type}}",
   354              "value": "{{$c.message}}",
   355              "short": true
   356            }
   357            {{end}}
   358            ]
   359          }]
   360        deliveryPolicy: Post
   361        groupingKey: ""
   362        notifyBroadcast: false
   363      teams:
   364        facts: |
   365          [{
   366            "name": "Sync Status",
   367            "value": "{{.app.status.sync.status}}"
   368          },
   369          {
   370            "name": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
   371            "value": {{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
   372          }
   373          {{range $index, $c := .app.status.conditions}}
   374            ,
   375            {
   376              "name": "{{$c.type}}",
   377              "value": "{{$c.message}}"
   378            }
   379          {{end}}
   380          ]
   381        potentialAction: |
   382          [{
   383            "@type":"OpenUri",
   384            "name":"Open Application",
   385            "targets":[{
   386              "os":"default",
   387              "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}"
   388            }]
   389          },
   390          {
   391            "@type":"OpenUri",
   392            "name":"Open Repository",
   393            "targets":[{
   394              "os":"default",
   395              "uri":{{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
   396            }]
   397          }]
   398        title: Application {{.app.metadata.name}} sync status is 'Unknown'
   399    template.app-sync-succeeded: |
   400      email:
   401        subject: Application {{.app.metadata.name}} has been successfully synced.
   402      message: |
   403        {{if eq .serviceType "slack"}}:white_check_mark:{{end}} Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}.
   404        Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .
   405      slack:
   406        attachments: |
   407          [{
   408            "title": "{{ .app.metadata.name}}",
   409            "title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
   410            "color": "#18be52",
   411            "fields": [
   412            {
   413              "title": "Sync Status",
   414              "value": "{{.app.status.sync.status}}",
   415              "short": true
   416            },
   417            {
   418              "title": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
   419              "value": {{- if .app.spec.source }} ":arrow_heading_up: {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}:arrow_heading_up: {{ $source.repoURL }}{{- end }}" {{- end }},
   420              "short": true
   421            }
   422            {{range $index, $c := .app.status.conditions}}
   423            ,
   424            {
   425              "title": "{{$c.type}}",
   426              "value": "{{$c.message}}",
   427              "short": true
   428            }
   429            {{end}}
   430            ]
   431          }]
   432        deliveryPolicy: Post
   433        groupingKey: ""
   434        notifyBroadcast: false
   435      teams:
   436        facts: |
   437          [{
   438            "name": "Sync Status",
   439            "value": "{{.app.status.sync.status}}"
   440          },
   441          {
   442            "name": "Synced at",
   443            "value": "{{.app.status.operationState.finishedAt}}"
   444          },
   445          {
   446            "name": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
   447            "value": {{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
   448          }
   449          {{range $index, $c := .app.status.conditions}}
   450            ,
   451            {
   452              "name": "{{$c.type}}",
   453              "value": "{{$c.message}}"
   454            }
   455          {{end}}
   456          ]
   457        potentialAction: |
   458          [{
   459            "@type":"OpenUri",
   460            "name":"Operation Details",
   461            "targets":[{
   462              "os":"default",
   463              "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true"
   464            }]
   465          },
   466          {
   467            "@type":"OpenUri",
   468            "name":"Open Repository",
   469            "targets":[{
   470              "os":"default",
   471              "uri":{{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
   472            }]
   473          }]
   474        themeColor: '#000080'
   475        title: Application {{.app.metadata.name}} has been successfully synced
   476    trigger.on-created: |
   477      - description: Application is created.
   478        oncePer: app.metadata.name
   479        send:
   480        - app-created
   481        when: "true"
   482    trigger.on-deleted: |
   483      - description: Application is deleted.
   484        oncePer: app.metadata.name
   485        send:
   486        - app-deleted
   487        when: app.metadata.deletionTimestamp != nil
   488    trigger.on-deployed: |
   489      - description: Application is synced and healthy. Triggered once per commit.
   490        oncePer: app.status.operationState?.syncResult?.revision
   491        send:
   492        - app-deployed
   493        when: app.status.operationState != nil and app.status.operationState.phase in ['Succeeded']
   494          and app.status.health.status == 'Healthy' and (!time.Parse(app.status.health.lastTransitionTime).Add(1
   495          * time.Minute).Before(time.Parse(app.status.operationState.finishedAt)) or time.Parse(app.status.health.lastTransitionTime).Before(time.Parse(app.status.operationState.startedAt)))
   496    trigger.on-health-degraded: |
   497      - description: Application has degraded
   498        oncePer: app.status.operationState?.syncResult?.revision
   499        send:
   500        - app-health-degraded
   501        when: app.status.health.status == 'Degraded'
   502    trigger.on-sync-failed: |
   503      - description: Application syncing has failed
   504        oncePer: app.status.operationState?.syncResult?.revision
   505        send:
   506        - app-sync-failed
   507        when: app.status.operationState != nil and app.status.operationState.phase in ['Error',
   508          'Failed']
   509    trigger.on-sync-running: |
   510      - description: Application is being synced
   511        oncePer: app.status.operationState?.syncResult?.revision
   512        send:
   513        - app-sync-running
   514        when: app.status.operationState != nil and app.status.operationState.phase in ['Running']
   515    trigger.on-sync-status-unknown: |
   516      - description: Application status is 'Unknown'
   517        oncePer: app.status.operationState?.syncResult?.revision
   518        send:
   519        - app-sync-status-unknown
   520        when: app.status.sync.status == 'Unknown'
   521    trigger.on-sync-succeeded: |
   522      - description: Application syncing has succeeded
   523        oncePer: app.status.operationState?.syncResult?.revision
   524        send:
   525        - app-sync-succeeded
   526        when: app.status.operationState != nil and app.status.operationState.phase in ['Succeeded']
   527  kind: ConfigMap
   528  metadata:
   529    name: argocd-notifications-cm