Implement changes into volume plugins for skipping chown

Add a separate function for walking directories
This commit is contained in:
Hemant Kumar
2020-02-26 16:59:22 -05:00
parent 053baaf143
commit c52d4bf32f
29 changed files with 392 additions and 86 deletions

View File

@@ -22,7 +22,7 @@ import (
"path/filepath"
"strings"
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/kubernetes/pkg/volume"
volumeutil "k8s.io/kubernetes/pkg/volume/util"
@@ -236,7 +236,7 @@ func (b *gitRepoVolumeMounter) SetUpAt(dir string, mounterArgs volume.MounterArg
return fmt.Errorf("failed to exec 'git reset --hard': %s: %v", output, err)
}
volume.SetVolumeOwnership(b, mounterArgs.FsGroup)
volume.SetVolumeOwnership(b, mounterArgs.FsGroup, nil)
volumeutil.SetReady(b.getMetaDir())
return nil