k8s-device-plugin
k8s-device-plugin copied to clipboard
use the helm quote function to wrap helm values in quotes
It's generally recommended to use the quote
function instead of explicitly wrapping helm values with quotes in-line
I'm not necessarily opposed to this, just curious is there there is any magic going on with doing things this way. Do all double quotes within the string being passed to quote
get escaped, for example?
@klueska This is one of the best practices of helm. I also think it's more readable as it is explicit in its intent to wrap a string in quotes when using templates
Do all double quotes within the string being passed to quote get escaped, for example?
Yes, the quote
function is pretty much the equivalent of fmt.Sprintf("%q", str)
. See here
@elezar I think this would be a safer change as it results in no changes to the yaml parser. Strings like true
and false
unquoted are interpreted as booleans. In this helm chart, we are choosing to quote them explicitly.