summaryrefslogtreecommitdiff
path: root/pkg/bindings/play
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-12-13 15:56:20 +0100
committerPaul Holzinger <pholzing@redhat.com>2021-12-14 15:23:40 +0100
commit3e9af2029f1f92fbc069f81ba9ca90c090617e9c (patch)
tree2722625080848dd49e91ac60c93b10f5e5cda565 /pkg/bindings/play
parent535818414c2a6bdcf6434e36c33775ea1a43f1cf (diff)
downloadpodman-3e9af2029f1f92fbc069f81ba9ca90c090617e9c.tar.gz
podman-3e9af2029f1f92fbc069f81ba9ca90c090617e9c.tar.bz2
podman-3e9af2029f1f92fbc069f81ba9ca90c090617e9c.zip
play kube add support for multiple networks
Allow the same --network options for play kube as for podman run/create. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/bindings/play')
-rw-r--r--pkg/bindings/play/types.go4
-rw-r--r--pkg/bindings/play/types_kube_options.go6
2 files changed, 5 insertions, 5 deletions
diff --git a/pkg/bindings/play/types.go b/pkg/bindings/play/types.go
index 011f7f9ca..ca639e46b 100644
--- a/pkg/bindings/play/types.go
+++ b/pkg/bindings/play/types.go
@@ -15,8 +15,8 @@ type KubeOptions struct {
Username *string
// Password for authenticating against the registry.
Password *string
- // Network - name of the CNI network to connect to.
- Network *string
+ // Network - name of the networks to connect to.
+ Network *[]string
// NoHosts - do not generate /etc/hosts file in pod's containers
NoHosts *bool
// Quiet - suppress output when pulling images.
diff --git a/pkg/bindings/play/types_kube_options.go b/pkg/bindings/play/types_kube_options.go
index 344771e0c..593f026a3 100644
--- a/pkg/bindings/play/types_kube_options.go
+++ b/pkg/bindings/play/types_kube_options.go
@@ -79,15 +79,15 @@ func (o *KubeOptions) GetPassword() string {
}
// WithNetwork set field Network to given value
-func (o *KubeOptions) WithNetwork(value string) *KubeOptions {
+func (o *KubeOptions) WithNetwork(value []string) *KubeOptions {
o.Network = &value
return o
}
// GetNetwork returns value of field Network
-func (o *KubeOptions) GetNetwork() string {
+func (o *KubeOptions) GetNetwork() []string {
if o.Network == nil {
- var z string
+ var z []string
return z
}
return *o.Network