Skip to content

Commit

Permalink
Merge pull request #47 from johanneskastl/20230405_README_gotempl
Browse files Browse the repository at this point in the history
generate READMEs via helm-docs
  • Loading branch information
Johannes Kastl authored Apr 15, 2023
2 parents f844a24 + 1d4b841 commit af711bd
Show file tree
Hide file tree
Showing 50 changed files with 1,875 additions and 86 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/charts-lint-test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
name: Lint and Test Charts

on: pull_request
on:
push:
branches:
- main
paths:
- 'charts/**'
- '!charts/**/README.md'
- '!charts/**/README.md.gotmpl'
pull_request:
branches:
- main
paths:
- 'charts/**'
- '!charts/**/README.md'
- '!charts/**/README.md.gotmpl'

jobs:
lint-test:
Expand Down
26 changes: 26 additions & 0 deletions .helm-docs-templates/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# OWNERS file for Kubernetes
OWNERS
# helm-docs templates
*.gotmpl
139 changes: 139 additions & 0 deletions .helm-docs-templates/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{{- define "custom.repository.organization" -}}
johanneskastl-helm-charts
{{- end -}}

{{- define "custom.repository.url" -}}
https://github.com/johanneskastl/helm-charts/
{{- end -}}

{{- define "custom.helm.url" -}}
https://johanneskastl.github.io/helm-charts/
{{- end -}}

{{- define "custom.helm.path" -}}
{{ template "custom.repository.organization" . }}/{{ template "chart.name" . }}
{{- 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/johanneskastl/helm-charts/tree/main/charts/common/values.yaml) from the [common library](https://github.com/johanneskastl/helm-charts/tree/main/charts/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/johanneskastl/helm-charts/tree/main/charts/common)

{{ template "chart.valuesTable" . }}
{{- end -}}

{{- define "custom.support" -}}
## Support

Open an [issue](https://github.com/johanneskastl/helm-charts/issues/).
{{- 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" . }}

{{ template "custom.uninstall" . }}

{{ 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 "custom.support" . }}

{{ template "helm-docs.versionFooter" . }}
{{ "" }}
27 changes: 27 additions & 0 deletions .helm-docs-templates/README_CHANGELOG.md.gotmpl.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{- define "custom.changelog.header" -}}
## Changelog
{{- end -}}

{{- define "custom.changelog" -}}
{{ template "custom.changelog.header" . }}

All notable changes to this Helm chart will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### X.Y.Z

#### Added

N/A

#### Changed

- ...

#### Fixed

N/A

{{- end -}}
13 changes: 13 additions & 0 deletions .helm-docs-templates/README_CONFIG.md.gotmpl.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- define "custom.notes" -}}
**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/johanneskastl/helm-charts/issues/)**
{{- end -}}

{{- define "custom.custom.configuration.header" -}}
## Custom configuration
{{- end -}}

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

N/A
{{- end -}}
2 changes: 2 additions & 0 deletions .helmdocsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# common chart requires special treatment
charts/common/
4 changes: 2 additions & 2 deletions charts/blocky/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
appVersion: v0.21
description: DNS proxy as ad-blocker for local network
name: blocky
version: 11.1.0
version: 11.1.1
kubeVersion: ">=1.19.0-0"
keywords:
- blocky
Expand All @@ -27,4 +27,4 @@ dependencies:
annotations:
artifacthub.io/changes: |-
- kind: changed
description: update appVersion to v0.21
description: generate README via helm-docs
24 changes: 23 additions & 1 deletion charts/blocky/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# blocky

![Version: 11.1.0](https://img.shields.io/badge/Version-11.1.0-informational?style=flat-square) ![AppVersion: v0.21](https://img.shields.io/badge/AppVersion-v0.21-informational?style=flat-square)
![Version: 11.1.1](https://img.shields.io/badge/Version-11.1.1-informational?style=flat-square) ![AppVersion: v0.21](https://img.shields.io/badge/AppVersion-v0.21-informational?style=flat-square)

DNS proxy as ad-blocker for local network

Expand Down Expand Up @@ -100,6 +100,25 @@ N/A

## Changelog

All notable changes to this Helm chart will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Version 11.1.1

#### Added

N/A

#### Changed

* generate README with helm-docs

#### Fixed

N/A

### Version 11.1.0

#### Added
Expand Down Expand Up @@ -188,3 +207,6 @@ N/A
## Support

Open an [issue](https://github.com/johanneskastl/helm-charts/issues/).

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v0.1.1](https://github.com/k8s-at-home/helm-docs/releases/v0.1.1)
108 changes: 108 additions & 0 deletions charts/blocky/README_CHANGELOG.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{{- define "custom.changelog" -}}
## Changelog

All notable changes to this Helm chart will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Version 11.1.1

#### Added

N/A

#### Changed

* generate README with helm-docs

#### Fixed

N/A

### Version 11.1.0

#### Added

N/A

#### Changed

* update appVersion to v0.21

#### Fixed

N/A

### Version 11.0.4

#### Added

N/A

#### Changed

* README.md: cleanup

#### Fixed

N/A

### Version 11.0.3

#### Added

N/A

#### Changed

* README.md: remove another k8s-at-home

#### Fixed

N/A

### Version 11.0.2

#### Added

N/A

#### Changed

* README.md: remove leftover references to k8s-at-home in URLs
* README.md: cleanup

#### Fixed

N/A

### Version 11.0.1

#### Added

N/A

#### Changed

* update appVersion to 0.20

#### Fixed

N/A

### Version 11.0.0

#### Added

N/A

#### Changed

* Forked the chart from k8s-at-home (at version 10.5.2)

#### Fixed

N/A

{{- end -}}
Loading

0 comments on commit af711bd

Please sign in to comment.