templates/extra-manifests.yaml can handle an extraObject being supplied either as an object or a string:
{{ range .Values.extraObjects }}
---
{{ if typeIs "string" . }}
{{- tpl . $ }}
{{- else }}
{{- tpl (toYaml .) $ }}
{{- end }}
{{ end }}
The string-valued case is what you get e.g. if the extraObjects are being supplied via Helm set-file arguments. Also only string-valued template input will support Helm value substitution that is not inside a string within the template, such as a port number ... the toYaml invocation in the object-valued form will error on that situation.
However, values.schema.json only supports object-valued input:
"extraObjects": {
"type": "array",
"items": {
"type": "object"
},
"default": []
},
So an attempt to provide string-valued extraObjects will be rejected.
In order to allow string input, it seems like the schema would instead need to be something like:
"extraObjects": {
"type": "array",
"items": {
"type": ["string","object"]
},
"default": []
},
templates/extra-manifests.yaml can handle an extraObject being supplied either as an object or a string:
The string-valued case is what you get e.g. if the extraObjects are being supplied via Helm set-file arguments. Also only string-valued template input will support Helm value substitution that is not inside a string within the template, such as a port number ... the toYaml invocation in the object-valued form will error on that situation.
However, values.schema.json only supports object-valued input:
So an attempt to provide string-valued extraObjects will be rejected.
In order to allow string input, it seems like the schema would instead need to be something like: