mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
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:
@ -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")
|
flags.BoolVarP(&playOptions.Wait, waitFlagName, "w", false, "Clean up all objects created when a SIGTERM is received or pods exit")
|
||||||
|
|
||||||
configmapFlagName := "configmap"
|
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)
|
_ = cmd.RegisterFlagCompletionFunc(configmapFlagName, completion.AutocompleteDefault)
|
||||||
|
|
||||||
noTruncFlagName := "no-trunc"
|
noTruncFlagName := "no-trunc"
|
||||||
|
@ -699,7 +699,7 @@ spec:
|
|||||||
}
|
}
|
||||||
|
|
||||||
@test "podman kube play with configmaps" {
|
@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 "
|
echo "
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
Reference in New Issue
Block a user