Standardize helper comments and names (prefix all helper names with stackstorm-ha) by cognifloyd · Pull Request #272 · StackStorm/stackstorm-k8s
This standardizes the template helpers to follow Helm's documented "Best Practices":
https://helm.sh/docs/chart_best_practices/templates/#comments-yaml-comments-vs-template-comments
Template comments should be used when documenting features of a template, such as explaining a defined template:
{{- /* mychart.shortname provides a 6 char truncated version of the release name. */}} {{ define "mychart.shortname" -}} {{ .Release.Name | trunc 6 }} {{- end -}}
https://helm.sh/docs/chart_best_practices/templates/#names-of-defined-templates
Defined templates (templates created inside a {{ define }} directive) are globally accessible. ...
For that reason, all defined template names should be namespaced.Correct:
{{- define "nginx.fullname" }} {{/* ... */}} {{ end -}}Incorrect:
{{- define "fullname" -}} {{/* ... */}} {{ end -}}
- use helm-style comments in _helpers
- prefix imageRepository helper with stackstorm-ha
- prefix hyphenPrefix helper with stackstorm-ha
- prefix st2-config-volume* helpers with stackstorm-ha
- prefix init-containers-* helpers with stackstorm-ha
- prefix pack-configs-volume* helpers with stackstorm-ha
- prefix packs-volume* helpers with stackstorm-ha
- prefix packs-initContainers helper with stackstorm-ha
- prefix packs-pullSecrets helper with stackstorm-ha
- add changelog entry