Remove various references of dockertools

Also update the bazel files.
This commit is contained in:
Yu-Ju Hong 2017-05-10 17:31:05 -07:00
parent 4b72d229f7
commit fccf34ccb6
10 changed files with 11 additions and 10 deletions

View File

@ -247,7 +247,6 @@ filegroup(
"//pkg/kubelet/container:all-srcs",
"//pkg/kubelet/custommetrics:all-srcs",
"//pkg/kubelet/dockershim:all-srcs",
"//pkg/kubelet/dockertools:all-srcs",
"//pkg/kubelet/envvars:all-srcs",
"//pkg/kubelet/events:all-srcs",
"//pkg/kubelet/eviction:all-srcs",

View File

@ -18,6 +18,7 @@ go_library(
deps = [
"//pkg/kubelet/api/v1alpha1/runtime:go_default_library",
"//pkg/kubelet/util/sliceutils:go_default_library",
"//vendor/github.com/stretchr/testify/assert:go_default_library",
],
)

View File

@ -104,7 +104,9 @@ func HashContainer(container *v1.Container) uint64 {
// HashContainerLegacy returns the hash of the container. It is used to compare
// the running container with its desired spec.
// TODO: Delete this function after we deprecate dockertools.
// This is used by rktnetes and dockershim (for handling <=1.5 containers).
// TODO: Remove this function when kubernetes version is >=1.8 AND rktnetes
// update its hash function.
func HashContainerLegacy(container *v1.Container) uint64 {
hash := adler32.New()
hashutil.DeepHashObject(hash, *container)

View File

@ -56,6 +56,7 @@ go_library(
"//pkg/util/hash:go_default_library",
"//pkg/util/term:go_default_library",
"//vendor/github.com/blang/semver:go_default_library",
"//vendor/github.com/docker/docker/pkg/jsonmessage:go_default_library",
"//vendor/github.com/docker/engine-api/types:go_default_library",
"//vendor/github.com/docker/engine-api/types/container:go_default_library",
"//vendor/github.com/docker/engine-api/types/filters:go_default_library",
@ -105,6 +106,7 @@ go_test(
"//pkg/kubelet/util/cache:go_default_library",
"//pkg/security/apparmor:go_default_library",
"//vendor/github.com/blang/semver:go_default_library",
"//vendor/github.com/docker/docker/pkg/jsonmessage:go_default_library",
"//vendor/github.com/docker/engine-api/types:go_default_library",
"//vendor/github.com/docker/engine-api/types/container:go_default_library",
"//vendor/github.com/docker/go-connections/nat:go_default_library",

View File

@ -139,8 +139,6 @@ func TestLoadSeccompLocalhostProfiles(t *testing.T) {
}
// TestGetApparmorSecurityOpts tests the logic of generating container apparmor options from sandbox annotations.
// The actual profile loading logic is tested in dockertools.
// TODO: Migrate the corresponding test to dockershim.
func TestGetApparmorSecurityOpts(t *testing.T) {
makeConfig := func(profile string) *runtimeapi.LinuxContainerSecurityContext {
return &runtimeapi.LinuxContainerSecurityContext{

View File

@ -409,7 +409,7 @@ func (kl *Kubelet) getServiceEnvVarMap(ns string) (map[string]string, error) {
func (kl *Kubelet) makeEnvironmentVariables(pod *v1.Pod, container *v1.Container, podIP string) ([]kubecontainer.EnvVar, error) {
var result []kubecontainer.EnvVar
// Note: These are added to the docker Config, but are not included in the checksum computed
// by dockertools.BuildDockerName(...). That way, we can still determine whether an
// by kubecontainer.HashContainer(...). That way, we can still determine whether an
// v1.Container is already running by its hash. (We don't want to restart a container just
// because some service changed.)
//

View File

@ -81,6 +81,7 @@ go_test(
tags = ["automanaged"],
deps = [
"//pkg/api/v1:go_default_library",
"//pkg/credentialprovider:go_default_library",
"//pkg/kubelet/api/testing:go_default_library",
"//pkg/kubelet/api/v1alpha1/runtime:go_default_library",
"//pkg/kubelet/container:go_default_library",
@ -88,6 +89,7 @@ go_test(
"//vendor/github.com/golang/mock/gomock:go_default_library",
"//vendor/github.com/google/cadvisor/info/v1:go_default_library",
"//vendor/github.com/stretchr/testify/assert:go_default_library",
"//vendor/github.com/stretchr/testify/require:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",

View File

@ -27,8 +27,7 @@ import (
const (
UnsupportedReason = "SysctlUnsupported"
// CRI uses semver-compatible API version, while docker does not
// (e.g., 1.24). Append the version with a ".0" so that it works
// with both the CRI and dockertools comparison logic.
// (e.g., 1.24). Append the version with a ".0".
dockerMinimumAPIVersion = "1.24.0"
dockerTypeName = "docker"

View File

@ -263,7 +263,7 @@ func dockerContainerGCTest(f *framework.Framework, test testRun) {
runtime = libdocker.ConnectToDockerOrDie(defaultDockerEndpoint, defaultRuntimeRequestTimeoutDuration, defaultImagePullProgressDeadline)
})
for _, pod := range test.testPods {
// Initialize the getContainerNames function to use the dockertools api
// Initialize the getContainerNames function to use the libdocker api
thisPrefix := pod.containerPrefix
pod.getContainerNames = func() ([]string, error) {
relevantContainers := []string{}

View File

@ -721,8 +721,6 @@ k8s.io/kubernetes/pkg/kubelet/config,mikedanese,1,
k8s.io/kubernetes/pkg/kubelet/container,yujuhong,0,
k8s.io/kubernetes/pkg/kubelet/custommetrics,kevin-wangzefeng,0,
k8s.io/kubernetes/pkg/kubelet/dockershim,zmerlynn,1,
k8s.io/kubernetes/pkg/kubelet/dockertools,deads2k,1,
k8s.io/kubernetes/pkg/kubelet/dockertools/securitycontext,yifan-gu,1,
k8s.io/kubernetes/pkg/kubelet/envvars,rrati,0,
k8s.io/kubernetes/pkg/kubelet/eviction,childsb,1,
k8s.io/kubernetes/pkg/kubelet/images,caesarxuchao,1,

1 name owner auto-assigned sig
721 k8s.io/kubernetes/pkg/kubelet/container yujuhong 0
722 k8s.io/kubernetes/pkg/kubelet/custommetrics kevin-wangzefeng 0
723 k8s.io/kubernetes/pkg/kubelet/dockershim zmerlynn 1
k8s.io/kubernetes/pkg/kubelet/dockertools deads2k 1
k8s.io/kubernetes/pkg/kubelet/dockertools/securitycontext yifan-gu 1
724 k8s.io/kubernetes/pkg/kubelet/envvars rrati 0
725 k8s.io/kubernetes/pkg/kubelet/eviction childsb 1
726 k8s.io/kubernetes/pkg/kubelet/images caesarxuchao 1