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
ae9bc28f
Commit
ae9bc28f
authored
Mar 11, 2015
by
Eric Tune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove mentions of etcd in kubelet.
parent
ac7bf050
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
server.go
cmd/kubelet/app/server.go
+3
-2
kubelet.go
pkg/kubelet/kubelet.go
+1
-1
kubelet_test.go
pkg/kubelet/kubelet_test.go
+10
-10
No files found.
cmd/kubelet/app/server.go
View file @
ae9bc28f
...
@@ -187,7 +187,8 @@ func (s *KubeletServer) Run(_ []string) error {
...
@@ -187,7 +187,8 @@ func (s *KubeletServer) Run(_ []string) error {
func
(
s
*
KubeletServer
)
setupRunOnce
()
{
func
(
s
*
KubeletServer
)
setupRunOnce
()
{
if
s
.
RunOnce
{
if
s
.
RunOnce
{
// Don't use remote (etcd or apiserver) sources
// Don't use apiserver source, on the presumption that this flag is used
// for bootstrapping some system pods.
if
len
(
s
.
APIServerList
)
>
0
{
if
len
(
s
.
APIServerList
)
>
0
{
glog
.
Fatalf
(
"invalid option: --runonce and --api_servers are mutually exclusive"
)
glog
.
Fatalf
(
"invalid option: --runonce and --api_servers are mutually exclusive"
)
}
}
...
@@ -227,7 +228,7 @@ func (s *KubeletServer) createAPIServerClient() (*client.Client, error) {
...
@@ -227,7 +228,7 @@ func (s *KubeletServer) createAPIServerClient() (*client.Client, error) {
return
c
,
nil
return
c
,
nil
}
}
// SimpleRunKubelet is a simple way to start a Kubelet talking to dockerEndpoint, using an
etcd
Client.
// SimpleRunKubelet is a simple way to start a Kubelet talking to dockerEndpoint, using an
API
Client.
// Under the hood it calls RunKubelet (below)
// Under the hood it calls RunKubelet (below)
func
SimpleRunKubelet
(
client
*
client
.
Client
,
func
SimpleRunKubelet
(
client
*
client
.
Client
,
dockerClient
dockertools
.
DockerInterface
,
dockerClient
dockertools
.
DockerInterface
,
...
...
pkg/kubelet/kubelet.go
View file @
ae9bc28f
...
@@ -1534,7 +1534,7 @@ func (kl *Kubelet) handleUpdate(u PodUpdate) {
...
@@ -1534,7 +1534,7 @@ func (kl *Kubelet) handleUpdate(u PodUpdate) {
}
}
// syncLoop is the main loop for processing changes. It watches for changes from
// syncLoop is the main loop for processing changes. It watches for changes from
//
four channels (file, etcd,
server, and http) and creates a union of them. For
//
three channels (file, api
server, and http) and creates a union of them. For
// any new change seen, will run a sync against desired state and running state. If
// any new change seen, will run a sync against desired state and running state. If
// no changes are seen to the configuration, will synchronize the last known desired
// no changes are seen to the configuration, will synchronize the last known desired
// state every sync_frequency seconds. Never returns.
// state every sync_frequency seconds. Never returns.
...
...
pkg/kubelet/kubelet_test.go
View file @
ae9bc28f
...
@@ -1390,7 +1390,7 @@ func TestRunInContainerNoSuchPod(t *testing.T) {
...
@@ -1390,7 +1390,7 @@ func TestRunInContainerNoSuchPod(t *testing.T) {
kubelet
.
runner
=
&
fakeCommandRunner
kubelet
.
runner
=
&
fakeCommandRunner
podName
:=
"podFoo"
podName
:=
"podFoo"
podNamespace
:=
"
etcd
"
podNamespace
:=
"
nsFoo
"
containerName
:=
"containerFoo"
containerName
:=
"containerFoo"
output
,
err
:=
kubelet
.
RunInContainer
(
output
,
err
:=
kubelet
.
RunInContainer
(
GetPodFullName
(
&
api
.
BoundPod
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
podName
,
Namespace
:
podNamespace
}}),
GetPodFullName
(
&
api
.
BoundPod
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
podName
,
Namespace
:
podNamespace
}}),
...
@@ -1412,7 +1412,7 @@ func TestRunInContainer(t *testing.T) {
...
@@ -1412,7 +1412,7 @@ func TestRunInContainer(t *testing.T) {
containerID
:=
"abc1234"
containerID
:=
"abc1234"
podName
:=
"podFoo"
podName
:=
"podFoo"
podNamespace
:=
"
etcd
"
podNamespace
:=
"
nsFoo
"
containerName
:=
"containerFoo"
containerName
:=
"containerFoo"
fakeDocker
.
ContainerList
=
[]
docker
.
APIContainers
{
fakeDocker
.
ContainerList
=
[]
docker
.
APIContainers
{
...
@@ -1452,7 +1452,7 @@ func TestRunHandlerExec(t *testing.T) {
...
@@ -1452,7 +1452,7 @@ func TestRunHandlerExec(t *testing.T) {
containerID
:=
"abc1234"
containerID
:=
"abc1234"
podName
:=
"podFoo"
podName
:=
"podFoo"
podNamespace
:=
"
etcd
"
podNamespace
:=
"
nsFoo
"
containerName
:=
"containerFoo"
containerName
:=
"containerFoo"
fakeDocker
.
ContainerList
=
[]
docker
.
APIContainers
{
fakeDocker
.
ContainerList
=
[]
docker
.
APIContainers
{
...
@@ -1499,7 +1499,7 @@ func TestRunHandlerHttp(t *testing.T) {
...
@@ -1499,7 +1499,7 @@ func TestRunHandlerHttp(t *testing.T) {
kubelet
.
httpClient
=
&
fakeHttp
kubelet
.
httpClient
=
&
fakeHttp
podName
:=
"podFoo"
podName
:=
"podFoo"
podNamespace
:=
"
etcd
"
podNamespace
:=
"
nsFoo
"
containerName
:=
"containerFoo"
containerName
:=
"containerFoo"
container
:=
api
.
Container
{
container
:=
api
.
Container
{
...
@@ -2694,7 +2694,7 @@ func TestExecInContainerNoSuchPod(t *testing.T) {
...
@@ -2694,7 +2694,7 @@ func TestExecInContainerNoSuchPod(t *testing.T) {
kubelet
.
runner
=
&
fakeCommandRunner
kubelet
.
runner
=
&
fakeCommandRunner
podName
:=
"podFoo"
podName
:=
"podFoo"
podNamespace
:=
"
etcd
"
podNamespace
:=
"
nsFoo
"
containerName
:=
"containerFoo"
containerName
:=
"containerFoo"
err
:=
kubelet
.
ExecInContainer
(
err
:=
kubelet
.
ExecInContainer
(
GetPodFullName
(
&
api
.
BoundPod
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
podName
,
Namespace
:
podNamespace
}}),
GetPodFullName
(
&
api
.
BoundPod
{
ObjectMeta
:
api
.
ObjectMeta
{
Name
:
podName
,
Namespace
:
podNamespace
}}),
...
@@ -2720,7 +2720,7 @@ func TestExecInContainerNoSuchContainer(t *testing.T) {
...
@@ -2720,7 +2720,7 @@ func TestExecInContainerNoSuchContainer(t *testing.T) {
kubelet
.
runner
=
&
fakeCommandRunner
kubelet
.
runner
=
&
fakeCommandRunner
podName
:=
"podFoo"
podName
:=
"podFoo"
podNamespace
:=
"
etcd
"
podNamespace
:=
"
nsFoo
"
containerID
:=
"containerFoo"
containerID
:=
"containerFoo"
fakeDocker
.
ContainerList
=
[]
docker
.
APIContainers
{
fakeDocker
.
ContainerList
=
[]
docker
.
APIContainers
{
...
@@ -2772,7 +2772,7 @@ func TestExecInContainer(t *testing.T) {
...
@@ -2772,7 +2772,7 @@ func TestExecInContainer(t *testing.T) {
kubelet
.
runner
=
&
fakeCommandRunner
kubelet
.
runner
=
&
fakeCommandRunner
podName
:=
"podFoo"
podName
:=
"podFoo"
podNamespace
:=
"
etcd
"
podNamespace
:=
"
nsFoo
"
containerID
:=
"containerFoo"
containerID
:=
"containerFoo"
command
:=
[]
string
{
"ls"
}
command
:=
[]
string
{
"ls"
}
stdin
:=
&
bytes
.
Buffer
{}
stdin
:=
&
bytes
.
Buffer
{}
...
@@ -2831,7 +2831,7 @@ func TestPortForwardNoSuchPod(t *testing.T) {
...
@@ -2831,7 +2831,7 @@ func TestPortForwardNoSuchPod(t *testing.T) {
kubelet
.
runner
=
&
fakeCommandRunner
kubelet
.
runner
=
&
fakeCommandRunner
podName
:=
"podFoo"
podName
:=
"podFoo"
podNamespace
:=
"
etcd
"
podNamespace
:=
"
nsFoo
"
var
port
uint16
=
5000
var
port
uint16
=
5000
err
:=
kubelet
.
PortForward
(
err
:=
kubelet
.
PortForward
(
...
@@ -2854,7 +2854,7 @@ func TestPortForwardNoSuchContainer(t *testing.T) {
...
@@ -2854,7 +2854,7 @@ func TestPortForwardNoSuchContainer(t *testing.T) {
kubelet
.
runner
=
&
fakeCommandRunner
kubelet
.
runner
=
&
fakeCommandRunner
podName
:=
"podFoo"
podName
:=
"podFoo"
podNamespace
:=
"
etcd
"
podNamespace
:=
"
nsFoo
"
var
port
uint16
=
5000
var
port
uint16
=
5000
fakeDocker
.
ContainerList
=
[]
docker
.
APIContainers
{
fakeDocker
.
ContainerList
=
[]
docker
.
APIContainers
{
...
@@ -2888,7 +2888,7 @@ func TestPortForward(t *testing.T) {
...
@@ -2888,7 +2888,7 @@ func TestPortForward(t *testing.T) {
kubelet
.
runner
=
&
fakeCommandRunner
kubelet
.
runner
=
&
fakeCommandRunner
podName
:=
"podFoo"
podName
:=
"podFoo"
podNamespace
:=
"
etcd
"
podNamespace
:=
"
nsFoo
"
containerID
:=
"containerFoo"
containerID
:=
"containerFoo"
var
port
uint16
=
5000
var
port
uint16
=
5000
stream
:=
&
fakeReadWriteCloser
{}
stream
:=
&
fakeReadWriteCloser
{}
...
...
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