Skip to content

Commit f66fdbd

Browse files
authored
Merge pull request #42 from Artus-LHIND/master
Add Badges/Maintainers/Sources/..., Restyling of Default Template, No Trailing Spaces, No Multiple Empty Lines, ...
2 parents b24995e + 0e25e47 commit f66fdbd

File tree

18 files changed

+567
-76
lines changed

18 files changed

+567
-76
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/helm-docs
22
/cmd/helm-docs/helm-docs
33
dist
4+
.idea/
5+
*.iml

README.md

+25-5
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,30 @@ The templates generated by the tool are shown below, and can be included in your
8282
| Name | Description |
8383
|------|-------------|
8484
| chart.header | The main heading of the generated markdown file |
85+
| chart.deprecationWarning | A deprecation warning which is displayed when the _deprecated_ field from the chart's `Chart.yaml` file is `true` |
8586
| chart.description | A description line containing the _description_ field from the chart's `Chart.yaml` file, or "" if that field is not set |
8687
| chart.version | The _version_ field from the chart's `Chart.yaml` file |
8788
| chart.versionLine | A text line stating the current version of the chart |
89+
| chart.versionBadge | A badge stating the current version of the chart |
8890
| chart.type | The _type_ field from the chart's `Chart.yaml` file |
8991
| chart.typeLine | A text line stating the current type of the chart |
90-
| chart.sourceLink | The _home_ link from the chart's `Chart.yaml` file, or "" if that field is not set |
91-
| chart.sourceLinkLine | A text line with the _home_ link from the chart's `Chart.yaml` file, or "" if that field is not set |
92+
| chart.typeBadge | A badge stating the current type of the chart |
93+
| chart.appVersion | The _appVersion_ field from the chart's `Chart.yaml` file |
94+
| chart.appVersionLine | A text line stating the current appVersion of the chart |
95+
| chart.appVersionBadge | A badge stating the current appVersion of the chart |
96+
| chart.homepage | The _home_ link from the chart's `Chart.yaml` file, or "" if that field is not set |
97+
| chart.homepageLine | A text line stating the current homepage of the chart |
98+
| chart.maintainersHeader | The heading for the chart maintainers section |
99+
| chart.maintainersTable | A table of the chart's maintainers |
100+
| chart.maintainersSection | A section headed by the maintainersHeader from above containing the maintainersTable from above or "" if there are no maintainers |
101+
| chart.sourcesHeader | The heading for the chart sources section |
102+
| chart.sourcesList | A list of the chart's sources |
103+
| chart.sourcesSection | A section headed by the sourcesHeader from above containing the sourcesList from above or "" if there are no sources |
104+
| chart.kubeVersion | The _kubeVersion_ field from the chart's `Chart.yaml` file |
105+
| chart.kubeVersionLine | A text line stating the required Kubernetes version for the chart |~~~~
92106
| chart.requirementsHeader | The heading for the chart requirements section |
93107
| chart.requirementsTable | A table of the chart's required sub-charts |
94-
| chart.requirementsSection | A section headed by the requirementsHeader from above containing the requirementsTable from above or "" if there are no requirements |
108+
| chart.requirementsSection | A section headed by the requirementsHeader from above containing the kubeVersionLine and/or the requirementsTable from above or "" if there are no requirements |
95109
| chart.valuesHeader | The heading for the chart values section |
96110
| chart.valuesTable | A table of the chart's values parsed from the `values.yaml` file (see below) |
97111
| chart.valuesSection | A section headed by the valuesHeader from above containing the valuesTable from above or "" if there are no values |
@@ -103,11 +117,17 @@ If there is no `README.md.gotmpl` (or other specified gotmpl file) present, the
103117
That template looks like so:
104118
```
105119
{{ template "chart.header" . }}
120+
{{ template "chart.deprecationWarning" . }}
121+
122+
{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}
123+
106124
{{ template "chart.description" . }}
107125
108-
{{ template "chart.versionLine" . }}
126+
{{ template "chart.homepageLine" . }}
127+
128+
{{ template "chart.maintainersSection" . }}
109129
110-
{{ template "chart.sourceLinkLine" . }}
130+
{{ template "chart.sourcesSection" . }}
111131
112132
{{ template "chart.requirementsSection" . }}
113133

example-charts/custom-template/README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
1-
custom-template
2-
===============
1+
# custom-template
2+
33
Basically the same as the nginx-ingress chart, but using a custom template to include some other content
44

55
Current chart version is `0.2.0`
66

7-
Source code can be found [here](https://github.com/norwoodj/helm-docs/tree/master/example-charts/custom-template)
8-
97
## Additional Information
8+
109
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
1110
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
1211
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
1312
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
1413
culpa qui officia deserunt mollit anim id est laborum.
1514

16-
## Chart Requirements
15+
## Requirements
1716

1817
| Repository | Name | Version |
1918
|------------|------|---------|
2019
| @stable | nginx-ingress | 0.22.1 |
2120

22-
## Chart Values
21+
## Values
2322

2423
| Key | Type | Default | Description |
2524
|-----|------|---------|-------------|

example-charts/custom-template/README.md.gotmpl

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44
{{ template "chart.versionLine" . }}
55

6-
{{ template "chart.sourceLinkLine" . }}
7-
86
## Additional Information
7+
98
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore
109
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
1110
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v2
2+
name: full-template
3+
deprecated: true
4+
version: "1.0.0"
5+
type: application
6+
appVersion: "13.0.0"
7+
description: A chart for showing every README-element
8+
home: "https://github.com/norwoodj/helm-docs/tree/master/example-charts/full-template"
9+
maintainers:
10+
11+
name: John Norwood
12+
sources: ["https://github.com/norwoodj/helm-docs/tree/master/example-charts/full-template"]
13+
kubeVersion: "<=1.18"
14+
engine: gotpl
15+
16+
dependencies:
17+
- name: nginx-ingress
18+
version: "0.22.1"
19+
repository: "@stable"
+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# full-template
2+
3+
## `chart.deprecationWarning`
4+
5+
> **:exclamation: This Helm Chart is deprecated!**
6+
7+
## `chart.description`
8+
9+
A chart for showing every README-element
10+
11+
## `chart.version`
12+
13+
1.0.0
14+
15+
## `chart.versionLine`
16+
17+
Current chart version is `1.0.0`
18+
19+
## `chart.versionBadge`
20+
21+
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square)
22+
23+
## `chart.type`
24+
25+
application
26+
27+
## `chart.typeLine`
28+
29+
Current chart type is `application`
30+
31+
## `chart.typeBadge`
32+
33+
![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
34+
35+
## `chart.appVersion`
36+
37+
13.0.0
38+
39+
## `chart.appVersionLine`
40+
41+
Current chart appVersion is `13.0.0`
42+
43+
## `chart.appVersionBadge`
44+
45+
![AppVersion: 13.0.0](https://img.shields.io/badge/AppVersion-13.0.0-informational?style=flat-square)
46+
47+
## `chart.homepage`
48+
49+
https://github.com/norwoodj/helm-docs/tree/master/example-charts/full-template
50+
51+
## `chart.homepageLine`
52+
53+
**Homepage:** <https://github.com/norwoodj/helm-docs/tree/master/example-charts/full-template>
54+
55+
## `chart.maintainersHeader`
56+
57+
## Maintainers
58+
59+
## `chart.maintainersTable`
60+
61+
| Name | Email | Url |
62+
| ---- | ------ | --- |
63+
| John Norwood | [email protected] | |
64+
65+
## `chart.maintainersSection`
66+
67+
## Maintainers
68+
69+
| Name | Email | Url |
70+
| ---- | ------ | --- |
71+
| John Norwood | [email protected] | |
72+
73+
## `chart.sourcesHeader`
74+
75+
## Source Code
76+
77+
## `chart.sourcesList`
78+
79+
* <https://github.com/norwoodj/helm-docs/tree/master/example-charts/full-template>
80+
81+
## `chart.sourcesSection`
82+
83+
## Source Code
84+
85+
* <https://github.com/norwoodj/helm-docs/tree/master/example-charts/full-template>
86+
87+
## `chart.kubeVersion`
88+
89+
<=1.18
90+
91+
## `chart.kubeVersionLine`
92+
93+
Kubernetes: `<=1.18`
94+
95+
## `chart.requirementsHeader`
96+
97+
## Requirements
98+
99+
## `chart.requirementsTable`
100+
101+
| Repository | Name | Version |
102+
|------------|------|---------|
103+
| @stable | nginx-ingress | 0.22.1 |
104+
105+
## `chart.requirementsSection`
106+
107+
## Requirements
108+
109+
Kubernetes: `<=1.18`
110+
111+
| Repository | Name | Version |
112+
|------------|------|---------|
113+
| @stable | nginx-ingress | 0.22.1 |
114+
115+
## `chart.valuesHeader`
116+
117+
## Values
118+
119+
## `chart.valuesTable`
120+
121+
| Key | Type | Default | Description |
122+
|-----|------|---------|-------------|
123+
| controller.extraVolumes[0].configMap.name | string | `"nginx-ingress-config"` | Uses the name of the configmap created by this chart |
124+
| controller.extraVolumes[0].name | string | `"config-volume"` | |
125+
| controller.image.repository | string | `"nginx-ingress-controller"` | |
126+
| controller.image.tag | string | `"18.0831"` | |
127+
| controller.ingressClass | string | `"nginx"` | Name of the ingress class to route through this controller |
128+
| controller.name | string | `"controller"` | |
129+
| controller.persistentVolumeClaims | list | the chart will construct this list internally unless specified | List of persistent volume claims to create. For very long comments, break them into multiple lines. |
130+
| controller.podLabels | object | `{}` | The labels to be applied to instances of the controller pod |
131+
| controller.publishService.enabled | bool | `false` | Whether to expose the ingress controller to the public world |
132+
| controller.replicas | int | `nil` | Number of nginx-ingress pods to load balance between |
133+
| controller.service.annotations."external-dns.alpha.kubernetes.io/hostname" | string | `"stupidchess.jmn23.com"` | Hostname to be assigned to the ELB for the service |
134+
| controller.service.type | string | `"LoadBalancer"` | |
135+
136+
## `chart.valuesSection`
137+
138+
## Values
139+
140+
| Key | Type | Default | Description |
141+
|-----|------|---------|-------------|
142+
| controller.extraVolumes[0].configMap.name | string | `"nginx-ingress-config"` | Uses the name of the configmap created by this chart |
143+
| controller.extraVolumes[0].name | string | `"config-volume"` | |
144+
| controller.image.repository | string | `"nginx-ingress-controller"` | |
145+
| controller.image.tag | string | `"18.0831"` | |
146+
| controller.ingressClass | string | `"nginx"` | Name of the ingress class to route through this controller |
147+
| controller.name | string | `"controller"` | |
148+
| controller.persistentVolumeClaims | list | the chart will construct this list internally unless specified | List of persistent volume claims to create. For very long comments, break them into multiple lines. |
149+
| controller.podLabels | object | `{}` | The labels to be applied to instances of the controller pod |
150+
| controller.publishService.enabled | bool | `false` | Whether to expose the ingress controller to the public world |
151+
| controller.replicas | int | `nil` | Number of nginx-ingress pods to load balance between |
152+
| controller.service.annotations."external-dns.alpha.kubernetes.io/hostname" | string | `"stupidchess.jmn23.com"` | Hostname to be assigned to the ELB for the service |
153+
| controller.service.type | string | `"LoadBalancer"` | |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
{{ template "chart.header" . }}
2+
## `chart.deprecationWarning`
3+
4+
5+
6+
7+
8+
9+
10+
11+
{{ template "chart.deprecationWarning" . }}
12+
13+
## `chart.description`
14+
15+
{{ template "chart.description" . }}
16+
17+
## `chart.version`
18+
19+
{{ template "chart.version" . }}
20+
21+
## `chart.versionLine`
22+
23+
{{ template "chart.versionLine" . }}
24+
25+
## `chart.versionBadge`
26+
27+
{{ template "chart.versionBadge" . }}
28+
29+
## `chart.type`
30+
31+
{{ template "chart.type" . }}
32+
33+
## `chart.typeLine`
34+
35+
{{ template "chart.typeLine" . }}
36+
37+
## `chart.typeBadge`
38+
39+
{{ template "chart.typeBadge" . }}
40+
41+
## `chart.appVersion`
42+
43+
{{ template "chart.appVersion" . }}
44+
45+
## `chart.appVersionLine`
46+
47+
{{ template "chart.appVersionLine" . }}
48+
49+
## `chart.appVersionBadge`
50+
51+
{{ template "chart.appVersionBadge" . }}
52+
53+
## `chart.homepage`
54+
55+
{{ template "chart.homepage" . }}
56+
57+
## `chart.homepageLine`
58+
59+
{{ template "chart.homepageLine" . }}
60+
61+
## `chart.maintainersHeader`
62+
63+
{{ template "chart.maintainersHeader" . }}
64+
65+
## `chart.maintainersTable`
66+
67+
{{ template "chart.maintainersTable" . }}
68+
69+
## `chart.maintainersSection`
70+
71+
{{ template "chart.maintainersSection" . }}
72+
73+
## `chart.sourcesHeader`
74+
75+
{{ template "chart.sourcesHeader" . }}
76+
77+
## `chart.sourcesList`
78+
79+
{{ template "chart.sourcesList" . }}
80+
81+
## `chart.sourcesSection`
82+
83+
{{ template "chart.sourcesSection" . }}
84+
85+
## `chart.kubeVersion`
86+
87+
{{ template "chart.kubeVersion" . }}
88+
89+
## `chart.kubeVersionLine`
90+
91+
{{ template "chart.kubeVersionLine" . }}
92+
93+
## `chart.requirementsHeader`
94+
95+
{{ template "chart.requirementsHeader" . }}
96+
97+
## `chart.requirementsTable`
98+
99+
{{ template "chart.requirementsTable" . }}
100+
101+
## `chart.requirementsSection`
102+
103+
{{ template "chart.requirementsSection" . }}
104+
105+
## `chart.valuesHeader`
106+
107+
{{ template "chart.valuesHeader" . }}
108+
109+
## `chart.valuesTable`
110+
111+
{{ template "chart.valuesTable" . }}
112+
113+
## `chart.valuesSection`
114+
115+
{{ template "chart.valuesSection" . }}

0 commit comments

Comments
 (0)