mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Clean up dockerless build tag
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
This commit is contained in:
parent
489fb9bee3
commit
6cdb1c225d
@ -49,7 +49,6 @@ if [[ ${EXCLUDE_TYPECHECK:-} =~ ^[yY]$ ]]; then
|
|||||||
EXCLUDED_PATTERNS+=(
|
EXCLUDED_PATTERNS+=(
|
||||||
"verify-typecheck.sh" # runs in separate typecheck job
|
"verify-typecheck.sh" # runs in separate typecheck job
|
||||||
"verify-typecheck-providerless.sh" # runs in separate typecheck job
|
"verify-typecheck-providerless.sh" # runs in separate typecheck job
|
||||||
"verify-typecheck-dockerless.sh" # runs in separate typecheck job
|
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright 2018 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.
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o nounset
|
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
|
||||||
|
|
||||||
cd "${KUBE_ROOT}"
|
|
||||||
# verify the dockerless build
|
|
||||||
# https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/1547-building-kubelet-without-docker/README.md
|
|
||||||
hack/verify-typecheck.sh --skip-test --tags=dockerless --ignore-dirs=test
|
|
||||||
|
|
||||||
# verify using go list
|
|
||||||
if _out="$(go list -mod=readonly -tags "dockerless" -e -json k8s.io/kubernetes/cmd/kubelet/... \
|
|
||||||
| grep -e dockershim)"; then
|
|
||||||
echo "${_out}" >&2
|
|
||||||
echo "Verify typecheck for dockerless tag failed. Found restricted packages." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
@ -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
|
// 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
|
// would eventually like to remove it entirely, we need to give users some form
|
||||||
// of warning.
|
// 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 {
|
type DockerLegacyService interface {
|
||||||
// GetContainerLogs gets logs for a specific container.
|
// GetContainerLogs gets logs for a specific container.
|
||||||
GetContainerLogs(context.Context, *v1.Pod, kubecontainer.ContainerID, *v1.PodLogOptions, io.Writer, io.Writer) error
|
GetContainerLogs(context.Context, *v1.Pod, kubecontainer.ContainerID, *v1.PodLogOptions, io.Writer, io.Writer) error
|
||||||
|
Loading…
Reference in New Issue
Block a user