sensu / sensu-plugin-sdk

A framework for creating Sensu plugins
MIT License
7 stars 8 forks source link

Bug: Annotation overrides for StringSlice arguments are not treated as space delimited like cmdline and env var. #56

Open jspaleta opened 3 years ago

jspaleta commented 3 years ago

Problem

Annotation overrides for StringSlice arguments assume a json encoding instead of using the space delimited behavior used in the arguments and environment variables.

Let's make arguments parse in a more consistent manner.

Straw proposal

  1. Arguments of cobra StringSlice type use CSV styled space delimited in al contexts.
  2. Arguments of cobra StringArray type are parsed in ENV and annotation as a json array of strings, if not parsable as json assume its a single string.
echlebek commented 2 years ago

I'll have to look at this one in light of the recent StringArray merge, I don't think this was captured.