Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
9449a437
Commit
9449a437
authored
May 29, 2018
by
Guoliang Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup some dead kubelet code
parent
07e6410c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
33 deletions
+0
-33
kubelet_test.go
pkg/kubelet/kubelet_test.go
+0
-9
kuberuntime_manager.go
pkg/kubelet/kuberuntime/kuberuntime_manager.go
+0
-18
runtime.go
pkg/kubelet/runtime.go
+0
-6
No files found.
pkg/kubelet/kubelet_test.go
View file @
9449a437
...
...
@@ -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"
...
...
@@ -406,10 +405,6 @@ func TestSyncPodsDeletesWhenSourcesAreReady(t *testing.T) {
fakeRuntime
.
AssertKilledPods
([]
string
{
"12345678"
})
}
type
testNodeLister
struct
{
nodes
[]
*
v1
.
Node
}
type
testNodeInfo
struct
{
nodes
[]
*
v1
.
Node
}
...
...
@@ -423,10 +418,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
)
...
...
pkg/kubelet/kuberuntime/kuberuntime_manager.go
View file @
9449a437
...
...
@@ -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
)
{
...
...
pkg/kubelet/runtime.go
View file @
9449a437
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment