mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
rebased and updated
This commit is contained in:
parent
8639f24374
commit
e8289ceb9d
@ -118,7 +118,7 @@ func (b *gitRepoVolumeBuilder) SetUp() error {
|
|||||||
return b.SetUpAt(b.GetPath())
|
return b.SetUpAt(b.GetPath())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (gr *gitRepo) IsReadOnly() bool {
|
func (b *gitRepoVolumeBuilder) IsReadOnly() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,12 +72,12 @@ func (plugin *hostPathPlugin) GetAccessModes() []api.PersistentVolumeAccessMode
|
|||||||
func (plugin *hostPathPlugin) NewBuilder(spec *volume.Spec, pod *api.Pod, _ volume.VolumeOptions, _ mount.Interface) (volume.Builder, error) {
|
func (plugin *hostPathPlugin) NewBuilder(spec *volume.Spec, pod *api.Pod, _ volume.VolumeOptions, _ mount.Interface) (volume.Builder, error) {
|
||||||
if spec.VolumeSource.HostPath != nil {
|
if spec.VolumeSource.HostPath != nil {
|
||||||
return &hostPathBuilder{
|
return &hostPathBuilder{
|
||||||
hostPath: spec.VolumeSource.HostPath,
|
hostPath: &hostPath{path: spec.VolumeSource.HostPath.Path},
|
||||||
readOnly: false,
|
readOnly: false,
|
||||||
}, nil
|
}, nil
|
||||||
} else {
|
} else {
|
||||||
return &hostPathBuilder{
|
return &hostPathBuilder{
|
||||||
hostPath: spec.PersistentVolumeSource.HostPath,
|
hostPath: &hostPath{path: spec.PersistentVolumeSource.HostPath.Path},
|
||||||
readOnly: spec.ReadOnly,
|
readOnly: spec.ReadOnly,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
@ -102,7 +102,7 @@ func newRecycler(spec *volume.Spec, host volume.VolumeHost) (volume.Recycler, er
|
|||||||
// HostPath volumes represent a bare host file or directory mount.
|
// HostPath volumes represent a bare host file or directory mount.
|
||||||
// The direct at the specified path will be directly exposed to the container.
|
// The direct at the specified path will be directly exposed to the container.
|
||||||
type hostPath struct {
|
type hostPath struct {
|
||||||
path string
|
path string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (hp *hostPath) GetPath() string {
|
func (hp *hostPath) GetPath() string {
|
||||||
|
Loading…
Reference in New Issue
Block a user