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
cb42bd47
Commit
cb42bd47
authored
Dec 19, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18027 from roboll/runonce-datadirs
Auto commit by PR queue bot
parents
7c43797e
81b9097a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
runonce.go
pkg/kubelet/runonce.go
+13
-0
No files found.
pkg/kubelet/runonce.go
View file @
cb42bd47
...
@@ -18,6 +18,7 @@ package kubelet
...
@@ -18,6 +18,7 @@ package kubelet
import
(
import
(
"fmt"
"fmt"
"os"
"time"
"time"
"github.com/golang/glog"
"github.com/golang/glog"
...
@@ -42,6 +43,18 @@ type RunPodResult struct {
...
@@ -42,6 +43,18 @@ type RunPodResult struct {
// RunOnce polls from one configuration update and run the associated pods.
// RunOnce polls from one configuration update and run the associated pods.
func
(
kl
*
Kubelet
)
RunOnce
(
updates
<-
chan
kubetypes
.
PodUpdate
)
([]
RunPodResult
,
error
)
{
func
(
kl
*
Kubelet
)
RunOnce
(
updates
<-
chan
kubetypes
.
PodUpdate
)
([]
RunPodResult
,
error
)
{
// Setup filesystem directories.
if
err
:=
kl
.
setupDataDirs
();
err
!=
nil
{
return
nil
,
err
}
// If the container logs directory does not exist, create it.
if
_
,
err
:=
os
.
Stat
(
containerLogsDir
);
err
!=
nil
{
if
err
:=
kl
.
os
.
Mkdir
(
containerLogsDir
,
0755
);
err
!=
nil
{
glog
.
Errorf
(
"Failed to create directory %q: %v"
,
containerLogsDir
,
err
)
}
}
select
{
select
{
case
u
:=
<-
updates
:
case
u
:=
<-
updates
:
glog
.
Infof
(
"processing manifest with %d pods"
,
len
(
u
.
Pods
))
glog
.
Infof
(
"processing manifest with %d pods"
,
len
(
u
.
Pods
))
...
...
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