Skip to content

Commit 980715e

Browse files
committed
Give an example of how to use sections
1 parent 94cc6af commit 980715e

File tree

4 files changed

+240
-0
lines changed

4 files changed

+240
-0
lines changed

example-charts/sections/Chart.yaml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v2
2+
name: sections
3+
deprecated: true
4+
version: "1.0.0"
5+
type: application
6+
appVersion: "13.0.0"
7+
description: A chart for showing how to use sections
8+
home: "https://github.com/norwoodj/helm-docs/tree/master/example-charts/sections"
9+
maintainers:
10+
11+
name: Constantin Rohde
12+
sources: ["https://github.com/norwoodj/helm-docs/tree/master/example-charts/sections"]
13+
kubeVersion: "<=1.18"
14+
engine: gotpl
15+
16+
dependencies:
17+
- name: nginx-ingress
18+
version: "0.22.1"
19+
repository: "@stable"

example-charts/sections/README.md

+173
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# Sections
2+
3+
## Values
4+
5+
### General
6+
| Key | Type | Default | Description |
7+
|-----|------|---------|-------------|
8+
| controller.extraVolumes[0].name | string | `"config-volume"` | |
9+
| controller.image.repository | string | `"nginx-ingress-controller"` | |
10+
| controller.image.tag | string | `"18.0831"` | |
11+
| controller.name | string | `"controller"` | |
12+
| controller.service.annotations."external-dns.alpha.kubernetes.io/hostname" | string | `"stupidchess.jmn23.com"` | Hostname to be assigned to the ELB for the service |
13+
| controller.service.type | string | `"LoadBalancer"` | |
14+
15+
### Some Section
16+
| Key | Type | Default | Description |
17+
|-----|------|---------|-------------|
18+
| controller.extraVolumes[0].configMap.name | string | `"nginx-ingress-config"` | Uses the name of the configmap created by this chart |
19+
| controller.persistentVolumeClaims | list | the chart will construct this list internally unless specified | List of persistent volume claims to create. |
20+
| controller.podLabels | object | `{}` | The labels to be applied to instances of the controller pod |
21+
22+
### Special Attention
23+
| Key | Type | Default | Description |
24+
|-----|------|---------|-------------|
25+
| controller.ingressClass | string | `"nginx"` | You can also specify value comments like this |
26+
| controller.publishService | object | `{"enabled":false}` | This is a publishService |
27+
| controller.replicas | int | `nil` | Number of nginx-ingress pods to load balance between |
28+
29+
## Values
30+
31+
<h3>General</h3>
32+
<table>
33+
<thead>
34+
<th>Key</th>
35+
<th>Type</th>
36+
<th>Default</th>
37+
<th>Description</th>
38+
</thead>
39+
<tbody>
40+
<tr>
41+
<td>controller.extraVolumes[0].name</td>
42+
<td>string</td>
43+
<td><pre lang="json">
44+
"config-volume"
45+
</pre>
46+
</td>
47+
<td></td>
48+
</tr>
49+
<tr>
50+
<td>controller.image.repository</td>
51+
<td>string</td>
52+
<td><pre lang="json">
53+
"nginx-ingress-controller"
54+
</pre>
55+
</td>
56+
<td></td>
57+
</tr>
58+
<tr>
59+
<td>controller.image.tag</td>
60+
<td>string</td>
61+
<td><pre lang="json">
62+
"18.0831"
63+
</pre>
64+
</td>
65+
<td></td>
66+
</tr>
67+
<tr>
68+
<td>controller.name</td>
69+
<td>string</td>
70+
<td><pre lang="json">
71+
"controller"
72+
</pre>
73+
</td>
74+
<td></td>
75+
</tr>
76+
<tr>
77+
<td>controller.service.annotations."external-dns.alpha.kubernetes.io/hostname"</td>
78+
<td>string</td>
79+
<td><pre lang="json">
80+
"stupidchess.jmn23.com"
81+
</pre>
82+
</td>
83+
<td>Hostname to be assigned to the ELB for the service</td>
84+
</tr>
85+
<tr>
86+
<td>controller.service.type</td>
87+
<td>string</td>
88+
<td><pre lang="json">
89+
"LoadBalancer"
90+
</pre>
91+
</td>
92+
<td></td>
93+
</tr>
94+
</tbody>
95+
</table>
96+
<h3>Some Section</h3>
97+
<table>
98+
<thead>
99+
<th>Key</th>
100+
<th>Type</th>
101+
<th>Default</th>
102+
<th>Description</th>
103+
</thead>
104+
<tbody>
105+
<tr>
106+
<td>controller.extraVolumes[0].configMap.name</td>
107+
<td>string</td>
108+
<td><pre lang="json">
109+
"nginx-ingress-config"
110+
</pre>
111+
</td>
112+
<td>Uses the name of the configmap created by this chart</td>
113+
</tr>
114+
<tr>
115+
<td>controller.persistentVolumeClaims</td>
116+
<td>list</td>
117+
<td><pre lang="">
118+
the chart will construct this list internally unless specified
119+
</pre>
120+
</td>
121+
<td>List of persistent volume claims to create.</td>
122+
</tr>
123+
<tr>
124+
<td>controller.podLabels</td>
125+
<td>object</td>
126+
<td><pre lang="json">
127+
{}
128+
</pre>
129+
</td>
130+
<td>The labels to be applied to instances of the controller pod</td>
131+
</tr>
132+
</tbody>
133+
</table>
134+
<h3>Special Attention</h3>
135+
<table>
136+
<thead>
137+
<th>Key</th>
138+
<th>Type</th>
139+
<th>Default</th>
140+
<th>Description</th>
141+
</thead>
142+
<tbody>
143+
<tr>
144+
<td>controller.ingressClass</td>
145+
<td>string</td>
146+
<td><pre lang="json">
147+
"nginx"
148+
</pre>
149+
</td>
150+
<td>You can also specify value comments like this</td>
151+
</tr>
152+
<tr>
153+
<td>controller.publishService</td>
154+
<td>object</td>
155+
<td><pre lang="json">
156+
{
157+
"enabled": false
158+
}
159+
</pre>
160+
</td>
161+
<td>This is a publishService</td>
162+
</tr>
163+
<tr>
164+
<td>controller.replicas</td>
165+
<td>int</td>
166+
<td><pre lang="json">
167+
null
168+
</pre>
169+
</td>
170+
<td>Number of nginx-ingress pods to load balance between</td>
171+
</tr>
172+
</tbody>
173+
</table>
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Sections
2+
3+
{{ template "chart.valuesSectionedSection" . }}
4+
5+
{{ template "chart.valuesSectionedSectionHtml" . }}

example-charts/sections/values.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
controller:
2+
name: controller
3+
image:
4+
repository: nginx-ingress-controller
5+
tag: "18.0831"
6+
7+
# controller.persistentVolumeClaims -- List of persistent volume claims to create.
8+
# @default -- the chart will construct this list internally unless specified
9+
# @section -- Some Section
10+
persistentVolumeClaims: []
11+
12+
extraVolumes:
13+
- name: config-volume
14+
configMap:
15+
# controller.extraVolumes[0].configMap.name -- Uses the name of the configmap created by this chart
16+
# @section -- Some Section
17+
name: nginx-ingress-config
18+
19+
# -- You can also specify value comments like this
20+
# @section -- Special Attention
21+
ingressClass: nginx
22+
23+
24+
# controller.podLabels -- The labels to be applied to instances of the controller pod
25+
# @section -- Some Section
26+
podLabels: {}
27+
28+
# controller.publishService -- This is a publishService
29+
# @section -- Special Attention
30+
publishService:
31+
enabled: false
32+
33+
# -- (int) Number of nginx-ingress pods to load balance between
34+
# @raw
35+
# @section -- Special Attention
36+
replicas:
37+
38+
service:
39+
annotations:
40+
# controller.service.annotations."external-dns.alpha.kubernetes.io/hostname" -- Hostname to be assigned to the ELB for the service
41+
external-dns.alpha.kubernetes.io/hostname: stupidchess.jmn23.com
42+
43+
type: LoadBalancer

0 commit comments

Comments
 (0)