summaryrefslogtreecommitdiff
path: root/cmd/kpod
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/kpod')
-rw-r--r--cmd/kpod/common.go8
-rw-r--r--cmd/kpod/create.go2
-rw-r--r--cmd/kpod/diff.go2
-rw-r--r--cmd/kpod/history.go2
-rw-r--r--cmd/kpod/images.go4
-rw-r--r--cmd/kpod/info.go2
-rw-r--r--cmd/kpod/inspect.go2
-rw-r--r--cmd/kpod/kill.go2
-rw-r--r--cmd/kpod/load.go2
-rw-r--r--cmd/kpod/login.go2
-rw-r--r--cmd/kpod/logout.go2
-rw-r--r--cmd/kpod/logs.go2
-rw-r--r--cmd/kpod/mount.go2
-rw-r--r--cmd/kpod/pause.go2
-rw-r--r--cmd/kpod/ps.go2
-rw-r--r--cmd/kpod/pull.go2
-rw-r--r--cmd/kpod/push.go2
-rw-r--r--cmd/kpod/rename.go2
-rw-r--r--cmd/kpod/rm.go2
-rw-r--r--cmd/kpod/run.go2
-rw-r--r--cmd/kpod/save.go2
-rw-r--r--cmd/kpod/spec.go70
-rw-r--r--cmd/kpod/stats.go2
-rw-r--r--cmd/kpod/stop.go2
-rw-r--r--cmd/kpod/tag.go2
-rw-r--r--cmd/kpod/unpause.go2
-rw-r--r--cmd/kpod/wait.go2
27 files changed, 65 insertions, 65 deletions
diff --git a/cmd/kpod/common.go b/cmd/kpod/common.go
index 24f20f7ed..d924f17a3 100644
--- a/cmd/kpod/common.go
+++ b/cmd/kpod/common.go
@@ -9,9 +9,9 @@ import (
is "github.com/containers/image/storage"
"github.com/containers/storage"
"github.com/fatih/camelcase"
+ "github.com/pkg/errors"
"github.com/projectatomic/libpod/libkpod"
"github.com/projectatomic/libpod/libpod"
- "github.com/pkg/errors"
"github.com/urfave/cli"
)
@@ -19,7 +19,7 @@ var (
stores = make(map[storage.Store]struct{})
)
-const CrioConfigPath = "/etc/crio/crio.conf"
+const crioConfigPath = "/etc/crio/crio.conf"
func getStore(c *libkpod.Config) (storage.Store, error) {
options := storage.DefaultStoreOptions
@@ -66,8 +66,8 @@ func getConfig(c *cli.Context) (*libkpod.Config, error) {
var configFile string
if c.GlobalIsSet("config") {
configFile = c.GlobalString("config")
- } else if _, err := os.Stat(CrioConfigPath); err == nil {
- configFile = CrioConfigPath
+ } else if _, err := os.Stat(crioConfigPath); err == nil {
+ configFile = crioConfigPath
}
// load and merge the configfile from the commandline or use
// the default crio config file
diff --git a/cmd/kpod/create.go b/cmd/kpod/create.go
index 2e79c883e..ddfe9e5ed 100644
--- a/cmd/kpod/create.go
+++ b/cmd/kpod/create.go
@@ -5,8 +5,8 @@ import (
"strconv"
"github.com/docker/go-units"
- "github.com/projectatomic/libpod/libpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libpod"
"github.com/urfave/cli"
pb "k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime"
)
diff --git a/cmd/kpod/diff.go b/cmd/kpod/diff.go
index fc2dc8ef8..3a3b82e15 100644
--- a/cmd/kpod/diff.go
+++ b/cmd/kpod/diff.go
@@ -4,8 +4,8 @@ import (
"fmt"
"github.com/containers/storage/pkg/archive"
- "github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/history.go b/cmd/kpod/history.go
index ea91904ad..ab2115aed 100644
--- a/cmd/kpod/history.go
+++ b/cmd/kpod/history.go
@@ -8,9 +8,9 @@ import (
"github.com/containers/image/types"
units "github.com/docker/go-units"
- "github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/images.go b/cmd/kpod/images.go
index 36727a897..0eac22864 100644
--- a/cmd/kpod/images.go
+++ b/cmd/kpod/images.go
@@ -9,11 +9,11 @@ import (
"github.com/containers/image/types"
"github.com/containers/storage"
"github.com/docker/go-units"
+ digest "github.com/opencontainers/go-digest"
+ "github.com/pkg/errors"
"github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/projectatomic/libpod/libpod"
"github.com/projectatomic/libpod/libpod/common"
- digest "github.com/opencontainers/go-digest"
- "github.com/pkg/errors"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/info.go b/cmd/kpod/info.go
index 3c634ac9c..0b8ae75b4 100644
--- a/cmd/kpod/info.go
+++ b/cmd/kpod/info.go
@@ -8,8 +8,8 @@ import (
"runtime"
"github.com/docker/docker/pkg/system"
- "github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/inspect.go b/cmd/kpod/inspect.go
index 78439ed89..a70e285ac 100644
--- a/cmd/kpod/inspect.go
+++ b/cmd/kpod/inspect.go
@@ -1,10 +1,10 @@
package main
import (
+ "github.com/pkg/errors"
"github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/projectatomic/libpod/libkpod"
"github.com/projectatomic/libpod/libpod/images"
- "github.com/pkg/errors"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/kill.go b/cmd/kpod/kill.go
index 686305781..9fab7cc88 100644
--- a/cmd/kpod/kill.go
+++ b/cmd/kpod/kill.go
@@ -5,8 +5,8 @@ import (
"os"
"github.com/docker/docker/pkg/signal"
- "github.com/projectatomic/libpod/libkpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libkpod"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/load.go b/cmd/kpod/load.go
index 392ce08ac..31975fc76 100644
--- a/cmd/kpod/load.go
+++ b/cmd/kpod/load.go
@@ -5,8 +5,8 @@ import (
"io/ioutil"
"os"
- "github.com/projectatomic/libpod/libpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libpod"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/login.go b/cmd/kpod/login.go
index 956de6d14..df74a2fdf 100644
--- a/cmd/kpod/login.go
+++ b/cmd/kpod/login.go
@@ -9,8 +9,8 @@ import (
"github.com/containers/image/docker"
"github.com/containers/image/pkg/docker/config"
- "github.com/projectatomic/libpod/libpod/common"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libpod/common"
"github.com/urfave/cli"
"golang.org/x/crypto/ssh/terminal"
)
diff --git a/cmd/kpod/logout.go b/cmd/kpod/logout.go
index 0b07f1a63..9d1d52e32 100644
--- a/cmd/kpod/logout.go
+++ b/cmd/kpod/logout.go
@@ -4,8 +4,8 @@ import (
"fmt"
"github.com/containers/image/pkg/docker/config"
- "github.com/projectatomic/libpod/libpod/common"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libpod/common"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/logs.go b/cmd/kpod/logs.go
index 23c78688d..1d0cea996 100644
--- a/cmd/kpod/logs.go
+++ b/cmd/kpod/logs.go
@@ -4,8 +4,8 @@ import (
"fmt"
"time"
- "github.com/projectatomic/libpod/libkpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libkpod"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/mount.go b/cmd/kpod/mount.go
index 4a68621ac..d9df7ffa5 100644
--- a/cmd/kpod/mount.go
+++ b/cmd/kpod/mount.go
@@ -4,8 +4,8 @@ import (
js "encoding/json"
"fmt"
- of "github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/pkg/errors"
+ of "github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/pause.go b/cmd/kpod/pause.go
index 510aba424..094013e6d 100644
--- a/cmd/kpod/pause.go
+++ b/cmd/kpod/pause.go
@@ -2,8 +2,8 @@ package main
import (
"fmt"
- "github.com/projectatomic/libpod/libkpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libkpod"
"github.com/urfave/cli"
"os"
)
diff --git a/cmd/kpod/ps.go b/cmd/kpod/ps.go
index 2e981bfaa..a5f64ed11 100644
--- a/cmd/kpod/ps.go
+++ b/cmd/kpod/ps.go
@@ -15,10 +15,10 @@ import (
"k8s.io/apimachinery/pkg/fields"
+ "github.com/pkg/errors"
"github.com/projectatomic/libpod/cmd/kpod/formats"
"github.com/projectatomic/libpod/libkpod"
"github.com/projectatomic/libpod/oci"
- "github.com/pkg/errors"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/pull.go b/cmd/kpod/pull.go
index 662bb2faa..399e8c1b4 100644
--- a/cmd/kpod/pull.go
+++ b/cmd/kpod/pull.go
@@ -8,9 +8,9 @@ import (
"golang.org/x/crypto/ssh/terminal"
"github.com/containers/image/types"
+ "github.com/pkg/errors"
"github.com/projectatomic/libpod/libpod"
"github.com/projectatomic/libpod/libpod/common"
- "github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/push.go b/cmd/kpod/push.go
index 518c1d8dc..4f1218a08 100644
--- a/cmd/kpod/push.go
+++ b/cmd/kpod/push.go
@@ -7,9 +7,9 @@ import (
"github.com/containers/image/types"
"github.com/containers/storage/pkg/archive"
+ "github.com/pkg/errors"
"github.com/projectatomic/libpod/libpod"
"github.com/projectatomic/libpod/libpod/common"
- "github.com/pkg/errors"
"github.com/urfave/cli"
"golang.org/x/crypto/ssh/terminal"
)
diff --git a/cmd/kpod/rename.go b/cmd/kpod/rename.go
index 68b9a6108..749dd756d 100644
--- a/cmd/kpod/rename.go
+++ b/cmd/kpod/rename.go
@@ -1,8 +1,8 @@
package main
import (
- "github.com/projectatomic/libpod/libkpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libkpod"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/rm.go b/cmd/kpod/rm.go
index 8f51befc9..0d3027abd 100644
--- a/cmd/kpod/rm.go
+++ b/cmd/kpod/rm.go
@@ -3,8 +3,8 @@ package main
import (
"fmt"
- "github.com/projectatomic/libpod/libkpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libkpod"
"github.com/urfave/cli"
"golang.org/x/net/context"
)
diff --git a/cmd/kpod/run.go b/cmd/kpod/run.go
index bf9375d95..f1563edc3 100644
--- a/cmd/kpod/run.go
+++ b/cmd/kpod/run.go
@@ -3,8 +3,8 @@ package main
import (
"fmt"
- "github.com/projectatomic/libpod/libpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libpod"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/save.go b/cmd/kpod/save.go
index 55998fe4d..287821f0a 100644
--- a/cmd/kpod/save.go
+++ b/cmd/kpod/save.go
@@ -4,8 +4,8 @@ import (
"io"
"os"
- "github.com/projectatomic/libpod/libpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libpod"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/spec.go b/cmd/kpod/spec.go
index 4b05005bd..b6fb8b128 100644
--- a/cmd/kpod/spec.go
+++ b/cmd/kpod/spec.go
@@ -4,10 +4,10 @@ import (
"fmt"
"strings"
- "github.com/projectatomic/libpod/libpod"
- ann "github.com/projectatomic/libpod/pkg/annotations"
spec "github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libpod"
+ ann "github.com/projectatomic/libpod/pkg/annotations"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"golang.org/x/sys/unix"
@@ -15,84 +15,84 @@ import (
// Parses information needed to create a container into an OCI runtime spec
func createConfigToOCISpec(config *createConfig) (*spec.Spec, error) {
- spec := config.GetDefaultLinuxSpec()
- spec.Process.Cwd = config.workDir
- spec.Process.Args = config.command
+ configSpec := config.GetDefaultLinuxSpec()
+ configSpec.Process.Cwd = config.workDir
+ configSpec.Process.Args = config.command
- spec.Process.Terminal = config.tty
+ configSpec.Process.Terminal = config.tty
// User and Group must go together
- spec.Process.User.UID = config.user
- spec.Process.User.GID = config.group
- spec.Process.User.AdditionalGids = config.groupAdd
+ configSpec.Process.User.UID = config.user
+ configSpec.Process.User.GID = config.group
+ configSpec.Process.User.AdditionalGids = config.groupAdd
- spec.Process.Env = config.env
+ configSpec.Process.Env = config.env
//TODO
// Need examples of capacity additions so I can load that properly
- spec.Root.Readonly = config.readOnlyRootfs
- spec.Hostname = config.hostname
+ configSpec.Root.Readonly = config.readOnlyRootfs
+ configSpec.Hostname = config.hostname
// BIND MOUNTS
- spec.Mounts = append(spec.Mounts, config.GetVolumeMounts()...)
+ configSpec.Mounts = append(configSpec.Mounts, config.GetVolumeMounts()...)
// TMPFS MOUNTS
- spec.Mounts = append(spec.Mounts, config.GetTmpfsMounts()...)
+ configSpec.Mounts = append(configSpec.Mounts, config.GetTmpfsMounts()...)
// RESOURCES - MEMORY
- spec.Linux.Sysctl = config.sysctl
+ configSpec.Linux.Sysctl = config.sysctl
if config.resources.memory != 0 {
- spec.Linux.Resources.Memory.Limit = &config.resources.memory
+ configSpec.Linux.Resources.Memory.Limit = &config.resources.memory
}
if config.resources.memoryReservation != 0 {
- spec.Linux.Resources.Memory.Reservation = &config.resources.memoryReservation
+ configSpec.Linux.Resources.Memory.Reservation = &config.resources.memoryReservation
}
if config.resources.memorySwap != 0 {
- spec.Linux.Resources.Memory.Swap = &config.resources.memorySwap
+ configSpec.Linux.Resources.Memory.Swap = &config.resources.memorySwap
}
if config.resources.kernelMemory != 0 {
- spec.Linux.Resources.Memory.Kernel = &config.resources.kernelMemory
+ configSpec.Linux.Resources.Memory.Kernel = &config.resources.kernelMemory
}
if config.resources.memorySwapiness != 0 {
- spec.Linux.Resources.Memory.Swappiness = &config.resources.memorySwapiness
+ configSpec.Linux.Resources.Memory.Swappiness = &config.resources.memorySwapiness
}
if config.resources.disableOomKiller {
- spec.Linux.Resources.Memory.DisableOOMKiller = &config.resources.disableOomKiller
+ configSpec.Linux.Resources.Memory.DisableOOMKiller = &config.resources.disableOomKiller
}
// RESOURCES - CPU
if config.resources.cpuShares != 0 {
- spec.Linux.Resources.CPU.Shares = &config.resources.cpuShares
+ configSpec.Linux.Resources.CPU.Shares = &config.resources.cpuShares
}
if config.resources.cpuQuota != 0 {
- spec.Linux.Resources.CPU.Quota = &config.resources.cpuQuota
+ configSpec.Linux.Resources.CPU.Quota = &config.resources.cpuQuota
}
if config.resources.cpuPeriod != 0 {
- spec.Linux.Resources.CPU.Period = &config.resources.cpuPeriod
+ configSpec.Linux.Resources.CPU.Period = &config.resources.cpuPeriod
}
if config.resources.cpuRtRuntime != 0 {
- spec.Linux.Resources.CPU.RealtimeRuntime = &config.resources.cpuRtRuntime
+ configSpec.Linux.Resources.CPU.RealtimeRuntime = &config.resources.cpuRtRuntime
}
if config.resources.cpuRtPeriod != 0 {
- spec.Linux.Resources.CPU.RealtimePeriod = &config.resources.cpuRtPeriod
+ configSpec.Linux.Resources.CPU.RealtimePeriod = &config.resources.cpuRtPeriod
}
if config.resources.cpus != "" {
- spec.Linux.Resources.CPU.Cpus = config.resources.cpus
+ configSpec.Linux.Resources.CPU.Cpus = config.resources.cpus
}
if config.resources.cpusetMems != "" {
- spec.Linux.Resources.CPU.Mems = config.resources.cpusetMems
+ configSpec.Linux.Resources.CPU.Mems = config.resources.cpusetMems
}
// RESOURCES - PIDS
if config.resources.pidsLimit != 0 {
- spec.Linux.Resources.Pids.Limit = config.resources.pidsLimit
+ configSpec.Linux.Resources.Pids.Limit = config.resources.pidsLimit
}
/*
- Capabilities: &spec.LinuxCapabilities{
+ Capabilities: &configSpec.LinuxCapabilities{
// Rlimits []PosixRlimit // Where does this come from
// Type string
// Hard uint64
@@ -102,13 +102,13 @@ func createConfigToOCISpec(config *createConfig) (*spec.Spec, error) {
OOMScoreAdj: &config.resources.oomScoreAdj,
// Selinuxlabel
},
- Hooks: &spec.Hooks{},
+ Hooks: &configSpec.Hooks{},
//Annotations
- Resources: &spec.LinuxResources{
+ Resources: &configSpec.LinuxResources{
Devices: config.GetDefaultDevices(),
BlockIO: &blkio,
//HugepageLimits:
- Network: &spec.LinuxNetwork{
+ Network: &configSpec.LinuxNetwork{
// ClassID *uint32
// Priorites []LinuxInterfacePriority
},
@@ -116,7 +116,7 @@ func createConfigToOCISpec(config *createConfig) (*spec.Spec, error) {
//CgroupsPath:
//Namespaces: []LinuxNamespace
//Devices
- Seccomp: &spec.LinuxSeccomp{
+ Seccomp: &configSpec.LinuxSeccomp{
// DefaultAction:
// Architectures
// Syscalls:
@@ -129,7 +129,7 @@ func createConfigToOCISpec(config *createConfig) (*spec.Spec, error) {
},
}
*/
- return &spec, nil
+ return &configSpec, nil
}
func (c *createConfig) CreateBlockIO() (spec.LinuxBlockIO, error) {
diff --git a/cmd/kpod/stats.go b/cmd/kpod/stats.go
index 8548354a9..37cd9090b 100644
--- a/cmd/kpod/stats.go
+++ b/cmd/kpod/stats.go
@@ -11,9 +11,9 @@ import (
"github.com/docker/go-units"
tm "github.com/buger/goterm"
+ "github.com/pkg/errors"
"github.com/projectatomic/libpod/libkpod"
"github.com/projectatomic/libpod/oci"
- "github.com/pkg/errors"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/stop.go b/cmd/kpod/stop.go
index 68e4be472..79325da5f 100644
--- a/cmd/kpod/stop.go
+++ b/cmd/kpod/stop.go
@@ -4,8 +4,8 @@ import (
"fmt"
"os"
- "github.com/projectatomic/libpod/libkpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libkpod"
"github.com/urfave/cli"
"golang.org/x/net/context"
)
diff --git a/cmd/kpod/tag.go b/cmd/kpod/tag.go
index b5853ec14..f29c8c182 100644
--- a/cmd/kpod/tag.go
+++ b/cmd/kpod/tag.go
@@ -3,8 +3,8 @@ package main
import (
"github.com/containers/image/docker/reference"
"github.com/containers/storage"
- "github.com/projectatomic/libpod/libpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libpod"
"github.com/urfave/cli"
)
diff --git a/cmd/kpod/unpause.go b/cmd/kpod/unpause.go
index a17e70753..47a2e3778 100644
--- a/cmd/kpod/unpause.go
+++ b/cmd/kpod/unpause.go
@@ -2,8 +2,8 @@ package main
import (
"fmt"
- "github.com/projectatomic/libpod/libkpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libkpod"
"github.com/urfave/cli"
"os"
)
diff --git a/cmd/kpod/wait.go b/cmd/kpod/wait.go
index 7557bea49..5e8a50e13 100644
--- a/cmd/kpod/wait.go
+++ b/cmd/kpod/wait.go
@@ -4,8 +4,8 @@ import (
"fmt"
"os"
- "github.com/projectatomic/libpod/libkpod"
"github.com/pkg/errors"
+ "github.com/projectatomic/libpod/libkpod"
"github.com/urfave/cli"
)