'Helm template - dynamic error message for required function
I'm creating a configmap with required parameters. I wanted the error message given by helm to have the key name. So its easy to identify what was missed.
This is the part my template where i'm using the required function.
{{ $file_name }}.yml: |-
{{- range $key, $value := .Values.requiredParameters }}
{{ $key }}: {{ $value | required "missing a required parameter" }}
{{- end }}
I wanted the error message to look something like "$key is a required parameter". Is there a way to make it possible?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
