mirror of
https://github.com/plcnk/charts.git
synced 2026-04-07 02:00:45 +00:00
feat(charts): Now using bjw-s's common library chart (#7)
This commit is contained in:
committed by
GitHub
parent
8a84b5e13a
commit
31bbf1ca94
170
hack/templates/README.md.gotmpl
Normal file
170
hack/templates/README.md.gotmpl
Normal file
@ -0,0 +1,170 @@
|
||||
{{- define "custom.repository.organization" -}}
|
||||
plcnk
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.repository.url" -}}
|
||||
https://github.com/plcnk/charts
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.helm.url" -}}
|
||||
https://charts.plcnk.net
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.helm.path" -}}
|
||||
{{ template "custom.repository.organization" . }}/{{ template "chart.name" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.helm.oci_url" -}}
|
||||
oci://ghcr.io/plcnk/charts
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.notes" -}}
|
||||
**This chart is not maintained by the upstream project and any issues with the chart should be raised
|
||||
[here]({{ template "custom.repository.url" . }}/issues/new?assignees=plcnk&labels=bug&template=bug_report.yaml&name={{ template "chart.name" . }}&version={{ template "chart.version" . }})**
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.requirements" -}}
|
||||
## Requirements
|
||||
|
||||
{{ template "chart.kubeVersionLine" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.dependencies" -}}
|
||||
## Dependencies
|
||||
|
||||
{{ if gt (len .Dependencies) 0 }}
|
||||
| Repository | Name | Version |
|
||||
|------------|------|---------|
|
||||
{{- range .Dependencies }}
|
||||
{{- if .Alias }}
|
||||
| <{{ .Repository }}> | {{ .Alias }}({{ .Name }}) | {{ .Version }} |
|
||||
{{- else }}
|
||||
| <{{ .Repository }}> | {{ .Name }} | {{ .Version }} |
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ else }}
|
||||
This chart has no dependencies.
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.install" -}}
|
||||
## Installing the Chart
|
||||
|
||||
To install the chart with the release name `{{ template "chart.name" . }}`
|
||||
|
||||
### OCI (Recommended)
|
||||
|
||||
```console
|
||||
helm install {{ template "chart.name" . }} {{ template "custom.helm.oci_url" . }}/{{ template "chart.name" . }}
|
||||
```
|
||||
|
||||
### Traditional
|
||||
|
||||
```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.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.bjwsRef" -}}
|
||||
{{- $ref := "" -}}
|
||||
{{- range .Dependencies -}}
|
||||
{{- if and (eq .Repository "https://bjw-s.github.io/helm-charts") (eq .Name "common") (semverCompare "^1.x" .Version) -}}
|
||||
{{- $ref = "a081de5" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- default "main" $ref -}}
|
||||
{{- 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/tree/{{ template "custom.bjwsRef" . }}/charts/library/common/values.yaml) from the [bjw-s common library](https://github.com/bjw-s/helm-charts/tree/{{ template "custom.bjwsRef" . }}/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 bjw-s common library chart [here](https://github.com/bjw-s/helm-charts/tree/{{ template "custom.bjwsRef" . }}/charts/library/common)
|
||||
|
||||
{{ template "chart.valuesTable" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.helm-docs.versionFooter" -}}
|
||||
---
|
||||
Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs)
|
||||
{{- end -}}
|
||||
|
||||
# {{ template "custom.chart.name" . }}
|
||||
|
||||
{{ template "custom.chart.icon" . }}
|
||||
|
||||
{{ template "chart.versionBadge" . }}
|
||||
{{ template "chart.typeBadge" . }}
|
||||
{{ template "chart.appVersionBadge" . }}
|
||||
|
||||
{{ template "chart.description" . }}
|
||||
|
||||
{{ template "chart.homepageLine" . }}
|
||||
|
||||
{{ template "custom.notes" . }}
|
||||
|
||||
{{ template "chart.sourcesSection" . }}
|
||||
|
||||
{{ template "custom.requirements" . }}
|
||||
|
||||
{{ template "custom.dependencies" . }}
|
||||
|
||||
{{ 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.helm-docs.versionFooter" . }}
|
||||
{{ "" }}
|
||||
13
hack/templates/README_CONFIG.md.gotmpl
Normal file
13
hack/templates/README_CONFIG.md.gotmpl
Normal file
@ -0,0 +1,13 @@
|
||||
{{- define "custom.chart.name" -}}
|
||||
# {{ .Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.custom.configuration.header" -}}
|
||||
## Custom configuration
|
||||
{{- end -}}
|
||||
|
||||
{{- define "custom.custom.configuration" -}}
|
||||
{{ template "custom.custom.configuration.header" . }}
|
||||
|
||||
N/A
|
||||
{{- end -}}
|
||||
5
hack/templates/icon.gotmpl
Normal file
5
hack/templates/icon.gotmpl
Normal file
@ -0,0 +1,5 @@
|
||||
{{- define "custom.chart.icon" -}}
|
||||
{{- with "$ICON" -}}
|
||||
<img src="{{ . }}" align="right" width="92" alt="{{ template "chart.name" $ }} logo">
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user