summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-05 10:10:16 -0400
committerGitHub <noreply@github.com>2021-05-05 10:10:16 -0400
commit120e1b78ef28e9220337423ea3e11486c813aa55 (patch)
tree991d631d237a4a6c38e6452150ee73e633fb09a0 /pkg/domain/infra/abi
parenta278195af3423f882c1f5bb218792f7c2ce10a3c (diff)
parentfb7d16c7a841bbe2c02cb97b2820334b617e7f44 (diff)
downloadpodman-120e1b78ef28e9220337423ea3e11486c813aa55.tar.gz
podman-120e1b78ef28e9220337423ea3e11486c813aa55.tar.bz2
podman-120e1b78ef28e9220337423ea3e11486c813aa55.zip
Merge pull request #10208 from Luap99/play-kube-mac
add --mac-address to podman play kube
Diffstat (limited to 'pkg/domain/infra/abi')
-rw-r--r--pkg/domain/infra/abi/play.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index d235c9ed8..64e7f208c 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -198,11 +198,17 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
}
if len(options.StaticIPs) > *ipIndex {
p.StaticIP = &options.StaticIPs[*ipIndex]
- *ipIndex++
} else if len(options.StaticIPs) > 0 {
- // only warn if the user has set at least one ip ip
+ // only warn if the user has set at least one ip
logrus.Warn("No more static ips left using a random one")
}
+ if len(options.StaticMACs) > *ipIndex {
+ p.StaticMAC = &options.StaticMACs[*ipIndex]
+ } else if len(options.StaticIPs) > 0 {
+ // only warn if the user has set at least one mac
+ logrus.Warn("No more static macs left using a random one")
+ }
+ *ipIndex++
// Create the Pod
pod, err := generate.MakePod(p, ic.Libpod)