Skip to content

Commit

Permalink
Fix chart README generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
samip5 committed Jan 24, 2024
1 parent e84aa7b commit 60153fd
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 202 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/gen-helm-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -44,4 +44,4 @@ helm-docs \
--ignore-file="${repository}/.helmdocsignore" \
--template-files="${readme_template}" \
--template-files="$(basename "${readme_config_template}")" \
--chart-search-root="${root}"
--chart-search-root="${root}"
85 changes: 17 additions & 68 deletions charts/apps/piped/README.md
Original file line number Diff line number Diff line change
@@ -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

* <https://github.com/TeamPiped/Piped>
Expand All @@ -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`

```console
helm install piped TeamPiped/piped
```

## 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
```
```bash
# Add the repository
helm repo add TeamPiped https://helm.piped.video

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
# Update your local Helm chart repository cache
helm repo update

```console
helm install piped TeamPiped/piped -f values.yaml
# Install the chart
helm install 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.

<details>
<summary>Expand</summary>

| Key | Type | Default | Description |
|-----|------|---------|-------------|
Expand All @@ -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 |
Expand Down Expand Up @@ -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 |
Expand Down Expand Up @@ -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)
</details>

----------------------------------------------
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)
148 changes: 16 additions & 132 deletions hack/templates/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,157 +14,41 @@ https://helm.piped.video
{{ template "custom.repository.organization" . }}/{{ template "chart.name" . }}
{{- end -}}

{{- define "custom.notes" -}}
{{ template "chart.header" . }}

{{- end -}}
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.description" . }}

{{ template "chart.sourcesSection" . }}

{{- 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" . }}`
```bash
# Add the repository
helm repo add {{ template "custom.repository.organization" }} {{template "custom.helm.url"}}

```console
helm install {{ template "chart.name" . }} {{ template "custom.helm.path" . }}
# Install the chart
helm install {{ template "custom.repository.organization" }} piped -f values.yaml
```
{{- 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" . }}

{{ template "custom.dependencies" . }}

{{ template "custom.install.tldr" . }}

{{ template "custom.install" . }}
The following table contains an overview of available values and their descriptions / default values.

{{ template "custom.uninstall" . }}
<details>
<summary>Expand</summary>

{{ template "custom.configuration.header" . }}

{{ template "custom.configuration.readValues" . }}

{{ template "custom.configuration.example.set" . }}

{{ template "custom.configuration.example.file" . }}

{{ template "custom.custom.configuration" . }}

{{ template "custom.valuesSection" . }}

{{ template "custom.changelog" . }}
{{ template "chart.valuesTable" . }}

{{ template "custom.support" . }}
</details>

{{ template "helm-docs.versionFooter" . }}
{{ "" }}

0 comments on commit 60153fd

Please sign in to comment.