mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Add fsGroup to SetUp and SetUpAt
This commit is contained in:
@@ -124,8 +124,8 @@ func (b *gitRepoVolumeBuilder) GetAttributes() volume.Attributes {
|
||||
}
|
||||
|
||||
// SetUp creates new directory and clones a git repo.
|
||||
func (b *gitRepoVolumeBuilder) SetUp() error {
|
||||
return b.SetUpAt(b.GetPath())
|
||||
func (b *gitRepoVolumeBuilder) SetUp(fsGroup *int64) error {
|
||||
return b.SetUpAt(b.GetPath(), fsGroup)
|
||||
}
|
||||
|
||||
// This is the spec for the volume that this plugin wraps.
|
||||
@@ -134,7 +134,7 @@ var wrappedVolumeSpec = &volume.Spec{
|
||||
}
|
||||
|
||||
// SetUpAt creates new directory and clones a git repo.
|
||||
func (b *gitRepoVolumeBuilder) SetUpAt(dir string) error {
|
||||
func (b *gitRepoVolumeBuilder) SetUpAt(dir string, fsGroup *int64) error {
|
||||
if volumeutil.IsReady(b.getMetaDir()) {
|
||||
return nil
|
||||
}
|
||||
@@ -144,7 +144,7 @@ func (b *gitRepoVolumeBuilder) SetUpAt(dir string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := wrapped.SetUpAt(dir); err != nil {
|
||||
if err := wrapped.SetUpAt(dir, fsGroup); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ func doTestSetUp(scenario struct {
|
||||
g := builder.(*gitRepoVolumeBuilder)
|
||||
g.exec = &fake
|
||||
|
||||
g.SetUp()
|
||||
g.SetUp(nil)
|
||||
|
||||
if fake.CommandCalls != len(expecteds) {
|
||||
allErrs = append(allErrs,
|
||||
|
||||
Reference in New Issue
Block a user