From d7292dbf2731701c122656400ce5007693efe3c8 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 15 Apr 2021 17:42:05 +0200 Subject: add --ip to podman play kube Add a new --ip flag to podman play kube. This is used to specify a static IP address which should be used for the pod. This option can be specified several times because play kube can create more than one pod. Fixes #8442 Signed-off-by: Paul Holzinger --- cmd/podman/play/kube.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd') diff --git a/cmd/podman/play/kube.go b/cmd/podman/play/kube.go index ddba5dc0f..30d6d86f0 100644 --- a/cmd/podman/play/kube.go +++ b/cmd/podman/play/kube.go @@ -65,6 +65,10 @@ func init() { flags.StringVar(&kubeOptions.Network, networkFlagName, "", "Connect pod to CNI network(s)") _ = kubeCmd.RegisterFlagCompletionFunc(networkFlagName, common.AutocompleteNetworkFlag) + staticIPFlagName := "ip" + flags.IPSliceVar(&kubeOptions.StaticIPs, staticIPFlagName, nil, "Static IP addresses to assign to the pods") + _ = kubeCmd.RegisterFlagCompletionFunc(staticIPFlagName, completion.AutocompleteNone) + logDriverFlagName := "log-driver" flags.StringVar(&kubeOptions.LogDriver, logDriverFlagName, "", "Logging driver for the container") _ = kubeCmd.RegisterFlagCompletionFunc(logDriverFlagName, common.AutocompleteLogDriver) -- cgit v1.2.3-54-g00ecf