summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorBenedikt Ziemons <ben@rs485.network>2020-12-23 22:59:39 +0100
committerBenedikt Ziemons <ben@rs485.network>2020-12-23 22:59:39 +0100
commit8566a5330b8a023797190a9f0c3989b8610dee43 (patch)
tree28ea22e74eeb4adfbbc4d48d7f298199cd153e12 /pkg/domain
parent9ac5ed1e08d271a138e92af84640711bae64044f (diff)
downloadpodman-8566a5330b8a023797190a9f0c3989b8610dee43.tar.gz
podman-8566a5330b8a023797190a9f0c3989b8610dee43.tar.bz2
podman-8566a5330b8a023797190a9f0c3989b8610dee43.zip
Refactor kube.ToSpecGen parameters to struct
Create kube.CtrSpecGenOptions and document parameters. Follow-up on https://github.com/containers/podman/pull/8792#discussion_r546673758 Signed-off-by: Benedikt Ziemons <ben@rs485.network>
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/infra/abi/play.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index 4135e8882..cbc74a2f2 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -226,7 +226,19 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
return nil, err
}
- specGen, err := kube.ToSpecGen(ctx, container, container.Image, newImage, volumes, pod.ID(), podName, podInfraID, configMaps, seccompPaths, ctrRestartPolicy, p.NetNS.IsHost())
+ specgenOpts := kube.CtrSpecGenOptions{
+ Container: container,
+ Image: newImage,
+ Volumes: volumes,
+ PodID: pod.ID(),
+ PodName: podName,
+ PodInfraID: podInfraID,
+ ConfigMaps: configMaps,
+ SeccompPaths: seccompPaths,
+ RestartPolicy: ctrRestartPolicy,
+ NetNSIsHost: p.NetNS.IsHost(),
+ }
+ specGen, err := kube.ToSpecGen(ctx, &specgenOpts)
if err != nil {
return nil, err
}