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
9176e93b
Commit
9176e93b
authored
Dec 09, 2015
by
Sergiusz Urbaniak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
service: initialize EventClient
Kubelet events are not being tracked. This commit fixes it by initializing the event client. fixes
https://github.com/mesosphere/kubernetes-mesos/issues/680
parent
78c31b67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
9 deletions
+30
-9
service.go
contrib/mesos/pkg/executor/service/service.go
+30
-9
No files found.
contrib/mesos/pkg/executor/service/service.go
View file @
9176e93b
...
@@ -147,9 +147,20 @@ func (s *KubeletExecutorServer) runKubelet(
...
@@ -147,9 +147,20 @@ func (s *KubeletExecutorServer) runKubelet(
staticPodsConfigPath
string
,
staticPodsConfigPath
string
,
apiclient
*
client
.
Client
,
apiclient
*
client
.
Client
,
podLW
*
cache
.
ListWatch
,
podLW
*
cache
.
ListWatch
,
)
error
{
)
(
err
error
)
{
defer
func
()
{
if
err
!=
nil
{
// close the channel here. When Run returns without error, the executorKubelet is
// responsible to do this. If it returns with an error, we are responsible here.
close
(
kubeletDone
)
}
}()
kcfg
,
err
:=
s
.
UnsecuredKubeletConfig
()
kcfg
,
err
:=
s
.
UnsecuredKubeletConfig
()
if
err
==
nil
{
if
err
!=
nil
{
return
err
}
// apply Mesos specific settings
// apply Mesos specific settings
executorDone
:=
make
(
chan
struct
{})
executorDone
:=
make
(
chan
struct
{})
kcfg
.
Builder
=
func
(
kc
*
kubeletapp
.
KubeletConfig
)
(
kubeletapp
.
KubeletBootstrap
,
*
kconfig
.
PodConfig
,
error
)
{
kcfg
.
Builder
=
func
(
kc
*
kubeletapp
.
KubeletConfig
)
(
kubeletapp
.
KubeletBootstrap
,
*
kconfig
.
PodConfig
,
error
)
{
...
@@ -173,6 +184,21 @@ func (s *KubeletExecutorServer) runKubelet(
...
@@ -173,6 +184,21 @@ func (s *KubeletExecutorServer) runKubelet(
kcfg
.
DockerDaemonContainer
=
""
// don't move the docker daemon into a cgroup
kcfg
.
DockerDaemonContainer
=
""
// don't move the docker daemon into a cgroup
kcfg
.
Hostname
=
kcfg
.
HostnameOverride
kcfg
.
Hostname
=
kcfg
.
HostnameOverride
kcfg
.
KubeClient
=
apiclient
kcfg
.
KubeClient
=
apiclient
// taken from KubeletServer#Run(*KubeletConfig)
eventClientConfig
,
err
:=
s
.
CreateAPIServerClientConfig
()
if
err
!=
nil
{
return
err
}
// make a separate client for events
eventClientConfig
.
QPS
=
s
.
EventRecordQPS
eventClientConfig
.
Burst
=
s
.
EventBurst
kcfg
.
EventClient
,
err
=
client
.
New
(
eventClientConfig
)
if
err
!=
nil
{
return
err
}
kcfg
.
NodeName
=
kcfg
.
HostnameOverride
kcfg
.
NodeName
=
kcfg
.
HostnameOverride
kcfg
.
PodConfig
=
kconfig
.
NewPodConfig
(
kconfig
.
PodConfigNotificationIncremental
,
kcfg
.
Recorder
)
// override the default pod source
kcfg
.
PodConfig
=
kconfig
.
NewPodConfig
(
kconfig
.
PodConfigNotificationIncremental
,
kcfg
.
Recorder
)
// override the default pod source
kcfg
.
StandaloneMode
=
false
kcfg
.
StandaloneMode
=
false
...
@@ -189,6 +215,7 @@ func (s *KubeletExecutorServer) runKubelet(
...
@@ -189,6 +215,7 @@ func (s *KubeletExecutorServer) runKubelet(
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
kcfg
.
CAdvisorInterface
=
cAdvisorInterface
kcfg
.
CAdvisorInterface
=
cAdvisorInterface
kcfg
.
ContainerManager
,
err
=
cm
.
NewContainerManager
(
kcfg
.
Mounter
,
cAdvisorInterface
)
kcfg
.
ContainerManager
,
err
=
cm
.
NewContainerManager
(
kcfg
.
Mounter
,
cAdvisorInterface
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -216,14 +243,8 @@ func (s *KubeletExecutorServer) runKubelet(
...
@@ -216,14 +243,8 @@ func (s *KubeletExecutorServer) runKubelet(
// that because then every kubelet instance would query the master
// that because then every kubelet instance would query the master
// state.json which does not scale.
// state.json which does not scale.
err
=
s
.
KubeletServer
.
Run
(
kcfg
)
err
=
s
.
KubeletServer
.
Run
(
kcfg
)
}
if
err
!=
nil
{
return
// close the channel here. When Run returns without error, the executorKubelet is
// responsible to do this. If it returns with an error, we are responsible here.
close
(
kubeletDone
)
}
return
err
}
}
// Run runs the specified KubeletExecutorServer.
// Run runs the specified KubeletExecutorServer.
...
...
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