cli: podman kube play --configmap use StringArray()

This option accepts a file path so we should allow commas in it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2023-12-08 18:14:34 +01:00
parent 2be4b007b0
commit 3e10a68328
2 changed files with 2 additions and 2 deletions
cmd/podman/kube
test/system

@ -165,7 +165,7 @@ func playFlags(cmd *cobra.Command) {
flags.BoolVarP(&playOptions.Wait, waitFlagName, "w", false, "Clean up all objects created when a SIGTERM is received or pods exit")
configmapFlagName := "configmap"
flags.StringSliceVar(&playOptions.ConfigMaps, configmapFlagName, []string{}, "`Pathname` of a YAML file containing a kubernetes configmap")
flags.StringArrayVar(&playOptions.ConfigMaps, configmapFlagName, []string{}, "`Pathname` of a YAML file containing a kubernetes configmap")
_ = cmd.RegisterFlagCompletionFunc(configmapFlagName, completion.AutocompleteDefault)
noTruncFlagName := "no-trunc"

@ -699,7 +699,7 @@ spec:
}
@test "podman kube play with configmaps" {
configmap_file=${PODMAN_TMPDIR}/play_kube_configmap_configmaps$(random_string 6).yaml
configmap_file=${PODMAN_TMPDIR}/play_kube_configmap_configmaps$(random_string 6),withcomma.yaml
echo "
---
apiVersion: v1