summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-03-09 16:19:59 -0500
committerGitHub <noreply@github.com>2022-03-09 16:19:59 -0500
commitacfcecf2ae41528d1d7ecd43d37d8fd554f587bc (patch)
treeb92171a480a5d4d155f311a5e0a815efb4330ddc /cmd/podman
parent4e21acd7b81865300266c9e9916a49454d72a6c7 (diff)
parent675d775eb54f1614a542dfcbbc5a4aa857cc0db0 (diff)
downloadpodman-acfcecf2ae41528d1d7ecd43d37d8fd554f587bc.tar.gz
podman-acfcecf2ae41528d1d7ecd43d37d8fd554f587bc.tar.bz2
podman-acfcecf2ae41528d1d7ecd43d37d8fd554f587bc.zip
Merge pull request #12913 from rhatdan/kube
Add --context-dir option to podman play kube
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/play/kube.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/podman/play/kube.go b/cmd/podman/play/kube.go
index 1a430f2dc..563a6251c 100644
--- a/cmd/podman/play/kube.go
+++ b/cmd/podman/play/kube.go
@@ -119,9 +119,11 @@ func init() {
buildFlagName := "build"
flags.BoolVar(&kubeOptions.BuildCLI, buildFlagName, false, "Build all images in a YAML (given Containerfiles exist)")
- }
- if !registry.IsRemote() {
+ contextDirFlagName := "context-dir"
+ flags.StringVar(&kubeOptions.ContextDir, contextDirFlagName, "", "Path to top level of context directory")
+ _ = kubeCmd.RegisterFlagCompletionFunc(contextDirFlagName, completion.AutocompleteDefault)
+
flags.StringVar(&kubeOptions.SignaturePolicy, "signature-policy", "", "`Pathname` of signature policy file (not usually used)")
_ = flags.MarkHidden("signature-policy")
@@ -147,6 +149,9 @@ func kube(cmd *cobra.Command, args []string) error {
return err
}
}
+ if kubeOptions.ContextDir != "" && kubeOptions.Build != types.OptionalBoolTrue {
+ return errors.New("--build must be specified when using --context-dir option")
+ }
if kubeOptions.CredentialsCLI != "" {
creds, err := util.ParseRegistryCreds(kubeOptions.CredentialsCLI)
if err != nil {