Skip to content

Commit

Permalink
cli: podman kube play --configmap use StringArray()
Browse files Browse the repository at this point in the history
This option accepts a file path so we should allow commas in it.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Dec 11, 2023
1 parent 2be4b00 commit 3e10a68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/podman/kube/play.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion test/system/700-play.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3e10a68

Please sign in to comment.