Clean up dockerless build tag
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
//go:build dockerless
|
||||
// +build dockerless
|
||||
|
||||
/*
|
||||
Copyright 2020 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package kubelet_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"k8s.io/kubernetes/pkg/kubelet"
|
||||
kubetypes "k8s.io/kubernetes/pkg/kubelet/types"
|
||||
)
|
||||
|
||||
func TestPreInitRuntimeService(t *testing.T) {
|
||||
err := kubelet.PreInitRuntimeService(nil, nil, nil, kubetypes.DockerContainerRuntime, "", "", "", "")
|
||||
if err == nil {
|
||||
t.Fatal("PreInitRuntimeService should fail when configured to use docker and compiled dockerless")
|
||||
}
|
||||
}
|
@@ -1,37 +0,0 @@
|
||||
//go:build dockerless
|
||||
// +build dockerless
|
||||
|
||||
/*
|
||||
Copyright 2020 The Kubernetes Authors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package kubelet
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
kubeletconfiginternal "k8s.io/kubernetes/pkg/kubelet/apis/config"
|
||||
"k8s.io/kubernetes/pkg/kubelet/config"
|
||||
)
|
||||
|
||||
func runDockershim(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
|
||||
kubeDeps *Dependencies,
|
||||
crOptions *config.ContainerRuntimeOptions,
|
||||
runtimeCgroups string,
|
||||
remoteRuntimeEndpoint string,
|
||||
remoteImageEndpoint string,
|
||||
nonMasqueradeCIDR string) error {
|
||||
|
||||
return fmt.Errorf("trying to use docker runtime when Kubelet was compiled without docker support")
|
||||
}
|
@@ -29,17 +29,6 @@ import (
|
||||
// It used to live in the `pkg/kubelet/dockershim` package. While we
|
||||
// would eventually like to remove it entirely, we need to give users some form
|
||||
// of warning.
|
||||
//
|
||||
// By including the interface in
|
||||
// `pkg/kubelet/legacy/logs.go`, we ensure the interface is
|
||||
// available to `pkg/kubelet`, even when we are building with the `dockerless`
|
||||
// tag (i.e. not compiling the dockershim).
|
||||
// While the interface always exists, there will be no implementations of the
|
||||
// interface when building with the `dockerless` tag. The lack of
|
||||
// implementations should not be an issue, as we only expect `pkg/kubelet` code
|
||||
// to need an implementation of the `DockerLegacyService` when we are using
|
||||
// docker. If we are using docker, but building with the `dockerless` tag, than
|
||||
// this will be just one of many things that breaks.
|
||||
type DockerLegacyService interface {
|
||||
// GetContainerLogs gets logs for a specific container.
|
||||
GetContainerLogs(context.Context, *v1.Pod, kubecontainer.ContainerID, *v1.PodLogOptions, io.Writer, io.Writer) error
|
||||
|
Reference in New Issue
Block a user