mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #64451 from wgliang/master.remove-kubelet
Automatic merge from submit-queue (batch tested with PRs 64688, 64451, 64504, 64506, 56358). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. cleanup some dead kubelet code **Release note**: ```release-note NONE ```
This commit is contained in:
commit
aa25539ef6
@ -31,7 +31,6 @@ import (
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
"k8s.io/apimachinery/pkg/util/clock"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
@ -436,10 +435,6 @@ func TestSyncPodsDeletesWhenSourcesAreReady(t *testing.T) {
|
||||
fakeRuntime.AssertKilledPods([]string{"12345678"})
|
||||
}
|
||||
|
||||
type testNodeLister struct {
|
||||
nodes []*v1.Node
|
||||
}
|
||||
|
||||
type testNodeInfo struct {
|
||||
nodes []*v1.Node
|
||||
}
|
||||
@ -453,10 +448,6 @@ func (ls testNodeInfo) GetNodeInfo(id string) (*v1.Node, error) {
|
||||
return nil, fmt.Errorf("Node with name: %s does not exist", id)
|
||||
}
|
||||
|
||||
func (ls testNodeLister) List(selector labels.Selector) ([]*v1.Node, error) {
|
||||
return ls.nodes, nil
|
||||
}
|
||||
|
||||
func checkPodStatus(t *testing.T, kl *Kubelet, pod *v1.Pod, phase v1.PodPhase) {
|
||||
status, found := kl.statusManager.GetPodStatus(pod.UID)
|
||||
require.True(t, found, "Status of pod %q is not found in the status map", pod.UID)
|
||||
|
@ -803,24 +803,6 @@ func (m *kubeGenericRuntimeManager) killPodWithSyncResult(pod *v1.Pod, runningPo
|
||||
return
|
||||
}
|
||||
|
||||
// isHostNetwork checks whether the pod is running in host-network mode.
|
||||
func (m *kubeGenericRuntimeManager) isHostNetwork(podSandBoxID string, pod *v1.Pod) (bool, error) {
|
||||
if pod != nil {
|
||||
return kubecontainer.IsHostNetworkPod(pod), nil
|
||||
}
|
||||
|
||||
podStatus, err := m.runtimeService.PodSandboxStatus(podSandBoxID)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if podStatus.GetLinux().GetNamespaces().GetOptions().GetNetwork() == runtimeapi.NamespaceMode_NODE {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// GetPodStatus retrieves the status of the pod, including the
|
||||
// information of all containers in the pod that are visible in Runtime.
|
||||
func (m *kubeGenericRuntimeManager) GetPodStatus(uid kubetypes.UID, name, namespace string) (*kubecontainer.PodStatus, error) {
|
||||
|
@ -53,12 +53,6 @@ func (s *runtimeState) setRuntimeSync(t time.Time) {
|
||||
s.lastBaseRuntimeSync = t
|
||||
}
|
||||
|
||||
func (s *runtimeState) setInternalError(err error) {
|
||||
s.Lock()
|
||||
defer s.Unlock()
|
||||
s.internalError = err
|
||||
}
|
||||
|
||||
func (s *runtimeState) setNetworkState(err error) {
|
||||
s.Lock()
|
||||
defer s.Unlock()
|
||||
|
Loading…
Reference in New Issue
Block a user