diff --git a/charts/applicationset/Chart.yaml b/charts/applicationset/Chart.yaml index b317678..66e26ce 100644 --- a/charts/applicationset/Chart.yaml +++ b/charts/applicationset/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-applicationsets-services description: A HELM Chart for ArgoCD ApplicationSets for Kubernetes type: application -version: &version "0.2.7" +version: &version "0.2.8" appVersion: *version kubeVersion: ">= 1.23" home: https://github.com/saidsef/argocd-applicationsets-services @@ -23,7 +23,7 @@ sources: annotations: artifacthub.io/license: "Apache-2.0" artifacthub.io/changes: | - - Update docs version + - Add slack notification annotations for applications artifacthub.io/links: | - name: README url: https://raw.githubusercontent.com/saidsef/argocd-applicationsets-services/main/README.md diff --git a/charts/applicationset/README.md b/charts/applicationset/README.md index 32ae450..c978e74 100644 --- a/charts/applicationset/README.md +++ b/charts/applicationset/README.md @@ -1,6 +1,6 @@ # argocd-applicationsets-services -![Version: 0.2.7](https://img.shields.io/badge/Version-0.2.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.7](https://img.shields.io/badge/AppVersion-0.2.7-informational?style=flat-square) +![Version: 0.2.8](https://img.shields.io/badge/Version-0.2.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.8](https://img.shields.io/badge/AppVersion-0.2.8-informational?style=flat-square) A HELM Chart for ArgoCD ApplicationSets for Kubernetes @@ -29,6 +29,7 @@ Kubernetes: `>= 1.23` | label | string | `"preview"` | GitHub label to filter PRs that you want to target | | name | string | `"pr-review"` | ApplicationSet name | | namespace | string | `"argocd"` | Namespace of ArgoCD controller is deployed | +| notificationChannel | string | `"argocd"` | ArgoCD Slack notification channel | | owner | string | `"saidsef"` | GitHub repo Organization / username | | path | string | `"deployment"` | Repository path where deployment files are located | | repos | list | `[{"images":["docker.io/saidsef/node-webserver:{{branch}}"],"name":"node-webserver"},{"name":"alpine-jenkins-dockerfile","path":"deployment/preview"},{"images":["docker.io/saidsef/aws-kinesis-local:{{branch}}"],"name":"aws-kinesis-local"},{"images":["docker.io/saidsef/aws-dynamodb-local:{{branch}}"],"name":"aws-dynamodb-local"},{"name":"tika-document-to-text","path":"deployment/preview"}]` | List of repo names and override images for preview environment to dynamically pass the branch of the pull request head use '{{branch}}' variable see: https://argocd-applicationset.readthedocs.io/en/stable/Generators-Pull-Request/#template | diff --git a/charts/applicationset/templates/applicationsets-pr.yml b/charts/applicationset/templates/applicationsets-pr.yml index bd637bd..f898a7e 100644 --- a/charts/applicationset/templates/applicationsets-pr.yml +++ b/charts/applicationset/templates/applicationsets-pr.yml @@ -10,6 +10,7 @@ {{- $dqb := "}}" -}} {{- $server := .Values.server | squote -}} {{- $kustomizeEnabled := .Values.kustomize.enabled | default false -}} +{{- $notificationChannel := .Values.notificationChannel -}} {{- range $repo := .Values.repos }} --- @@ -44,7 +45,12 @@ spec: metadata: name: '{{ $repo.name }}-{{ $dqf }}branch{{ $dqb }}-{{ $dqf }}number{{ $dqb }}' annotations: + argocd.argoproj.io/application-set-refresh: "true" argocd.argoproj.io/head: '{{ $dqf }}head_sha{{ $dqb }}' + notifications.argoproj.io/subscribe.on-deleted.slack: '{{ $notificationChannel }}' + notifications.argoproj.io/subscribe.on-deployed.slack: '{{ $notificationChannel }}' + notifications.argoproj.io/subscribe.on-health-degraded.slack: '{{ $notificationChannel }}' + notifications.argoproj.io/subscribe.on-sync-failed.slack: '{{ $notificationChannel }}' finalizers: - resources-finalizer.argocd.argoproj.io spec: diff --git a/charts/applicationset/values.yaml b/charts/applicationset/values.yaml index c5a6aa8..3474f0c 100644 --- a/charts/applicationset/values.yaml +++ b/charts/applicationset/values.yaml @@ -41,6 +41,9 @@ requeueAfterSeconds: 500 # -- ArgoCD server address server: 'https://kubernetes.default.svc' +# -- ArgoCD Slack notification channel +notificationChannel: 'argocd' + # -- Should kustomize be enabled kustomize: enabled: true