From 752e1c058041de9b1fc8a19486daff19ce8b3eb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20B=C3=A4hler?= Date: Mon, 24 Jan 2022 20:18:51 +0100 Subject: [PATCH] feat(all): Add Documentation Guidelines (#1099) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(all): Add Documentation Guidelines Signed-off-by: Oliver Bähler * Satisfy Linter Signed-off-by: Oliver Bähler * Apply changes from code review Signed-off-by: Marco Kilchhofer * fix: Also add *.gotmpl to argo-rollouts/.helmignore Signed-off-by: Marco Kilchhofer Co-authored-by: Marco Kilchhofer --- .github/pull_request_template.md | 1 + CONTRIBUTING.md | 14 ++++++++++++++ charts/argo-cd/.helmignore | 2 +- charts/argo-cd/Chart.yaml | 4 ++-- charts/argo-events/.helmignore | 2 +- charts/argo-events/Chart.yaml | 4 ++-- charts/argo-rollouts/.helmignore | 1 + charts/argo-rollouts/Chart.yaml | 4 ++-- charts/argo-workflows/.helmignore | 1 + charts/argo-workflows/Chart.yaml | 4 ++-- charts/argocd-applicationset/.helmignore | 1 + charts/argocd-applicationset/Chart.yaml | 4 ++-- charts/argocd-image-updater/.helmignore | 2 ++ charts/argocd-image-updater/Chart.yaml | 4 ++-- charts/argocd-image-updater/README.md | 2 +- charts/argocd-image-updater/README.md.gotmpl | 3 ++- charts/argocd-notifications/.helmignore | 2 ++ charts/argocd-notifications/Chart.yaml | 4 ++-- scripts/helm-docs.sh | 11 +++++++++++ 19 files changed, 52 insertions(+), 18 deletions(-) create mode 100644 scripts/helm-docs.sh diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f614c199..67fb9833 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,6 +5,7 @@ If the DCO action in the integration test fails, one or more of your commits are Checklist: * [ ] I have bumped the chart version according to [versioning](https://github.com/argoproj/argo-helm/blob/master/CONTRIBUTING.md#versioning) +* [ ] I have updated the documentation according to [documentation](https://github.com/argoproj/argo-helm/blob/master/CONTRIBUTING.md#documentation) * [ ] I have updated the chart changelog with all the changes that come with this pull request according to [changelog](https://github.com/argoproj/argo-helm/blob/master/CONTRIBUTING.md#changelog). * [ ] Any new values are backwards compatible and/or have sensible default. * [ ] I have signed off all my commits as required by [DCO](https://github.com/argoproj/argoproj/tree/master/community#contributing-to-argo). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3d6e1782..c7ea64e7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,6 +48,20 @@ annotations: - "[Security]": Some Security Patch was included" ``` +## Documentation + +The documentation for each chart is done with [helm-docs](https://github.com/norwoodj/helm-docs). This way we can ensure that values are consistent with the chart documentation. + +We have a script on the repository which will execute the helm-docs docker container, so that you don't have to worry about downloading the binary etc. Simply execute the script (Bash compatible, might require sudo privileges): + +``` +bash scripts/helm-docs.sh +``` + +**NOTE**: When creating your own `README.md.gotmpl`, don't forget to add it to your `.helmignore` file. + + + # Testing ## Testing Argo Workflows Changes diff --git a/charts/argo-cd/.helmignore b/charts/argo-cd/.helmignore index eec606dc..3a063296 100644 --- a/charts/argo-cd/.helmignore +++ b/charts/argo-cd/.helmignore @@ -1,4 +1,4 @@ /*.tgz output ci/ -README.md.gotmpl +*.gotmpl diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 68477c27..a1b013c3 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: v2.2.2 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.31.0 +version: 3.31.1 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Added]: Add support for extra K8s manifests" + - "[Changed]: Consistent .helmignore" diff --git a/charts/argo-events/.helmignore b/charts/argo-events/.helmignore index a9f0b031..ec59d66d 100644 --- a/charts/argo-events/.helmignore +++ b/charts/argo-events/.helmignore @@ -20,4 +20,4 @@ .idea/ *.tmproj ci/ -README.md.gotmpl +*.gotmpl diff --git a/charts/argo-events/Chart.yaml b/charts/argo-events/Chart.yaml index cdb0d503..a1ccf6bd 100644 --- a/charts/argo-events/Chart.yaml +++ b/charts/argo-events/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: A Helm chart to install Argo-Events in k8s Cluster name: argo-events -version: 1.10.1 +version: 1.10.2 keywords: - argo-events - sensor-controller @@ -17,4 +17,4 @@ icon: https://argoproj.github.io/argo-events/assets/logo.png home: https://github.com/argoproj/argo-helm annotations: artifacthub.io/changes: | - - "[Changed]: Update to Argo Events v1.5.6" + - "[Changed]: Consistent .helmignore" diff --git a/charts/argo-rollouts/.helmignore b/charts/argo-rollouts/.helmignore index b4af6c20..ec59d66d 100644 --- a/charts/argo-rollouts/.helmignore +++ b/charts/argo-rollouts/.helmignore @@ -20,3 +20,4 @@ .idea/ *.tmproj ci/ +*.gotmpl diff --git a/charts/argo-rollouts/Chart.yaml b/charts/argo-rollouts/Chart.yaml index 9fe46cc3..fdc8b94d 100644 --- a/charts/argo-rollouts/Chart.yaml +++ b/charts/argo-rollouts/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "v1.1.1" description: A Helm chart for Argo Rollouts name: argo-rollouts -version: 2.9.1 +version: 2.9.2 icon: https://argoproj.github.io/argo-rollouts/assets/logo.png home: https://github.com/argoproj/argo-helm maintainers: @@ -11,4 +11,4 @@ maintainers: - name: jessesuen annotations: artifacthub.io/changes: | - - "[Fixed]: Dashboard ingress service name" + - "[Changed]: Consistent .helmignore" diff --git a/charts/argo-workflows/.helmignore b/charts/argo-workflows/.helmignore index b4af6c20..ec59d66d 100644 --- a/charts/argo-workflows/.helmignore +++ b/charts/argo-workflows/.helmignore @@ -20,3 +20,4 @@ .idea/ *.tmproj ci/ +*.gotmpl diff --git a/charts/argo-workflows/Chart.yaml b/charts/argo-workflows/Chart.yaml index 74f552ef..0b737f9d 100644 --- a/charts/argo-workflows/Chart.yaml +++ b/charts/argo-workflows/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argo-workflows description: A Helm chart for Argo Workflows type: application -version: 0.9.4 +version: 0.9.5 appVersion: v3.2.6 icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png home: https://github.com/argoproj/argo-helm @@ -15,4 +15,4 @@ maintainers: - name: benjaminws annotations: artifacthub.io/changes: | - - "[Changed]: Update to app version v3.2.6" + - "[Changed]: Consistent .helmignore" diff --git a/charts/argocd-applicationset/.helmignore b/charts/argocd-applicationset/.helmignore index 5bdaa3eb..ee9c40f0 100644 --- a/charts/argocd-applicationset/.helmignore +++ b/charts/argocd-applicationset/.helmignore @@ -22,3 +22,4 @@ *.tmproj .vscode/ ci/ +*.gotmpl diff --git a/charts/argocd-applicationset/Chart.yaml b/charts/argocd-applicationset/Chart.yaml index 68f2b3b1..51ebf64b 100644 --- a/charts/argocd-applicationset/Chart.yaml +++ b/charts/argocd-applicationset/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-applicationset description: A Helm chart for installing ArgoCD ApplicationSet type: application -version: 1.9.0 +version: 1.9.1 appVersion: "v0.3.0" home: https://github.com/argoproj/argo-helm icon: https://argocd-applicationset.readthedocs.io/en/stable/assets/logo.png @@ -14,4 +14,4 @@ maintainers: - name: maruina annotations: artifacthub.io/changes: | - - "[Added]: Add ingress for webhook, not enabled by default." + - "[Changed]: Consistent .helmignore" diff --git a/charts/argocd-image-updater/.helmignore b/charts/argocd-image-updater/.helmignore index 0e8a0eb3..ee9c40f0 100644 --- a/charts/argocd-image-updater/.helmignore +++ b/charts/argocd-image-updater/.helmignore @@ -21,3 +21,5 @@ .idea/ *.tmproj .vscode/ +ci/ +*.gotmpl diff --git a/charts/argocd-image-updater/Chart.yaml b/charts/argocd-image-updater/Chart.yaml index 5c90d48b..0ace5a49 100644 --- a/charts/argocd-image-updater/Chart.yaml +++ b/charts/argocd-image-updater/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: argocd-image-updater description: A Helm chart for Argo CD Image Updater, a tool to automatically update the container images of Kubernetes workloads which are managed by Argo CD type: application -version: 0.6.1 +version: 0.6.2 appVersion: v0.11.2 home: https://github.com/argoproj-labs/argocd-image-updater icon: https://argocd-image-updater.readthedocs.io/en/stable/assets/logo.png @@ -15,4 +15,4 @@ maintainers: url: https://argoproj.github.io/ annotations: artifacthub.io/changes: | - - "[Changed]: Update to app version v0.11.2" + - "[Changed]: Consistent .helmignore" diff --git a/charts/argocd-image-updater/README.md b/charts/argocd-image-updater/README.md index e1223139..0f246edd 100644 --- a/charts/argocd-image-updater/README.md +++ b/charts/argocd-image-updater/README.md @@ -105,7 +105,7 @@ The `config.registries` value can be used exactly as it looks in the documentati | tolerations | list | `[]` | Kubernetes toleration settings for the deployment | ---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0) +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) [MetricRelabelConfigs]: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs [RelabelConfigs]: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config diff --git a/charts/argocd-image-updater/README.md.gotmpl b/charts/argocd-image-updater/README.md.gotmpl index afefdafe..7e39f7a6 100644 --- a/charts/argocd-image-updater/README.md.gotmpl +++ b/charts/argocd-image-updater/README.md.gotmpl @@ -57,7 +57,8 @@ The `config.registries` value can be used exactly as it looks in the documentati {{ template "chart.valuesSection" . }} -{{ template "helm-docs.versionFooter" . }} +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) [MetricRelabelConfigs]: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs [RelabelConfigs]: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config diff --git a/charts/argocd-notifications/.helmignore b/charts/argocd-notifications/.helmignore index 50af0317..26179658 100644 --- a/charts/argocd-notifications/.helmignore +++ b/charts/argocd-notifications/.helmignore @@ -20,3 +20,5 @@ .idea/ *.tmproj .vscode/ +ci/ +*.gotmpl diff --git a/charts/argocd-notifications/Chart.yaml b/charts/argocd-notifications/Chart.yaml index 1c1fa2b5..96825383 100644 --- a/charts/argocd-notifications/Chart.yaml +++ b/charts/argocd-notifications/Chart.yaml @@ -3,7 +3,7 @@ appVersion: v1.2.1 description: A Helm chart for ArgoCD notifications, an add-on to ArgoCD. name: argocd-notifications type: application -version: 1.7.0 +version: 1.7.1 home: https://github.com/argoproj/argo-helm icon: https://argocd-notifications.readthedocs.io/en/stable/assets/logo.png keywords: @@ -15,4 +15,4 @@ maintainers: - name: andyfeller annotations: artifacthub.io/changes: | - - "[Added]: Support for dynamic Secret and ConfigMap names" + - "[Changed]: Consistent .helmignore" diff --git a/scripts/helm-docs.sh b/scripts/helm-docs.sh new file mode 100644 index 00000000..ed4408d3 --- /dev/null +++ b/scripts/helm-docs.sh @@ -0,0 +1,11 @@ +#!/bin/bash +## Reference: https://github.com/norwoodj/helm-docs +set -eux +CHART_DIR="$(cd "$(dirname "$0")/.." && pwd)" +echo "$CHART_DIR" + +echo "Running Helm-Docs" +docker run \ + -v "$CHART_DIR:/helm-docs" \ + -u $(id -u) \ + jnorwood/helm-docs:latest