You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The purpose and format of a property in the charts values.yaml must be communicated to the chart user. Just the key in the values is often not enough to describe its purpose and usage.
15
+
16
+
## Considered Options
17
+
18
+
* Write an extensive ReadMe file that desribes all aspects of the values.yaml.
19
+
* Add comments directly inside the values.yaml file.
20
+
21
+
## Decision Outcome
22
+
23
+
Chosen option: "Add comments directly" in most cases. When detailed explanation is needed a paragraph in a ReadMe.md can be added.
24
+
25
+
We follow the [documentation recommendation by Helm](https://helm.sh/docs/chart_best_practices/values/#document-valuesyaml) to start each comment with the property name.
26
+
27
+
> Every defined property in `values.yaml` should be documented. The documentation string should begin with the name of the property that it describes, and then give at least a one-sentence description.
28
+
29
+
> Beginning each comment with the name of the parameter it documents makes it easy to grep out documentation, and will enable documentation tools to reliably correlate doc strings with the parameters they describe.
30
+
31
+
### Pros and Cons of Comments
32
+
33
+
Pro:
34
+
- It is easy to write a comment directly beside the YAML structure.
35
+
- A comment directly explains the YAML key and value.
36
+
- can be processed by tools parsing the values.yaml file.
37
+
38
+
Cons:
39
+
- The documentation is only visible when viewing the raw values.yaml file
40
+
41
+
## Example
42
+
43
+
```yaml
44
+
# serverHost is the host name for the webserver
45
+
serverHost: example
46
+
# serverPort is the HTTP listener port for the webserver
0 commit comments