Skip to content

Commit

Permalink
Give an example of how to use sections
Browse files Browse the repository at this point in the history
  • Loading branch information
Haepaxlog committed Sep 5, 2023
1 parent 94cc6af commit 980715e
Show file tree
Hide file tree
Showing 4 changed files with 240 additions and 0 deletions.
19 changes: 19 additions & 0 deletions example-charts/sections/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v2
name: sections
deprecated: true
version: "1.0.0"
type: application
appVersion: "13.0.0"
description: A chart for showing how to use sections
home: "https://github.com/norwoodj/helm-docs/tree/master/example-charts/sections"
maintainers:
- email: [email protected]
name: Constantin Rohde
sources: ["https://github.com/norwoodj/helm-docs/tree/master/example-charts/sections"]
kubeVersion: "<=1.18"
engine: gotpl

dependencies:
- name: nginx-ingress
version: "0.22.1"
repository: "@stable"
173 changes: 173 additions & 0 deletions example-charts/sections/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
# Sections

## Values

### General
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| controller.extraVolumes[0].name | string | `"config-volume"` | |
| controller.image.repository | string | `"nginx-ingress-controller"` | |
| controller.image.tag | string | `"18.0831"` | |
| controller.name | string | `"controller"` | |
| controller.service.annotations."external-dns.alpha.kubernetes.io/hostname" | string | `"stupidchess.jmn23.com"` | Hostname to be assigned to the ELB for the service |
| controller.service.type | string | `"LoadBalancer"` | |

### Some Section
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| controller.extraVolumes[0].configMap.name | string | `"nginx-ingress-config"` | Uses the name of the configmap created by this chart |
| controller.persistentVolumeClaims | list | the chart will construct this list internally unless specified | List of persistent volume claims to create. |
| controller.podLabels | object | `{}` | The labels to be applied to instances of the controller pod |

### Special Attention
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| controller.ingressClass | string | `"nginx"` | You can also specify value comments like this |
| controller.publishService | object | `{"enabled":false}` | This is a publishService |
| controller.replicas | int | `nil` | Number of nginx-ingress pods to load balance between |

## Values

<h3>General</h3>
<table>
<thead>
<th>Key</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>controller.extraVolumes[0].name</td>
<td>string</td>
<td><pre lang="json">
"config-volume"
</pre>
</td>
<td></td>
</tr>
<tr>
<td>controller.image.repository</td>
<td>string</td>
<td><pre lang="json">
"nginx-ingress-controller"
</pre>
</td>
<td></td>
</tr>
<tr>
<td>controller.image.tag</td>
<td>string</td>
<td><pre lang="json">
"18.0831"
</pre>
</td>
<td></td>
</tr>
<tr>
<td>controller.name</td>
<td>string</td>
<td><pre lang="json">
"controller"
</pre>
</td>
<td></td>
</tr>
<tr>
<td>controller.service.annotations."external-dns.alpha.kubernetes.io/hostname"</td>
<td>string</td>
<td><pre lang="json">
"stupidchess.jmn23.com"
</pre>
</td>
<td>Hostname to be assigned to the ELB for the service</td>
</tr>
<tr>
<td>controller.service.type</td>
<td>string</td>
<td><pre lang="json">
"LoadBalancer"
</pre>
</td>
<td></td>
</tr>
</tbody>
</table>
<h3>Some Section</h3>
<table>
<thead>
<th>Key</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>controller.extraVolumes[0].configMap.name</td>
<td>string</td>
<td><pre lang="json">
"nginx-ingress-config"
</pre>
</td>
<td>Uses the name of the configmap created by this chart</td>
</tr>
<tr>
<td>controller.persistentVolumeClaims</td>
<td>list</td>
<td><pre lang="">
the chart will construct this list internally unless specified
</pre>
</td>
<td>List of persistent volume claims to create.</td>
</tr>
<tr>
<td>controller.podLabels</td>
<td>object</td>
<td><pre lang="json">
{}
</pre>
</td>
<td>The labels to be applied to instances of the controller pod</td>
</tr>
</tbody>
</table>
<h3>Special Attention</h3>
<table>
<thead>
<th>Key</th>
<th>Type</th>
<th>Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>controller.ingressClass</td>
<td>string</td>
<td><pre lang="json">
"nginx"
</pre>
</td>
<td>You can also specify value comments like this</td>
</tr>
<tr>
<td>controller.publishService</td>
<td>object</td>
<td><pre lang="json">
{
"enabled": false
}
</pre>
</td>
<td>This is a publishService</td>
</tr>
<tr>
<td>controller.replicas</td>
<td>int</td>
<td><pre lang="json">
null
</pre>
</td>
<td>Number of nginx-ingress pods to load balance between</td>
</tr>
</tbody>
</table>
5 changes: 5 additions & 0 deletions example-charts/sections/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Sections

{{ template "chart.valuesSectionedSection" . }}

{{ template "chart.valuesSectionedSectionHtml" . }}
43 changes: 43 additions & 0 deletions example-charts/sections/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
controller:
name: controller
image:
repository: nginx-ingress-controller
tag: "18.0831"

# controller.persistentVolumeClaims -- List of persistent volume claims to create.
# @default -- the chart will construct this list internally unless specified
# @section -- Some Section
persistentVolumeClaims: []

extraVolumes:
- name: config-volume
configMap:
# controller.extraVolumes[0].configMap.name -- Uses the name of the configmap created by this chart
# @section -- Some Section
name: nginx-ingress-config

# -- You can also specify value comments like this
# @section -- Special Attention
ingressClass: nginx


# controller.podLabels -- The labels to be applied to instances of the controller pod
# @section -- Some Section
podLabels: {}

# controller.publishService -- This is a publishService
# @section -- Special Attention
publishService:
enabled: false

# -- (int) Number of nginx-ingress pods to load balance between
# @raw
# @section -- Special Attention
replicas:

service:
annotations:
# controller.service.annotations."external-dns.alpha.kubernetes.io/hostname" -- Hostname to be assigned to the ELB for the service
external-dns.alpha.kubernetes.io/hostname: stupidchess.jmn23.com

type: LoadBalancer

0 comments on commit 980715e

Please sign in to comment.