Clean up dockershim in tests

Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
This commit is contained in:
Ciprian Hacman
2021-12-22 09:42:15 +02:00
parent c75d254beb
commit a0abe5aa33
24 changed files with 99 additions and 1006 deletions

View File

@@ -26,7 +26,6 @@ import (
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
"k8s.io/kubernetes/test/e2e/framework"
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
"github.com/onsi/ginkgo"
)
@@ -116,29 +115,6 @@ var _ = SIGDescribe("ContainerLogPath [NodeConformance]", func() {
var logPodName string
ginkgo.BeforeEach(func() {
if framework.TestContext.ContainerRuntime == "docker" {
// Container Log Path support requires JSON logging driver.
// It does not work when Docker daemon is logging to journald.
d, err := getDockerLoggingDriver()
framework.ExpectNoError(err)
if d != "json-file" {
e2eskipper.Skipf("Skipping because Docker daemon is using a logging driver other than \"json-file\": %s", d)
}
// Even if JSON logging is in use, this test fails if SELinux support
// is enabled, since the isolation provided by the SELinux policy
// prevents processes running inside Docker containers (under SELinux
// type svirt_lxc_net_t) from accessing the log files which are owned
// by Docker (and labeled with the container_var_lib_t type.)
//
// Therefore, let's also skip this test when running with SELinux
// support enabled.
e, err := isDockerSELinuxSupportEnabled()
framework.ExpectNoError(err)
if e {
e2eskipper.Skipf("Skipping because Docker daemon is running with SELinux support enabled")
}
}
podClient = f.PodClient()
logPodName = "log-pod-" + string(uuid.NewUUID())
err := createAndWaitPod(makeLogPod(logPodName, logString))