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
cd760cc4
Commit
cd760cc4
authored
Sep 23, 2015
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make kubelet builder customizable
This is the preparation to remove a lot of duplicated code for kubelet initialization in
https://github.com/kubernetes/kubernetes/pull/13036
.
parent
e330b119
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
integration.go
cmd/integration/integration.go
+2
-2
server.go
cmd/kubelet/app/server.go
+4
-2
hollow-node.go
cmd/kubemark/hollow-node.go
+1
-1
No files found.
cmd/integration/integration.go
View file @
cd760cc4
...
...
@@ -238,7 +238,7 @@ func startComponents(firstManifestURL, secondManifestURL string) (string, string
10
*
time
.
Second
,
/* SyncFrequency */
40
/* MaxPods */
)
kubeletapp
.
RunKubelet
(
kcfg
,
nil
)
kubeletapp
.
RunKubelet
(
kcfg
)
// Kubelet (machine)
// Create a second kubelet so that the guestbook example's two redis slaves both
// have a place they can schedule.
...
...
@@ -270,7 +270,7 @@ func startComponents(firstManifestURL, secondManifestURL string) (string, string
40
/* MaxPods */
)
kubeletapp
.
RunKubelet
(
kcfg
,
nil
)
kubeletapp
.
RunKubelet
(
kcfg
)
return
apiServer
.
URL
,
configFilePath
}
...
...
cmd/kubelet/app/server.go
View file @
cd760cc4
...
...
@@ -455,7 +455,7 @@ func (s *KubeletServer) Run(kcfg *KubeletConfig) error {
glog
.
Warning
(
err
)
}
if
err
:=
RunKubelet
(
kcfg
,
nil
);
err
!=
nil
{
if
err
:=
RunKubelet
(
kcfg
);
err
!=
nil
{
return
err
}
...
...
@@ -663,7 +663,7 @@ func SimpleKubelet(client *client.Client,
// 2 Kubelet binary
// 3 Standalone 'kubernetes' binary
// Eventually, #2 will be replaced with instances of #3
func
RunKubelet
(
kcfg
*
KubeletConfig
,
builder
KubeletBuilder
)
error
{
func
RunKubelet
(
kcfg
*
KubeletConfig
)
error
{
kcfg
.
Hostname
=
nodeutil
.
GetHostname
(
kcfg
.
HostnameOverride
)
if
len
(
kcfg
.
NodeName
)
==
0
{
...
...
@@ -712,6 +712,7 @@ func RunKubelet(kcfg *KubeletConfig, builder KubeletBuilder) error {
credentialprovider
.
SetPreferredDockercfgPath
(
kcfg
.
RootDirectory
)
builder
:=
kcfg
.
Builder
if
builder
==
nil
{
builder
=
createAndInitKubelet
}
...
...
@@ -782,6 +783,7 @@ func makePodSourceConfig(kc *KubeletConfig) *config.PodConfig {
type
KubeletConfig
struct
{
Address
net
.
IP
AllowPrivileged
bool
Builder
KubeletBuilder
CAdvisorInterface
cadvisor
.
Interface
CgroupRoot
string
Cloud
cloudprovider
.
Interface
...
...
cmd/kubemark/hollow-node.go
View file @
cd760cc4
...
...
@@ -130,7 +130,7 @@ func main() {
10
*
time
.
Second
,
/* SyncFrequency */
40
,
/* MaxPods */
)
kubeletapp
.
RunKubelet
(
kcfg
,
nil
)
kubeletapp
.
RunKubelet
(
kcfg
)
select
{}
}
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