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
5f77f2b5
Commit
5f77f2b5
authored
Nov 25, 2015
by
jiangyaoguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make PodContainerSpecChange private
parent
810181fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
manager.go
pkg/kubelet/dockertools/manager.go
+4
-5
No files found.
pkg/kubelet/dockertools/manager.go
View file @
5f77f2b5
...
...
@@ -1608,7 +1608,6 @@ func (dm *DockerManager) createPodInfraContainer(pod *api.Pod) (kubetypes.Docker
return
kubetypes
.
DockerID
(
id
.
ID
),
nil
}
// TODO(vmarmol): This will soon be made non-public when its only use is internal.
// Structure keeping information on changes that need to happen for a pod. The semantics is as follows:
// - startInfraContainer is true if new Infra Containers have to be started and old one (if running) killed.
// Additionally if it is true then containersToKeep have to be empty
...
...
@@ -1619,7 +1618,7 @@ func (dm *DockerManager) createPodInfraContainer(pod *api.Pod) (kubetypes.Docker
// It shouldn't be the case where containersToStart is empty and containersToKeep contains only infraContainerId. In such case
// Infra Container should be killed, hence it's removed from this map.
// - all running containers which are NOT contained in containersToKeep should be killed.
type
P
odContainerChangesSpec
struct
{
type
p
odContainerChangesSpec
struct
{
StartInfraContainer
bool
InfraChanged
bool
InfraContainerId
kubetypes
.
DockerID
...
...
@@ -1627,7 +1626,7 @@ type PodContainerChangesSpec struct {
ContainersToKeep
map
[
kubetypes
.
DockerID
]
int
}
func
(
dm
*
DockerManager
)
computePodContainerChanges
(
pod
*
api
.
Pod
,
podStatus
*
kubecontainer
.
PodStatus
)
(
P
odContainerChangesSpec
,
error
)
{
func
(
dm
*
DockerManager
)
computePodContainerChanges
(
pod
*
api
.
Pod
,
podStatus
*
kubecontainer
.
PodStatus
)
(
p
odContainerChangesSpec
,
error
)
{
start
:=
time
.
Now
()
defer
func
()
{
metrics
.
ContainerManagerLatency
.
WithLabelValues
(
"computePodContainerChanges"
)
.
Observe
(
metrics
.
SinceInMicroseconds
(
start
))
...
...
@@ -1648,7 +1647,7 @@ func (dm *DockerManager) computePodContainerChanges(pod *api.Pod, podStatus *kub
glog
.
V
(
4
)
.
Infof
(
"Found pod infra container for %q"
,
podFullName
)
changed
,
err
=
dm
.
podInfraContainerChanged
(
pod
,
podInfraContainerStatus
)
if
err
!=
nil
{
return
P
odContainerChangesSpec
{},
err
return
p
odContainerChangesSpec
{},
err
}
}
...
...
@@ -1729,7 +1728,7 @@ func (dm *DockerManager) computePodContainerChanges(pod *api.Pod, podStatus *kub
containersToKeep
=
make
(
map
[
kubetypes
.
DockerID
]
int
)
}
return
P
odContainerChangesSpec
{
return
p
odContainerChangesSpec
{
StartInfraContainer
:
createPodInfraContainer
,
InfraChanged
:
changed
,
InfraContainerId
:
podInfraContainerID
,
...
...
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