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
9e59ceaa
Commit
9e59ceaa
authored
Sep 03, 2015
by
Abhi Shah
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #13549 from mesosphere/incremental-pod-updates
MESOS: Switch to incremental pod config notification
parents
d5358f0f
216865b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
executor.go
contrib/mesos/pkg/executor/executor.go
+10
-10
service.go
contrib/mesos/pkg/executor/service/service.go
+1
-1
No files found.
contrib/mesos/pkg/executor/executor.go
View file @
9e59ceaa
...
...
@@ -533,11 +533,10 @@ func (k *KubernetesExecutor) launchTask(driver bindings.ExecutorDriver, taskId s
task
.
podName
=
podFullName
k
.
pods
[
podFullName
]
=
pod
// send the latest snapshot of the set of pods to the kubelet via the pod update channel.
// this results in the kubelet spinning up the new pod.
update
:=
kubelet
.
PodUpdate
{
Op
:
kubelet
.
SET
}
for
_
,
p
:=
range
k
.
pods
{
update
.
Pods
=
append
(
update
.
Pods
,
p
)
// send the new pod to the kubelet which will spin it up
update
:=
kubelet
.
PodUpdate
{
Op
:
kubelet
.
ADD
,
Pods
:
[]
*
api
.
Pod
{
pod
},
}
k
.
updateChan
<-
update
...
...
@@ -729,16 +728,17 @@ func (k *KubernetesExecutor) removePodTask(driver bindings.ExecutorDriver, tid,
k
.
resetSuicideWatch
(
driver
)
pid
:=
task
.
podName
if
_
,
found
:=
k
.
pods
[
pid
];
!
found
{
pod
,
found
:=
k
.
pods
[
pid
]
if
!
found
{
log
.
Warningf
(
"Cannot remove unknown pod %v for task %v"
,
pid
,
tid
)
}
else
{
log
.
V
(
2
)
.
Infof
(
"deleting pod %v for task %v"
,
pid
,
tid
)
delete
(
k
.
pods
,
pid
)
//
Send the pod updates to the channel.
update
:=
kubelet
.
PodUpdate
{
Op
:
kubelet
.
SET
}
for
_
,
p
:=
range
k
.
pods
{
update
.
Pods
=
append
(
update
.
Pods
,
p
)
//
tell the kubelet to remove the pod
update
:=
kubelet
.
PodUpdate
{
Op
:
kubelet
.
REMOVE
,
Pods
:
[]
*
api
.
Pod
{
pod
},
}
k
.
updateChan
<-
update
}
...
...
contrib/mesos/pkg/executor/service/service.go
View file @
9e59ceaa
...
...
@@ -321,7 +321,7 @@ func (ks *KubeletExecutorServer) createAndInitKubelet(
MaxContainers
:
kc
.
MaxContainerCount
,
}
pc
:=
kconfig
.
NewPodConfig
(
kconfig
.
PodConfigNotification
SnapshotAndUpdates
,
kc
.
Recorder
)
pc
:=
kconfig
.
NewPodConfig
(
kconfig
.
PodConfigNotification
Incremental
,
kc
.
Recorder
)
updates
:=
pc
.
Channel
(
MESOS_CFG_SOURCE
)
klet
,
err
:=
kubelet
.
NewMainKubelet
(
...
...
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