aboutsummaryrefslogtreecommitdiff
path: root/libpod/kube.go
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-03-15 12:55:06 +0100
committerPaul Holzinger <paul.holzinger@web.de>2021-03-15 14:02:04 +0100
commit57e8c66322849ff60e6126616c0c9883a80fb139 (patch)
treedc91b324d82675d66c6b1f37d6ca97c82597ae30 /libpod/kube.go
parent762148deb6be6925d17bd12f219f7385e1402439 (diff)
downloadpodman-57e8c66322849ff60e6126616c0c9883a80fb139.tar.gz
podman-57e8c66322849ff60e6126616c0c9883a80fb139.tar.bz2
podman-57e8c66322849ff60e6126616c0c9883a80fb139.zip
Do not leak libpod package into the remote client
Some packages used by the remote client imported the libpod package. This is not wanted because it adds unnecessary bloat to the client and also causes problems with platform specific code(linux only), see #9710. The solution is to move the used functions/variables into extra packages which do not import libpod. This change shrinks the remote client size more than 6MB compared to the current master. [NO TESTS NEEDED] I have no idea how to test this properly but with #9710 the cross compile should fail. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'libpod/kube.go')
-rw-r--r--libpod/kube.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/kube.go b/libpod/kube.go
index 6feb69fea..407c4ae00 100644
--- a/libpod/kube.go
+++ b/libpod/kube.go
@@ -83,11 +83,11 @@ func (p *Pod) GenerateForKube() (*v1.Pod, []v1.ServicePort, error) {
for _, ctr := range allContainers {
if !ctr.IsInfra() {
switch ctr.Config().RestartPolicy {
- case RestartPolicyAlways:
+ case define.RestartPolicyAlways:
pod.Spec.RestartPolicy = v1.RestartPolicyAlways
- case RestartPolicyOnFailure:
+ case define.RestartPolicyOnFailure:
pod.Spec.RestartPolicy = v1.RestartPolicyOnFailure
- case RestartPolicyNo:
+ case define.RestartPolicyNo:
pod.Spec.RestartPolicy = v1.RestartPolicyNever
default: // some pod create from cmdline, such as "", so set it to Never
pod.Spec.RestartPolicy = v1.RestartPolicyNever