Skip to content

Commit

Permalink
Merge pull request #3926 from justinsb/kubernetes_assets
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue.

Use EnsureTask so we don't have to track directories as closely
  • Loading branch information
Kubernetes Submit Queue committed Nov 26, 2017
2 parents 0ade1dd + b2cd5c9 commit 8f0566d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nodeup/pkg/model/file_assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (f *FileAssetsBuilder) Build(c *fi.ModelBuilderContext) error {
// used to keep track of previous file, so a instanceGroup can override a cluster wide one
tracker := make(map[string]bool, 0)
// ensure the default path exists
c.AddTask(&nodetasks.File{
c.EnsureTask(&nodetasks.File{
Path: f.FileAssetsDefaultPath(),
Type: nodetasks.FileType_Directory,
Mode: s("0755"),
Expand Down Expand Up @@ -88,8 +88,8 @@ func (f *FileAssetsBuilder) buildFileAssets(c *fi.ModelBuilderContext, assets []
content = string(decoded)
}

// @check if the directory structure exist or create it
c.AddTask(&nodetasks.File{
// We use EnsureTask so that we don't have to check if the asset directories have already been done
c.EnsureTask(&nodetasks.File{
Path: filepath.Dir(assetPath),
Type: nodetasks.FileType_Directory,
Mode: s("0755"),
Expand Down

0 comments on commit 8f0566d

Please sign in to comment.