sprig
sprig copied to clipboard
Extend `genSignedCert` function parameter `ips` type
How to reproduce
The code below produces the error ... at <$ips>: wrong type for value; expected []interface {}; got []string
{{- $ips := splitList "," "1.1.1.1,2.2.2.2" -}}
{{- $genCert := genSignedCert .cn $ips nil 3650 .ca }}
Question/suggestion
Probably, the type []string
should be acceptable ?
Reasons:
- it seems to be correct logically
- it is useful when dealing with raw user input.
Workaround
Adding compact
function does the trick
{{- $ips := splitList "," "1.1.1.1,2.2.2.2" | compact -}}
{{- $genCert := genSignedCert .cn $ips nil 3650 .ca }}
Environment info
Output of helm version
:
version.BuildInfo{Version:"v3.4.1", GitCommit:"c4e74854886b2efe3321e185578e6db9be0a6e29", GitTreeState:"dirty", GoVersion:"go1.15.4"}