Refactor volume.Builder.IsReadOnly() to volume.Builder.GetAttributes()
This commit is contained in:
@@ -109,8 +109,13 @@ type gitRepoVolumeBuilder struct {
|
||||
|
||||
var _ volume.Builder = &gitRepoVolumeBuilder{}
|
||||
|
||||
func (_ *gitRepoVolumeBuilder) SupportsOwnershipManagement() bool {
|
||||
return true
|
||||
func (b *gitRepoVolumeBuilder) GetAttributes() volume.Attributes {
|
||||
return volume.Attributes{
|
||||
ReadOnly: false,
|
||||
Managed: true,
|
||||
SupportsOwnershipManagement: false,
|
||||
SupportsSELinux: true, // xattr change should be okay, TODO: double check
|
||||
}
|
||||
}
|
||||
|
||||
// SetUp creates new directory and clones a git repo.
|
||||
@@ -118,14 +123,6 @@ func (b *gitRepoVolumeBuilder) SetUp() error {
|
||||
return b.SetUpAt(b.GetPath())
|
||||
}
|
||||
|
||||
func (b *gitRepoVolumeBuilder) IsReadOnly() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (b *gitRepoVolumeBuilder) SupportsSELinux() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// This is the spec for the volume that this plugin wraps.
|
||||
var wrappedVolumeSpec = &volume.Spec{
|
||||
Volume: &api.Volume{VolumeSource: api.VolumeSource{EmptyDir: &api.EmptyDirVolumeSource{}}},
|
||||
|
||||
Reference in New Issue
Block a user