-
Notifications
You must be signed in to change notification settings - Fork 11
/
templates.gotmpl
53 lines (38 loc) · 2.77 KB
/
templates.gotmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{{ define "chart.valuesTable" }}
| Key | Description | Type | Default |
|-----|-------------|------|---------|
{{ range .Values }} | {{ .Key }} | {{ .Description | replace "|" "\\|" | default .AutoDescription }} | {{ .Type }} | {{ .Default | replace "|" "\\|" | default .AutoDefault }} |
{{ end }}
{{ end }}
{{- define "graphops.title" -}}
# {{ (cat .Name "Helm Chart") | title }}
{{- end -}}
{{- define "graphops.badges" -}}
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) {{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
{{- end -}}
{{- define "graphops.contributingSection" -}}
## Contributing
We welcome and appreciate your contributions! Please see the [Contributor Guide](/CONTRIBUTING.md), [Code Of Conduct](/CODE_OF_CONDUCT.md) and [Security Notes](/SECURITY.md) for this repository.
{{- end -}}
{{- define "graphops.upgradingSection" -}}
## Upgrading
We recommend that you pin the version of the Chart that you deploy. You can use the `--version` flag with `helm install` and `helm upgrade` to specify a chart version constraint.
This project uses [Semantic Versioning](https://semver.org/). Changes to the version of the application (the `appVersion`) that the Chart deploys will generally result in a patch version bump for the Chart. Breaking changes to the Chart or its `values.yaml` interface will be reflected with a major version bump.
We do not recommend that you upgrade the application by overriding `image.tag`. Instead, use the version of the Chart that is built for your desired `appVersion`.
{{- end -}}
{{- define "graphops.configurationTemplateSection" -}}
### Advanced Configuration
This Chart uses a template to allow customisation of the configuration passed into {{ default "the application" .appName }}. The template is rendered by Helm, so you can use [Go templating](https://golangdocs.com/templates-in-golang) as well as [Helm context built-ins](https://helm.sh/docs/chart_template_guide/builtin_objects) to customise the configuration. This includes accessing and looping over any values that you pass into the Helm release.
The template is defined under the `{{ default "configTemplate" .configTemplateKeyName }}` key in the [Values](#Values). You can override this value to specify your custom template.
The Chart also computes additional values that are appended to the template context. You can use these in your template too. See more below.
This diagram describes how this template is used to generate of the output configuration.
```mermaid
graph LR
a(Chart Values) -->|All Values| b{Context}
a --> c[Helm]
c -->|Computed Values| b
b --> d[Helm]
a -->|Config Template| d
d -->|Render Template| e[Output Config]
```
{{- end -}}