From 070ca66a5ce7aee148df30b6538fbe150d6bbd4c Mon Sep 17 00:00:00 2001
From: Lucas Bickel <116588+hairmare@users.noreply.github.com>
Date: Wed, 10 Nov 2021 11:40:01 +0100
Subject: [PATCH] docs: initialise Argo CD app of apps documentation (#427)

* split -app charts into their own section
* add initial Argo CD App-of-apps documentation
---
 README.md                                  | 63 +++++++++++++---------
 docs/README.md                             |  1 +
 docs/argocd-app-of-apps.md                 | 32 +++++++++++
 hack/config/update-readme/README.md.gotmpl | 29 ++++++++--
 4 files changed, 94 insertions(+), 31 deletions(-)
 create mode 100644 docs/argocd-app-of-apps.md

diff --git a/README.md b/README.md
index b499fc18c..47093390f 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ helm repo add adfinis https://charts.adfinis.com
 ```
 
 ### Available Helm charts
-#### [cert-manager-issuers](charts/cert-manager-issuers)
+#### [cert-manager-issuers](charts/cert-manager-issuers) chart
 
 ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 1.x](https://img.shields.io/badge/app%20version-1.x-brightgreen)
 
@@ -24,34 +24,45 @@ Configure cert-manager Issuers and ClusterIssuers via Helm
 
 [<img alt="cert-manager-issuers" src="https://raw.githubusercontent.com/adfinis-sygroup/helm-charts/master/charts/cert-manager-issuers/logo.png" width="128">](charts/cert-manager-issuers)
 
-#### more charts
+#### Argo CD app-of-apps charts
+
+Our [Argo CD](https://argoproj.github.io/cd/) app-of-apps Helm charts all implement the [Argo CD app-of-apps pattern](https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-bootstrapping/#app-of-apps-pattern).
+The charts deploy Argo CD Application resources and enable configuring multiple related or "work well together" apps.
+To do this they combine Helm repository URLs with chart names and "tested" versions of the charts. In most cases some
+examples of how to configure individual apps are also provided. Please reference [our app-of-apps documentation](./docs/argocd-app-of-apps.md)
+for more in-depth information.
 
 | Chart | Description | Version |
 | ----- | ----------- | ------- |
-| [argoconfig](charts/argoconfig) | Configure Argo CD AppProjects and Applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
-| [azure-apps](charts/azure-apps) | Argo CD app-of-apps config for Azure applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [back8sup](charts/back8sup) | Deploy back8sup to a Kubernetes Cluster | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [backup-apps](charts/backup-apps) | Argo CD app-of-apps config for backup components | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [barman](charts/barman) | Chart for Barman PostgreSQL Backup and Recovery Manager | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 2.1.x](https://img.shields.io/badge/app%20version-2.1.x-brightgreen) |
-| [caasperli](charts/caasperli) | Deploy Caasperli to a Kubernetes Cluster | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: latest](https://img.shields.io/badge/app%20version-latest-brightgreen) |
-| [cert-manager-monitoring](charts/cert-manager-monitoring) | Monitor cert-manager with cert-manager-mixin. | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
-| [common](charts/common) | Common chartbuilding components and helpers, based on incubator/common | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [csi-secret-provider-class](charts/csi-secret-provider-class) | A Helm chart to create a SecretProviderClass resource | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [customer-center](charts/customer-center) | Chart for Customer-Center application | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 2.1.x](https://img.shields.io/badge/app%20version-2.1.x-brightgreen) |
-| [huawei-csi-plugin](charts/huawei-csi-plugin) | Deploy the Huawei CSI plugin | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 2.2.x](https://img.shields.io/badge/app%20version-2.2.x-brightgreen) |
-| [infra-apps](charts/infra-apps) | Argo CD app-of-apps config for infrastructure components | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [logging-apps](charts/logging-apps) | Argo CD app-of-apps config for logging applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [misc-apps](charts/misc-apps) | Argo CD app-of-apps config for miscellaneous small tools | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [openshift-etcd-backup](charts/openshift-etcd-backup) | Chart for openshift-etcd-backup solution | ![Version: 1.5.x](https://img.shields.io/badge/version-1.5.x-brightgreen) ![App version: 1.5.x](https://img.shields.io/badge/app%20version-1.5.x-brightgreen) |
-| [osschallenge](charts/osschallenge) | Chart for OSS-Challenge application | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: ed.x](https://img.shields.io/badge/app%20version-ed.x-brightgreen) |
-| [rmd](charts/rmd) | Chart for Rmd.io application | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: ed.x](https://img.shields.io/badge/app%20version-ed.x-brightgreen) |
-| [security-apps](charts/security-apps) | Argo CD app-of-apps config for security applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [sentry-apps](charts/sentry-apps) | Sentry on premise | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 5.1.x](https://img.shields.io/badge/app%20version-5.1.x-brightgreen) |
-| [storage-apps](charts/storage-apps) | Argo CD app-of-apps config for storage applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [timed](charts/timed) | Chart for Timed application | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 1.3.x](https://img.shields.io/badge/app%20version-1.3.x-brightgreen) |
-| [tracing-apps](charts/tracing-apps) | Argo CD app-of-apps config for tracing applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [vault-auth](charts/vault-auth) | A helm chart to install the vault-auth serviceaccount for enabling vault's ku... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
-| [vault-monitoring](charts/vault-monitoring) | monitor your vault server from within Kubernetes' prometheus | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
+| [azure-apps](charts/azure-apps) | Argo CD app-of-apps config for Azure applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
+| [backup-apps](charts/backup-apps) | Argo CD app-of-apps config for backup components | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
+| [infra-apps](charts/infra-apps) | Argo CD app-of-apps config for infrastructure components | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
+| [logging-apps](charts/logging-apps) | Argo CD app-of-apps config for logging applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
+| [misc-apps](charts/misc-apps) | Argo CD app-of-apps config for miscellaneous small tools | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
+| [security-apps](charts/security-apps) | Argo CD app-of-apps config for security applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
+| [sentry-apps](charts/sentry-apps) | Sentry on premise | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
+| [storage-apps](charts/storage-apps) | Argo CD app-of-apps config for storage applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
+| [tracing-apps](charts/tracing-apps) | Argo CD app-of-apps config for tracing applications | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |
+
+#### more charts
+
+| Chart | Description | Version | App Version |
+| ----- | ----------- | ------- | ----------- |
+| [argoconfig](charts/argoconfig) | Configure Argo CD AppProjects an... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  |
+| [back8sup](charts/back8sup) | Deploy back8sup to a Kubernetes ... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
+| [barman](charts/barman) | Chart for Barman PostgreSQL Back... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: 2.1.x](https://img.shields.io/badge/app%20version-2.1.x-brightgreen) |
+| [caasperli](charts/caasperli) | Deploy Caasperli to a Kubernetes... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: latest](https://img.shields.io/badge/app%20version-latest-brightgreen) |
+| [cert-manager-monitoring](charts/cert-manager-monitoring) | Monitor cert-manager with cert-m... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  |
+| [common](charts/common) | Common chartbuilding components ... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
+| [csi-secret-provider-class](charts/csi-secret-provider-class) | A Helm chart to create a SecretP... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
+| [customer-center](charts/customer-center) | Chart for Customer-Center applic... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: 2.1.x](https://img.shields.io/badge/app%20version-2.1.x-brightgreen) |
+| [huawei-csi-plugin](charts/huawei-csi-plugin) | Deploy the Huawei CSI plugin | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: 2.2.x](https://img.shields.io/badge/app%20version-2.2.x-brightgreen) |
+| [openshift-etcd-backup](charts/openshift-etcd-backup) | Chart for openshift-etcd-backup ... | ![Version: 1.5.x](https://img.shields.io/badge/version-1.5.x-brightgreen) |  ![App version: 1.5.x](https://img.shields.io/badge/app%20version-1.5.x-brightgreen) |
+| [osschallenge](charts/osschallenge) | Chart for OSS-Challenge application | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: ed.x](https://img.shields.io/badge/app%20version-ed.x-brightgreen) |
+| [rmd](charts/rmd) | Chart for Rmd.io application | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: ed.x](https://img.shields.io/badge/app%20version-ed.x-brightgreen) |
+| [timed](charts/timed) | Chart for Timed application | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: 1.3.x](https://img.shields.io/badge/app%20version-1.3.x-brightgreen) |
+| [vault-auth](charts/vault-auth) | A helm chart to install the vaul... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
+| [vault-monitoring](charts/vault-monitoring) | monitor your vault server from w... | ![Version: 0.x](https://img.shields.io/badge/version-0.x-brightgreen) |  ![App version: 0.x](https://img.shields.io/badge/app%20version-0.x-brightgreen) |
 
 ## Contributing
 
diff --git a/docs/README.md b/docs/README.md
index 7fe992147..7abad7a77 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -2,3 +2,4 @@
 
 * [Development](./development.md)
 * [Documentation](./documentation.md)
+* [Argo CD app-of-apps](./argocd-app-of-apps.md)
diff --git a/docs/argocd-app-of-apps.md b/docs/argocd-app-of-apps.md
new file mode 100644
index 000000000..f90494466
--- /dev/null
+++ b/docs/argocd-app-of-apps.md
@@ -0,0 +1,32 @@
+# ArgoCD App-of-Apps
+
+Our [Argo CD](https://argoproj.github.io/cd/) app-of-apps Helm charts all implement the [Argo CD app-of-apps pattern](https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-bootstrapping/#app-of-apps-pattern).
+The charts deploy Argo CD Application resources and enable configuring multiple related or "work well together" apps.
+
+They do not deploy any applications directly, rather they configure Argo CD which then does the actually deployment.
+
+## Motivation
+
+In the beginning we used Helm charts without Argo CD. Helm charts offer a great amount of abstraction when it comes to
+deploying an individual app but we ended up using Argo CD to make it possible to continuously track changes Deployments
+after CI had run Helm. There are some key facts about Helm charts that we noticed make sense to centrally manage.
+- Chart sources (where we get our charts from, repo URLs and chart names)
+- Chart versions
+
+Our Argo CD app-of-apps charts currently provide these infos in machine deployable, individually overridable bundles. One
+might consider them a curated collection of charts from multiple sources.
+
+## Charts
+
+All of our Argo CD app-of-apps charts have a name that is suffixed with `-apps`. A list of them is available from the
+[main README](https://github.com/hairmare/helm-charts/blob/docs/app-of-apps/README.md#argo-cd-app-of-apps-charts).
+
+For the most part the charts are thematically grouped. The exception being our `infra-apps` chart which contains apps
+we consider valuable on most clusters. As with all the charts, `infra-apps` can contain some parts that are optional
+depending on your exact situation, for example on Red Hat OpenShift you would typically not deploy the bundled ingress
+component.
+
+## Further Info
+
+For now, these charts may be seen as an alternative to Argo CD ApplicationSets, [let us know](https://github.com/adfinis-sygroup/helm-charts/discussions)
+if you would like for the charts to directly support ApplicationSets.
diff --git a/hack/config/update-readme/README.md.gotmpl b/hack/config/update-readme/README.md.gotmpl
index 46947d786..9a8696a41 100644
--- a/hack/config/update-readme/README.md.gotmpl
+++ b/hack/config/update-readme/README.md.gotmpl
@@ -42,8 +42,8 @@ helm repo add adfinis https://charts.adfinis.com
 {{- range (file.ReadDir "charts/" | sort) -}}
 {{- $chartManifestPath := print "charts/" . "/Chart.yaml" -}}
 {{- if (file.Exists $chartManifestPath) -}}{{- $chartManifest := file.Read $chartManifestPath | data.YAML -}}
-{{- if and (has $chartManifest "icon") (not (has $chartManifest "deprecated")) }}
-#### [{{.}}]({{ print $readme.chartBaseURL . }})
+{{- if and (has $chartManifest "icon") (not (hasSuffix $chartManifest.name "-apps")) (not (has $chartManifest "deprecated")) }}
+#### [{{.}}]({{ print $readme.chartBaseURL . }}) chart
 
 ![Version: {{ template "helmcharts.shortVersion" $chartManifest.version }}](https://img.shields.io/badge/version-{{ template "helmcharts.shortVersion" $chartManifest.version }}-brightgreen){{ if has $chartManifest "appVersion" }} ![App version: {{ template "helmcharts.shortVersion" $chartManifest.appVersion }}](https://img.shields.io/badge/app%20version-{{ template "helmcharts.shortVersion" $chartManifest.appVersion }}-brightgreen){{ end }}
 
@@ -54,15 +54,34 @@ helm repo add adfinis https://charts.adfinis.com
 {{- end -}}
 {{- end }}
 
-#### more charts
+#### Argo CD app-of-apps charts
+
+Our [Argo CD](https://argoproj.github.io/cd/) app-of-apps Helm charts all implement the [Argo CD app-of-apps pattern](https://argo-cd.readthedocs.io/en/stable/operator-manual/cluster-bootstrapping/#app-of-apps-pattern).
+The charts deploy Argo CD Application resources and enable configuring multiple related or "work well together" apps.
+To do this they combine Helm repository URLs with chart names and "tested" versions of the charts. In most cases some
+examples of how to configure individual apps are also provided. Please reference [our app-of-apps documentation](./docs/argocd-app-of-apps.md)
+for more in-depth information.
 
 | Chart | Description | Version |
 | ----- | ----------- | ------- |
 {{- range (file.ReadDir "charts/" | sort) -}}
 {{- $chartManifestPath := print "charts/" . "/Chart.yaml" -}}
 {{- if (file.Exists $chartManifestPath) -}}{{- $chartManifest := file.Read $chartManifestPath | data.YAML -}}
-{{- if and (not (has $chartManifest "icon")) (not (has $chartManifest "deprecated")) }}
-| [{{.}}]({{ print $readme.chartBaseURL . }}) | {{ $chartManifest.description | strings.Abbrev 80 }} | ![Version: {{ template "helmcharts.shortVersion" $chartManifest.version }}](https://img.shields.io/badge/version-{{ template "helmcharts.shortVersion" $chartManifest.version }}-brightgreen){{ if has $chartManifest "appVersion" }} ![App version: {{ template "helmcharts.shortVersion" $chartManifest.appVersion }}](https://img.shields.io/badge/app%20version-{{ template "helmcharts.shortVersion" $chartManifest.appVersion }}-brightgreen){{ end }} |
+{{- if and (hasSuffix $chartManifest.name "-apps") (not (has $chartManifest "deprecated")) }}
+| [{{.}}]({{ print $readme.chartBaseURL . }}) | {{ $chartManifest.description | strings.Abbrev 80 }} | ![Version: {{ template "helmcharts.shortVersion" $chartManifest.version }}](https://img.shields.io/badge/version-{{ template "helmcharts.shortVersion" $chartManifest.version }}-brightgreen) |
+{{- end -}}
+{{- end -}}
+{{- end }}
+
+#### more charts
+
+| Chart | Description | Version | App Version |
+| ----- | ----------- | ------- | ----------- |
+{{- range (file.ReadDir "charts/" | sort) -}}
+{{- $chartManifestPath := print "charts/" . "/Chart.yaml" -}}
+{{- if (file.Exists $chartManifestPath) -}}{{- $chartManifest := file.Read $chartManifestPath | data.YAML -}}
+{{- if and (not (has $chartManifest "icon")) (not (hasSuffix $chartManifest.name "-apps")) (not (has $chartManifest "deprecated")) }}
+| [{{.}}]({{ print $readme.chartBaseURL . }}) | {{ $chartManifest.description | strings.Abbrev 35 }} | ![Version: {{ template "helmcharts.shortVersion" $chartManifest.version }}](https://img.shields.io/badge/version-{{ template "helmcharts.shortVersion" $chartManifest.version }}-brightgreen) | {{ if has $chartManifest "appVersion" }} ![App version: {{ template "helmcharts.shortVersion" $chartManifest.appVersion }}](https://img.shields.io/badge/app%20version-{{ template "helmcharts.shortVersion" $chartManifest.appVersion }}-brightgreen){{ end }} |
 {{- end -}}
 {{- end -}}
 {{- end }}