-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automatic readme generation for charts (#5316)
* Add automatic readme generation for charts The current readmes for each chart is generated manually and doesn't contain all the information available. Utilize helm-docs to automatically fill out readme.mds for the helm charts by pulling metadata from values.yml. Fixes #4156 Co-authored-by: GMarkfjard <gabma047@student.liu.se>
- Loading branch information
1 parent
f5f5da0
commit 94574d4
Showing
55 changed files
with
1,253 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Add potential chart ignores here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -eu | ||
|
||
helmdocsv=1.4.0 | ||
bindir=$( cd "${0%/*}" && pwd ) # Change to script dir and set bin dir to this | ||
targetbin=$( cd "$bindir"/.. && pwd )/target/bin | ||
helmdocsbin=$targetbin/helm-docs-$helmdocsv | ||
os="" | ||
arch="" | ||
|
||
if [ ! -f "$helmdocsbin" ]; then | ||
case $(uname | tr '[:upper:]' '[:lower:]') in | ||
darwin*) | ||
os=darwin | ||
arch=x86_64 | ||
;; | ||
linux*) | ||
os=linux | ||
case $(uname -m) in | ||
x86_64) arch=x86_64 ;; | ||
amd64) arch=amd64 ;; | ||
arm) | ||
tmp=$(dpkg --print-architecture) | ||
if echo "$tmp" | grep -q arm64; then | ||
arch=arm64 | ||
elif echo "$tmp" | grep -q armv7; then | ||
arch=armv7 | ||
elif echo "$tmp" | grep -q armv6; then | ||
arch=armv6 | ||
fi | ||
;; | ||
esac | ||
;; | ||
msys*) | ||
os=windows | ||
arch=x86_64 | ||
;; | ||
esac | ||
|
||
if [ -z "$os" ]; then | ||
echo "Couldn't find a matching binary" | ||
exit 126 | ||
fi | ||
helmdocscurl="https://github.com/norwoodj/helm-docs/releases/download/v$helmdocsv/helm-docs_${helmdocsv}_${os}_${arch}.tar.gz" | ||
tmp=$(mktemp -d -t helm-docs.XXX) | ||
mkdir -p "$targetbin" | ||
( | ||
cd "$tmp" | ||
curl -Lsf -o "./helm-docs.tar.gz" "$helmdocscurl" | ||
tar zf "./helm-docs.tar.gz" -x "helm-docs" | ||
chmod +x "helm-docs" | ||
) | ||
mv "$tmp/helm-docs" "$helmdocsbin" | ||
fi | ||
|
||
"$helmdocsbin" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -eu | ||
|
||
bin/helm-docs | ||
|
||
dir_dirty=$(git diff HEAD) | ||
if [ -z "$dir_dirty" ]; then | ||
echo "Helm-docs generated readmes match chart readmes." | ||
exit 0 | ||
else | ||
echo "Helm-docs generated readmes diverge from current chart readmes:" | ||
echo "$(git status)" | ||
exit 64 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# grafana | ||
|
||
A Helm chart for the grafana add-on in Linkerd | ||
|
||
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) | ||
|
||
![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square) | ||
|
||
## Requirements | ||
|
||
| Repository | Name | Version | | ||
|------------|------|---------| | ||
| file://../../partials | partials | 0.1.0 | | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| image.name | string | `"ghcr.io/linkerd/grafana"` | Docker image name for the grafana instance | | ||
| image.tag | string | `nil` | Docker image tag for the grafana instance | | ||
| proxy.resources | string | `nil` | Structure analog to the resources fields above, but overriding the resources of the linkerd proxy injected into the grafana pod. | | ||
| resources.cpu.limit | string | `nil` | Maximum amount of CPU units that the grafana container can use | | ||
| resources.cpu.request | string | `nil` | Amount of CPU units that the grafana container requests | | ||
| resources.memory.limit | string | `nil` | Maximum amount of memory that grafana container can use | | ||
| resources.memory.request | string | `nil` | Amount of memory that the grafana container requests | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.4.0](https://github.com/norwoodj/helm-docs/releases/v1.4.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{ template "chart.header" . }} | ||
{{ template "chart.description" . }} | ||
|
||
{{ template "chart.versionBadge" . }} | ||
{{ template "chart.typeBadge" . }} | ||
{{ template "chart.appVersionBadge" . }} | ||
|
||
{{ template "chart.homepageLine" . }} | ||
|
||
{{ template "chart.requirementsSection" . }} | ||
|
||
{{ template "chart.valuesSection" . }} | ||
|
||
{{ template "helm-docs.versionFooter" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
image: | ||
# -- Docker image name for the grafana instance | ||
name: ghcr.io/linkerd/grafana | ||
# -- Docker image tag for the grafana instance | ||
tag: | ||
|
||
resources: | ||
cpu: | ||
# -- Maximum amount of CPU units that the grafana container can use | ||
limit: | ||
# -- Amount of CPU units that the grafana container requests | ||
request: | ||
memory: | ||
# -- Maximum amount of memory that grafana container can use | ||
limit: | ||
# -- Amount of memory that the grafana container requests | ||
request: | ||
proxy: | ||
# -- Structure analog to the resources fields above, but overriding the | ||
# resources of the linkerd proxy injected into the grafana pod. | ||
resources: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# prometheus | ||
|
||
A Helm chart for the prometheus add-on in Linkerd | ||
|
||
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) | ||
|
||
![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square) | ||
|
||
## Requirements | ||
|
||
| Repository | Name | Version | | ||
|------------|------|---------| | ||
| file://../../partials | partials | 0.1.0 | | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| alertManagers | string | `nil` | Alertmanager instances the Prometheus server sends alerts to configured via the static_configs parameter. | | ||
| alertRelabelConfigs | string | `nil` | Alert relabeling is applied to alerts before they are sent to the Alertmanager. | | ||
| args | object | `{"config.file":"/etc/prometheus/prometheus.yml","log.level":"info","storage.tsdb.path":"/data","storage.tsdb.retention.time":"6h"}` | Command line options for Prometheus binary | | ||
| globalConfig | object | `{"evaluation_interval":"10s","scrape_interval":"10s","scrape_timeout":"10s"}` | The global configuration specifies parameters that are valid in all other configuration contexts. | | ||
| image | string | `"prom/prometheus:v2.19.3"` | Docker image for the prometheus instance | | ||
| proxy.resources | string | `nil` | CPU and Memory resources required by proxy injected into prometheus pod (see global.proxy.resources for sub-fields) | | ||
| remoteWrite | string | `nil` | Allows transparently sending samples to an endpoint. Mostly used for long term storage. | | ||
| resources.cpu.limit | string | `nil` | Maximum amount of CPU units that the prometheus container can use | | ||
| resources.cpu.request | string | `nil` | Amount of CPU units that the prometheus container requests | | ||
| resources.memory.limit | string | `nil` | Maximum amount of memory that prometheus container can use | | ||
| resources.memory.request | string | `nil` | Amount of memory that the prometheus container requests | | ||
| ruleConfigMapMounts | string | `nil` | Alerting/recording rule ConfigMap mounts (sub-path names must end in ´_rules.yml´ or ´_rules.yaml´) | | ||
| scrapeConfigs | string | `nil` | A scrapeConfigs section specifies a set of targets and parameters describing how to scrape them. | | ||
| sideCarContainers | string | `nil` | A sidecarContainers section specifies a list of secondary containers to run in the prometheus pod e.g. to export data to non-prometheus systems | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.4.0](https://github.com/norwoodj/helm-docs/releases/v1.4.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{ template "chart.header" . }} | ||
{{ template "chart.description" . }} | ||
|
||
{{ template "chart.versionBadge" . }} | ||
{{ template "chart.typeBadge" . }} | ||
{{ template "chart.appVersionBadge" . }} | ||
|
||
{{ template "chart.homepageLine" . }} | ||
|
||
{{ template "chart.requirementsSection" . }} | ||
|
||
{{ template "chart.valuesSection" . }} | ||
|
||
{{ template "helm-docs.versionFooter" . }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.