mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 20:21:20 +00:00
Rename volume.Builder to Mounter and volume.Cleaner to Unmounter
This commit is contained in:
@@ -278,7 +278,7 @@ criteria to activate the kubelet SELinux label management for volumes are:
|
||||
3. The `pod.Spec.SecurityContext.SELinuxOptions` field is set
|
||||
4. The volume plugin supports SELinux label management
|
||||
|
||||
The `volume.Builder` interface should have a new method added that indicates whether the plugin
|
||||
The `volume.Mounter` interface should have a new method added that indicates whether the plugin
|
||||
supports SELinux label management:
|
||||
|
||||
```go
|
||||
|
@@ -301,13 +301,13 @@ or read the `pod.Spec.SecurityContext.FSGroup` field.
|
||||
|
||||
### Volume changes
|
||||
|
||||
The `volume.Builder` interface should have a new method added that indicates whether the plugin
|
||||
The `volume.Mounter` interface should have a new method added that indicates whether the plugin
|
||||
supports ownership management:
|
||||
|
||||
```go
|
||||
package volume
|
||||
|
||||
type Builder interface {
|
||||
type Mounter interface {
|
||||
// other methods omitted
|
||||
|
||||
// SupportsOwnershipManagement indicates that this volume supports having ownership
|
||||
@@ -403,7 +403,7 @@ func (kl *Kubelet) mountExternalVolumes(pod *api.Pod) (kubecontainer.VolumeMap,
|
||||
|
||||
// Try to use a plugin for this volume.
|
||||
internal := volume.NewSpecFromVolume(volSpec)
|
||||
builder, err := kl.newVolumeBuilderFromPlugins(internal, pod, volume.VolumeOptions{RootContext: rootContext}, kl.mounter)
|
||||
builder, err := kl.newVolumeMounterFromPlugins(internal, pod, volume.VolumeOptions{RootContext: rootContext}, kl.mounter)
|
||||
if err != nil {
|
||||
glog.Errorf("Could not create volume builder for pod %s: %v", pod.UID, err)
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user