diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 0d692e43..bef979b8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -22,6 +22,7 @@ body: - argo-rollouts - argo-workflows - argocd-image-updater + - argocd-apps - other validations: required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index b755e584..e3f0c1a8 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -24,6 +24,7 @@ body: - argo-rollouts - argo-workflows - argocd-image-updater + - argocd-apps - other validations: required: true diff --git a/.github/configs/labeler.yaml b/.github/configs/labeler.yaml index b00bd383..acd6f219 100644 --- a/.github/configs/labeler.yaml +++ b/.github/configs/labeler.yaml @@ -12,3 +12,6 @@ argo-workflows: argocd-image-updater: - charts/argocd-image-updater/**/* + +argocd-apps: + - charts/argocd-apps/**/* diff --git a/charts/argocd-apps/Chart.yaml b/charts/argocd-apps/Chart.yaml new file mode 100644 index 00000000..6a3fda06 --- /dev/null +++ b/charts/argocd-apps/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +name: argocd-apps +description: A Helm chart for managing additional Argo CD Applications and Projects +type: application +version: 0.0.1 +home: https://github.com/argoproj/argo-helm +icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png +keywords: + - argoproj + - argocd + - gitops +maintainers: + - name: argoproj + url: https://argoproj.github.io/ +annotations: + artifacthub.io/changes: | + - "[Added]: Add additional Applications and Projects" diff --git a/charts/argocd-apps/README.md b/charts/argocd-apps/README.md new file mode 100644 index 00000000..ea205caa --- /dev/null +++ b/charts/argocd-apps/README.md @@ -0,0 +1,31 @@ +# argocd-apps + +A Helm chart for managing additional Argo CD Applications and Projects + +To regenerate this document, from the root of this chart directory run: +```shell +docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest +``` + +## Prerequisites + +- Helm v3.0.0+ +- CRDs (Application and AppProject) + - You need to install them via [argo-cd Helm chart](../argo-cd) or upstream. + +## Installation + +```console +$ helm repo add argo https://argoproj.github.io/argo-helm +$ helm install my-release argo/argocd-apps +``` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| applications | list | `[]` (See [values.yaml]) | Deploy Argo CD Applications within this helm release | +| projects | list | `[]` (See [values.yaml]) | Deploy Argo CD Projects within this helm release | + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) diff --git a/charts/argocd-apps/README.md.gotmpl b/charts/argocd-apps/README.md.gotmpl new file mode 100644 index 00000000..8d628693 --- /dev/null +++ b/charts/argocd-apps/README.md.gotmpl @@ -0,0 +1,26 @@ +{{ template "chart.header" . }} + +{{ template "chart.description" . }} + +To regenerate this document, from the root of this chart directory run: +```shell +docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest +``` + +## Prerequisites + +- Helm v3.0.0+ +- CRDs (Application and AppProject) + - You need to install them via [argo-cd Helm chart](../argo-cd) or upstream. + +## Installation + +```console +$ helm repo add argo https://argoproj.github.io/argo-helm +$ helm install my-release argo/argocd-apps +``` + +{{ template "chart.valuesSection" . }} + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) diff --git a/charts/argocd-apps/ci/default-values.yaml b/charts/argocd-apps/ci/default-values.yaml new file mode 100644 index 00000000..507f1e54 --- /dev/null +++ b/charts/argocd-apps/ci/default-values.yaml @@ -0,0 +1 @@ +# Test with default values diff --git a/charts/argocd-apps/templates/applications.yaml b/charts/argocd-apps/templates/applications.yaml new file mode 100644 index 00000000..ea63fc25 --- /dev/null +++ b/charts/argocd-apps/templates/applications.yaml @@ -0,0 +1,42 @@ +{{- range .Values.applications }} +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + {{- with .additionalAnnotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} + {{- with .additionalLabels }} + labels: + {{- toYaml . | nindent 4 }} + {{- end }} + name: {{ .name }} + {{- with .namespace }} + namespace: {{ . }} + {{- end }} + {{- with .finalizers }} + finalizers: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + project: {{ tpl .project $ }} + source: + {{- toYaml .source | nindent 4 }} + destination: + {{- toYaml .destination | nindent 4 }} + {{- with .syncPolicy }} + syncPolicy: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .ignoreDifferences }} + ignoreDifferences: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .info }} + info: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/argocd-apps/templates/projects.yaml b/charts/argocd-apps/templates/projects.yaml new file mode 100644 index 00000000..5832810b --- /dev/null +++ b/charts/argocd-apps/templates/projects.yaml @@ -0,0 +1,62 @@ +{{- range .Values.projects }} +--- +apiVersion: argoproj.io/v1alpha1 +kind: AppProject +metadata: + {{- with .additionalAnnotations }} + annotations: + {{- range $key, $value := . }} + {{ $key }}: {{ $value | quote }} + {{- end }} + {{- end }} + {{- with .additionalLabels }} + labels: + {{- toYaml . | nindent 4 }} + {{- end }} + name: {{ .name }} + {{- with .namespace }} + namespace: {{ . }} + {{- end }} + {{- with .finalizers }} + finalizers: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + description: {{ .description }} + sourceRepos: + {{- toYaml .sourceRepos | nindent 4 }} + destinations: + {{- toYaml .destinations | nindent 4 }} + {{- with .clusterResourceWhitelist }} + clusterResourceWhitelist: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .clusterResourceBlacklist }} + clusterResourceBlacklist: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .namespaceResourceBlacklist }} + namespaceResourceBlacklist: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .namespaceResourceWhitelist }} + namespaceResourceWhitelist: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .orphanedResources }} + orphanedResources: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .roles }} + roles: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .syncWindows }} + syncWindows: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .signatureKeys }} + signatureKeys: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/argocd-apps/values.yaml b/charts/argocd-apps/values.yaml new file mode 100644 index 00000000..ec3cbb41 --- /dev/null +++ b/charts/argocd-apps/values.yaml @@ -0,0 +1,76 @@ +# -- Deploy Argo CD Applications within this helm release +# @default -- `[]` (See [values.yaml]) +## Ref: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/ +applications: [] +# - name: guestbook +# namespace: argocd +# additionalLabels: {} +# additionalAnnotations: {} +# finalizers: +# - resources-finalizer.argocd.argoproj.io +# project: guestbook +# source: +# repoURL: https://github.com/argoproj/argocd-example-apps.git +# targetRevision: HEAD +# path: guestbook +# directory: +# recurse: true +# destination: +# server: https://kubernetes.default.svc +# namespace: guestbook +# syncPolicy: +# automated: +# prune: false +# selfHeal: false +# ignoreDifferences: +# - group: apps +# kind: Deployment +# jsonPointers: +# - /spec/replicas +# info: +# - name: url +# value: https://argoproj.github.io/ + +# -- Deploy Argo CD Projects within this helm release +# @default -- `[]` (See [values.yaml]) +## Ref: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/ +projects: [] +# - name: guestbook +# namespace: argocd +# additionalLabels: {} +# additionalAnnotations: {} +# finalizers: +# - resources-finalizer.argocd.argoproj.io +# description: Example Project +# sourceRepos: +# - '*' +# destinations: +# - namespace: guestbook +# server: https://kubernetes.default.svc +# clusterResourceWhitelist: [] +# clusterResourceBlacklist: [] +# namespaceResourceBlacklist: +# - group: '' +# kind: ResourceQuota +# - group: '' +# kind: LimitRange +# - group: '' +# kind: NetworkPolicy +# orphanedResources: {} +# roles: [] +# namespaceResourceWhitelist: +# - group: 'apps' +# kind: Deployment +# - group: 'apps' +# kind: StatefulSet +# orphanedResources: {} +# roles: [] +# syncWindows: +# - kind: allow +# schedule: '10 1 * * *' +# duration: 1h +# applications: +# - '*-prod' +# manualSync: true +# signatureKeys: +# - keyID: ABCDEF1234567890