From 60153fd456f976df590af35d13cc107893be15bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Skyler=20M=C3=A4ntysaari?= Date: Wed, 24 Jan 2024 13:29:44 +0200 Subject: [PATCH] Fix chart README generation. --- .github/scripts/gen-helm-docs.sh | 4 +- charts/apps/piped/README.md | 87 ++++-------------- hack/templates/README.md.gotmpl | 150 ++++--------------------------- 3 files changed, 37 insertions(+), 204 deletions(-) diff --git a/.github/scripts/gen-helm-docs.sh b/.github/scripts/gen-helm-docs.sh index 2127a82..5e8f2f9 100755 --- a/.github/scripts/gen-helm-docs.sh +++ b/.github/scripts/gen-helm-docs.sh @@ -6,7 +6,7 @@ set -eu # require helm-docs command -v helm-docs >/dev/null 2>&1 || { - echo >&2 "helm-docs (https://github.com/k8s-at-home/helm-docs) is not installed. Aborting." + echo >&2 "helm-docs (https://github.com/norwoodj/helm-docs) is not installed. Aborting." exit 1 } @@ -44,4 +44,4 @@ helm-docs \ --ignore-file="${repository}/.helmdocsignore" \ --template-files="${readme_template}" \ --template-files="$(basename "${readme_config_template}")" \ - --chart-search-root="${root}" \ No newline at end of file + --chart-search-root="${root}" diff --git a/charts/apps/piped/README.md b/charts/apps/piped/README.md index 94d9c63..3b1e363 100644 --- a/charts/apps/piped/README.md +++ b/charts/apps/piped/README.md @@ -1,11 +1,9 @@ # piped -![Version: 4.1.0](https://img.shields.io/badge/Version-4.1.0-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) +![Version: 5.0.0](https://img.shields.io/badge/Version-5.0.0-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square) Piped is an alternative privacy-friendly YouTube frontend which is efficient by design. -NOTICE: There is currently NO caching support included in the chart. - ## Source Code * @@ -21,58 +19,27 @@ Kubernetes: `>=1.22.0-0` | Repository | Name | Version | |------------|------|---------| | https://bjw-s.github.io/helm-charts | common | 1.5.1 | -| https://charts.bitnami.com/bitnami | postgresql | 13.2.0 | - -## TL;DR - -```console -helm repo add TeamPiped https://helm.piped.video -helm repo update -helm install piped TeamPiped/piped -``` +| https://charts.bitnami.com/bitnami | postgresql | 13.2.27 | ## Installing the Chart -To install the chart with the release name `piped` +```bash +# Add the repository +helm repo add TeamPiped https://helm.piped.video -```console -helm install piped TeamPiped/piped +# Update your local Helm chart repository cache +helm repo update + +# Install the chart +helm install TeamPiped piped -f values.yaml ``` -## Uninstalling the Chart - -To uninstall the `piped` deployment - -```console -helm uninstall piped -``` - -The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release. - -## Configuration - -Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. -Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml) from the [common library](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common). - -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. - -```console -helm install piped \ - --set env.TZ="America/New York" \ - TeamPiped/piped -``` - -Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. - -```console -helm install piped TeamPiped/piped -f values.yaml -``` - -## Custom configuration - ## Values -**Important**: When deploying an application Helm chart you can add more values from the common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common) +The following table contains an overview of available values and their descriptions / default values. + +
+Expand | Key | Type | Default | Description | |-----|------|---------|-------------| @@ -92,7 +59,7 @@ helm install piped TeamPiped/piped -f values.yaml | controller.enabled | bool | `false` | enable the controller. | | frontend.args[0] | string | `"-c"` | | | frontend.args[1] | string | `"sed -i s/pipedapi.kavin.rocks/$BACKEND_HOSTNAME/g /usr/share/nginx/html/assets/* && /docker-entrypoint.sh nginx -g 'daemon off;'"` | | -| frontend.command | string | `"/bin/ash"` | BACKEND_HOSTNAME: pipedapi.example.org | +| frontend.command | string | `"/bin/ash"` | | | frontend.enabled | bool | `true` | | | frontend.image.pullPolicy | string | `"IfNotPresent"` | image pull policy | | frontend.image.repository | string | `"1337kavin/piped-frontend"` | image repository | @@ -130,7 +97,7 @@ helm install piped TeamPiped/piped -f values.yaml | postgresql.auth.username | string | `"piped"` | | | postgresql.enabled | bool | `true` | | | postgresql.image.tag | string | `"13.12.0-debian-11-r58"` | | -| probes | object | See below | Probe configuration -- [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) | +| probes | object | See below | [[ref]](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) | | probes.liveness | object | See below | Liveness probe configuration | | probes.liveness.custom | bool | `false` | Set this to `true` if you wish to specify your own livenessProbe | | probes.liveness.enabled | bool | `true` | Enable the liveness probe | @@ -158,25 +125,7 @@ helm install piped TeamPiped/piped -f values.yaml | ytproxy.service.main.primary | bool | `true` | | | ytproxy.service.main.type | string | `"ClusterIP"` | | -## Changelog - -### Version 4.1.0 - -#### Added - -N/A - -#### Changed - -* Upgraded `postgresql` chart dependency to version 13.2.0 - -#### Fixed - -N/A - -## Support - -- Open an [issue](https://github.com/TeamPiped/Piped-Kubernetes/issues/new/choose) +
---------------------------------------------- -Autogenerated from chart metadata using [helm-docs v0.1.1](https://github.com/k8s-at-home/helm-docs/releases/v0.1.1) +Autogenerated from chart metadata using [helm-docs v1.12.0](https://github.com/norwoodj/helm-docs/releases/v1.12.0) diff --git a/hack/templates/README.md.gotmpl b/hack/templates/README.md.gotmpl index 8166aba..17b09f3 100644 --- a/hack/templates/README.md.gotmpl +++ b/hack/templates/README.md.gotmpl @@ -14,157 +14,41 @@ https://helm.piped.video {{ template "custom.repository.organization" . }}/{{ template "chart.name" . }} {{- end -}} -{{- define "custom.notes" -}} - -{{- end -}} - -{{- define "custom.requirements" -}} -## Requirements - -{{ template "chart.kubeVersionLine" . }} -{{- end -}} - -{{- define "custom.dependencies" -}} -## Dependencies - -{{ template "chart.requirementsTable" . }} -{{- end -}} - -{{- define "custom.install.tldr" -}} -## TL;DR - -```console -helm repo add {{ template "custom.repository.organization" . }} {{ template "custom.helm.url" . }} -helm repo update -helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }} -``` -{{- end -}} - -{{- define "custom.install" -}} -## Installing the Chart - -To install the chart with the release name `{{ template "chart.name" . }}` - -```console -helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }} -``` -{{- end -}} - -{{- define "custom.uninstall" -}} -## Uninstalling the Chart - -To uninstall the `{{ template "chart.name" . }}` deployment - -```console -helm uninstall {{ template "chart.name" . }} -``` - -The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release. -{{- end -}} - -{{- define "custom.configuration.header" -}} -## Configuration -{{- end -}} - -{{- define "custom.configuration.readValues" -}} -Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. -Other values may be used from the [values.yaml](https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml) from the [common library](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common). -{{- end -}} - -{{- define "custom.configuration.example.set" -}} -Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. - -```console -helm install {{ template "chart.name" . }} \ - --set env.TZ="America/New York" \ - {{ template "custom.helm.path" . }} -``` -{{- end -}} - -{{- define "custom.configuration.example.file" -}} -Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. - -```console -helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }} -f values.yaml -``` -{{- end -}} - -{{- define "custom.valuesSection" -}} -## Values - -**Important**: When deploying an application Helm chart you can add more values from the common library chart [here](https://github.com/bjw-s/helm-charts/tree/main/charts/library/common) - -{{ template "chart.valuesTable" . }} -{{- end -}} - -{{- define "custom.support" -}} -## Support - -- Open an [issue](https://github.com/TeamPiped/Piped-Kubernetes/issues/new/choose) -{{- end -}} - -{{- define "custom.changelog" -}} -{{ $changeTypes := list "added" "changed" "fixed" }} -## Changelog - -### Version {{ template "chart.version" . }} - -{{ range $changeType := $changeTypes }} - {{- with (index $.Annotations "artifacthub.io/changes") }} - {{- print "#### " ($changeType | title) | nindent 0 }} - {{- print "" | nindent 0 }} - {{- $changesFound := false }} - {{- $changes := ((print "changes:\n" .) | fromYaml).changes }} - {{- range $changes }} - {{- if eq .kind $changeType }} - {{- print "* " .description | nindent 0 }} - {{- $changesFound = true }} - {{- end }} - {{- end }} - {{- if not $changesFound }} - {{- print "N/A" | nindent 0 }} - {{- end }} - {{- print "" | nindent 0 }} - {{- end }} -{{- end }} - -{{- end -}} - {{ template "chart.header" . }} {{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} {{ template "chart.description" . }} -{{ template "custom.notes" . }} - {{ template "chart.sourcesSection" . }} -{{ template "custom.requirements" . }} +## Requirements -{{ template "custom.dependencies" . }} +{{ template "chart.kubeVersionLine" . }} -{{ template "custom.install.tldr" . }} +## Dependencies -{{ template "custom.install" . }} +{{ template "chart.requirementsTable" . }} -{{ template "custom.uninstall" . }} +## Installing the Chart -{{ template "custom.configuration.header" . }} +```bash +# Add the repository +helm repo add {{ template "custom.repository.organization" }} {{template "custom.helm.url"}} -{{ template "custom.configuration.readValues" . }} +# Install the chart +helm install {{ template "custom.repository.organization" }} piped -f values.yaml +``` -{{ template "custom.configuration.example.set" . }} +## Values -{{ template "custom.configuration.example.file" . }} +The following table contains an overview of available values and their descriptions / default values. -{{ template "custom.custom.configuration" . }} +
+Expand -{{ template "custom.valuesSection" . }} +{{ template "chart.valuesTable" . }} -{{ template "custom.changelog" . }} - -{{ template "custom.support" . }} +
{{ template "helm-docs.versionFooter" . }} -{{ "" }} \ No newline at end of file