summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorAditya R <arajan@redhat.com>2022-02-18 16:54:18 +0530
committerAditya R <arajan@redhat.com>2022-02-21 23:52:48 +0530
commit9ce61e3a4911ad89151788539f10d96f69362bc3 (patch)
treeab975d947d99bb81f297f65c1e6892dd90979842 /cmd
parenta88ea2c68b1ef01077a53b1c568b85667dcbc1e2 (diff)
downloadpodman-9ce61e3a4911ad89151788539f10d96f69362bc3.tar.gz
podman-9ce61e3a4911ad89151788539f10d96f69362bc3.tar.bz2
podman-9ce61e3a4911ad89151788539f10d96f69362bc3.zip
kube: honor --build=false and make --build=true by default
`podman play kube` tries to build images even if `--build` is set to false so lets honor that and make `--build` , `true` by default so it matches the original behviour. Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/play/kube.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/podman/play/kube.go b/cmd/podman/play/kube.go
index ccf6ea861..1a430f2dc 100644
--- a/cmd/podman/play/kube.go
+++ b/cmd/podman/play/kube.go
@@ -27,6 +27,7 @@ type playKubeOptionsWrapper struct {
TLSVerifyCLI bool
CredentialsCLI string
StartCLI bool
+ BuildCLI bool
}
var (
@@ -117,7 +118,7 @@ func init() {
_ = kubeCmd.RegisterFlagCompletionFunc(configmapFlagName, completion.AutocompleteDefault)
buildFlagName := "build"
- flags.BoolVar(&kubeOptions.Build, buildFlagName, false, "Build all images in a YAML (given Containerfiles exist)")
+ flags.BoolVar(&kubeOptions.BuildCLI, buildFlagName, false, "Build all images in a YAML (given Containerfiles exist)")
}
if !registry.IsRemote() {
@@ -138,6 +139,9 @@ func kube(cmd *cobra.Command, args []string) error {
if cmd.Flags().Changed("start") {
kubeOptions.Start = types.NewOptionalBool(kubeOptions.StartCLI)
}
+ if cmd.Flags().Changed("build") {
+ kubeOptions.Build = types.NewOptionalBool(kubeOptions.BuildCLI)
+ }
if kubeOptions.Authfile != "" {
if _, err := os.Stat(kubeOptions.Authfile); err != nil {
return err