Skip to content

Commit

Permalink
feat: add example helm chart that showcases sections with descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoutsovasilis committed Jun 5, 2024
1 parent e973dfe commit 8a5a32d
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 0 deletions.
12 changes: 12 additions & 0 deletions example-charts/sections-description/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: v2
name: sections-description
version: "1.0.0"
type: application
appVersion: "13.0.0"
description: A chart for showing how to use sections with description
home: "https://github.com/norwoodj/helm-docs/tree/master/example-charts/sections-description"
maintainers:
- email: [email protected]
name: Panos Koutsovasilis
sources: ["https://github.com/norwoodj/helm-docs/tree/master/example-charts/sections-description"]
engine: gotpl
29 changes: 29 additions & 0 deletions example-charts/sections-description/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Sections

This creates values, but sectioned into own section tables if a section comment is provided.

## Values

### Some Section
Some Section description

| 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
Special Attention description

| 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 |

### Other Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| controller.service.annotations."external-dns.alpha.kubernetes.io/hostname" | string | `"stupidchess.jmn23.com"` | Hostname to be assigned to the ELB for the service |
14 changes: 14 additions & 0 deletions example-charts/sections-description/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Sections

This creates values, but sectioned into own section tables if a section comment is provided.

{{ define "section.description.SomeSection" }}
Some Section description
{{ end }}


{{ define "section.description.SpecialAttention" }}
Special Attention description
{{ end }}

{{ template "chart.valuesSection" . }}
45 changes: 45 additions & 0 deletions example-charts/sections-description/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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
# @sectionDescriptionTemplate -- SomeSection
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
# @sectionDescriptionTemplate -- SpecialAttention
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 8a5a32d

Please sign in to comment.