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
3487a165
Commit
3487a165
authored
May 11, 2015
by
Yu-Ju Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unexport DockerManager.RunContainer
parent
2cc86964
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
manager.go
pkg/kubelet/dockertools/manager.go
+3
-4
No files found.
pkg/kubelet/dockertools/manager.go
View file @
3487a165
...
@@ -1067,9 +1067,8 @@ func (dm *DockerManager) killContainer(containerID types.UID) error {
...
@@ -1067,9 +1067,8 @@ func (dm *DockerManager) killContainer(containerID types.UID) error {
return
err
return
err
}
}
// TODO(vmarmol): Unexport this as it is no longer used externally.
// Run a single container from a pod. Returns the docker container ID
// Run a single container from a pod. Returns the docker container ID
func
(
dm
*
DockerManager
)
RunContainer
(
pod
*
api
.
Pod
,
container
*
api
.
Container
,
netMode
,
ipcMode
string
)
(
kubeletTypes
.
DockerID
,
error
)
{
func
(
dm
*
DockerManager
)
runContainerInPod
(
pod
*
api
.
Pod
,
container
*
api
.
Container
,
netMode
,
ipcMode
string
)
(
kubeletTypes
.
DockerID
,
error
)
{
ref
,
err
:=
kubecontainer
.
GenerateContainerRef
(
pod
,
container
)
ref
,
err
:=
kubecontainer
.
GenerateContainerRef
(
pod
,
container
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"Couldn't make a ref to pod %v, container %v: '%v'"
,
pod
.
Name
,
container
.
Name
,
err
)
glog
.
Errorf
(
"Couldn't make a ref to pod %v, container %v: '%v'"
,
pod
.
Name
,
container
.
Name
,
err
)
...
@@ -1157,7 +1156,7 @@ func (dm *DockerManager) createPodInfraContainer(pod *api.Pod) (kubeletTypes.Doc
...
@@ -1157,7 +1156,7 @@ func (dm *DockerManager) createPodInfraContainer(pod *api.Pod) (kubeletTypes.Doc
dm
.
recorder
.
Eventf
(
ref
,
"pulled"
,
"Successfully pulled image %q"
,
container
.
Image
)
dm
.
recorder
.
Eventf
(
ref
,
"pulled"
,
"Successfully pulled image %q"
,
container
.
Image
)
}
}
id
,
err
:=
dm
.
RunContainer
(
pod
,
container
,
netNamespace
,
""
)
id
,
err
:=
dm
.
runContainerInPod
(
pod
,
container
,
netNamespace
,
""
)
if
err
!=
nil
{
if
err
!=
nil
{
return
""
,
err
return
""
,
err
}
}
...
@@ -1405,7 +1404,7 @@ func (dm *DockerManager) SyncPod(pod *api.Pod, runningPod kubecontainer.Pod, pod
...
@@ -1405,7 +1404,7 @@ func (dm *DockerManager) SyncPod(pod *api.Pod, runningPod kubecontainer.Pod, pod
// TODO(dawnchen): Check RestartPolicy.DelaySeconds before restart a container
// TODO(dawnchen): Check RestartPolicy.DelaySeconds before restart a container
namespaceMode
:=
fmt
.
Sprintf
(
"container:%v"
,
podInfraContainerID
)
namespaceMode
:=
fmt
.
Sprintf
(
"container:%v"
,
podInfraContainerID
)
_
,
err
=
dm
.
RunContainer
(
pod
,
container
,
namespaceMode
,
namespaceMode
)
_
,
err
=
dm
.
runContainerInPod
(
pod
,
container
,
namespaceMode
,
namespaceMode
)
dm
.
updateReasonCache
(
pod
,
container
,
err
)
dm
.
updateReasonCache
(
pod
,
container
,
err
)
if
err
!=
nil
{
if
err
!=
nil
{
// TODO(bburns) : Perhaps blacklist a container after N failures?
// TODO(bburns) : Perhaps blacklist a container after N failures?
...
...
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