mirror of https://github.com/k3s-io/k3s
fixformat
parent
614e3adda0
commit
3ed3873748
|
@ -132,7 +132,7 @@ func (plugin *hostPathPlugin) NewUnmounter(volName string, podUID types.UID) (vo
|
||||||
// HostPath recycling only works in single node clusters and is meant for testing purposes only.
|
// HostPath recycling only works in single node clusters and is meant for testing purposes only.
|
||||||
func (plugin *hostPathPlugin) Recycle(pvName string, spec *volume.Spec, eventRecorder recyclerclient.RecycleEventRecorder) error {
|
func (plugin *hostPathPlugin) Recycle(pvName string, spec *volume.Spec, eventRecorder recyclerclient.RecycleEventRecorder) error {
|
||||||
if spec.PersistentVolume == nil || spec.PersistentVolume.Spec.HostPath == nil {
|
if spec.PersistentVolume == nil || spec.PersistentVolume.Spec.HostPath == nil {
|
||||||
return fmt.Errorf("spec.PersistentVolumeSource.HostPath is nil")
|
return fmt.Errorf("spec.PersistentVolume.Spec.HostPath is nil")
|
||||||
}
|
}
|
||||||
|
|
||||||
pod := plugin.config.RecyclerPodTemplate
|
pod := plugin.config.RecyclerPodTemplate
|
||||||
|
|
|
@ -306,7 +306,7 @@ type quobyteVolumeDeleter struct {
|
||||||
|
|
||||||
func (plugin *quobytePlugin) NewDeleter(spec *volume.Spec) (volume.Deleter, error) {
|
func (plugin *quobytePlugin) NewDeleter(spec *volume.Spec) (volume.Deleter, error) {
|
||||||
if spec.PersistentVolume != nil && spec.PersistentVolume.Spec.Quobyte == nil {
|
if spec.PersistentVolume != nil && spec.PersistentVolume.Spec.Quobyte == nil {
|
||||||
return nil, fmt.Errorf("spec.PersistentVolumeSource.Spec.Quobyte is nil")
|
return nil, fmt.Errorf("spec.PersistentVolume.Spec.Quobyte is nil")
|
||||||
}
|
}
|
||||||
|
|
||||||
return plugin.newDeleterInternal(spec)
|
return plugin.newDeleterInternal(spec)
|
||||||
|
|
|
@ -162,7 +162,7 @@ func (plugin *rbdPlugin) getAdminAndSecret(spec *volume.Spec) (string, string, e
|
||||||
|
|
||||||
func (plugin *rbdPlugin) ExpandVolumeDevice(spec *volume.Spec, newSize resource.Quantity, oldSize resource.Quantity) (resource.Quantity, error) {
|
func (plugin *rbdPlugin) ExpandVolumeDevice(spec *volume.Spec, newSize resource.Quantity, oldSize resource.Quantity) (resource.Quantity, error) {
|
||||||
if spec.PersistentVolume != nil && spec.PersistentVolume.Spec.RBD == nil {
|
if spec.PersistentVolume != nil && spec.PersistentVolume.Spec.RBD == nil {
|
||||||
return oldSize, fmt.Errorf("spec.PersistentVolumeSource.Spec.RBD is nil")
|
return oldSize, fmt.Errorf("spec.PersistentVolume.Spec.RBD is nil")
|
||||||
}
|
}
|
||||||
|
|
||||||
// get admin and secret
|
// get admin and secret
|
||||||
|
@ -540,7 +540,7 @@ func (plugin *rbdPlugin) getDeviceNameFromOldMountPath(mounter mount.Interface,
|
||||||
|
|
||||||
func (plugin *rbdPlugin) NewDeleter(spec *volume.Spec) (volume.Deleter, error) {
|
func (plugin *rbdPlugin) NewDeleter(spec *volume.Spec) (volume.Deleter, error) {
|
||||||
if spec.PersistentVolume != nil && spec.PersistentVolume.Spec.RBD == nil {
|
if spec.PersistentVolume != nil && spec.PersistentVolume.Spec.RBD == nil {
|
||||||
return nil, fmt.Errorf("spec.PersistentVolumeSource.Spec.RBD is nil")
|
return nil, fmt.Errorf("spec.PersistentVolume.Spec.RBD is nil")
|
||||||
}
|
}
|
||||||
|
|
||||||
admin, secret, err := plugin.getAdminAndSecret(spec)
|
admin, secret, err := plugin.getAdminAndSecret(spec)
|
||||||
|
|
Loading…
Reference in New Issue