mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Merge pull request #77297 from humblec/fakeclient-csi
Correct errors and remove unwanted code blocks .
This commit is contained in:
commit
ebe32557bc
@ -180,9 +180,8 @@ func (gb *GraphBuilder) controllerFor(resource schema.GroupVersionResource, kind
|
|||||||
// need to clone because it's from a shared cache
|
// need to clone because it's from a shared cache
|
||||||
shared.Informer().AddEventHandlerWithResyncPeriod(handlers, ResourceResyncTime)
|
shared.Informer().AddEventHandlerWithResyncPeriod(handlers, ResourceResyncTime)
|
||||||
return shared.Informer().GetController(), shared.Informer().GetStore(), nil
|
return shared.Informer().GetController(), shared.Informer().GetStore(), nil
|
||||||
} else {
|
|
||||||
klog.V(4).Infof("unable to use a shared informer for resource %q, kind %q: %v", resource.String(), kind.String(), err)
|
|
||||||
}
|
}
|
||||||
|
klog.V(4).Infof("unable to use a shared informer for resource %q, kind %q: %v", resource.String(), kind.String(), err)
|
||||||
|
|
||||||
// TODO: consider store in one storage.
|
// TODO: consider store in one storage.
|
||||||
klog.V(5).Infof("create storage for resource %s", resource)
|
klog.V(5).Infof("create storage for resource %s", resource)
|
||||||
|
@ -765,7 +765,7 @@ func (p *csiPlugin) ConstructBlockVolumeSpec(podUID types.UID, specVolName, mapP
|
|||||||
}
|
}
|
||||||
|
|
||||||
// skipAttach looks up CSIDriver object associated with driver name
|
// skipAttach looks up CSIDriver object associated with driver name
|
||||||
// to determine if driver requies attachment volume operation
|
// to determine if driver requires attachment volume operation
|
||||||
func (p *csiPlugin) skipAttach(driver string) (bool, error) {
|
func (p *csiPlugin) skipAttach(driver string) (bool, error) {
|
||||||
if !utilfeature.DefaultFeatureGate.Enabled(features.CSIDriverRegistry) {
|
if !utilfeature.DefaultFeatureGate.Enabled(features.CSIDriverRegistry) {
|
||||||
return false, nil
|
return false, nil
|
||||||
|
@ -366,7 +366,7 @@ func TestPluginConstructVolumeSpec(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if spec == nil {
|
if spec == nil {
|
||||||
t.Fatal("nil volume.Spec contstructed")
|
t.Fatal("nil volume.Spec constructed")
|
||||||
}
|
}
|
||||||
|
|
||||||
// inspect spec
|
// inspect spec
|
||||||
@ -474,7 +474,7 @@ func TestPluginConstructVolumeSpecWithInline(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if spec == nil {
|
if spec == nil {
|
||||||
t.Fatal("nil volume.Spec contstructed")
|
t.Fatal("nil volume.Spec constructed")
|
||||||
}
|
}
|
||||||
|
|
||||||
if spec.Name() != tc.specVolID {
|
if spec.Name() != tc.specVolID {
|
||||||
|
@ -842,7 +842,7 @@ func (pm *VolumePluginMgr) FindProvisionablePluginByName(name string) (Provision
|
|||||||
return nil, fmt.Errorf("no provisionable volume plugin matched")
|
return nil, fmt.Errorf("no provisionable volume plugin matched")
|
||||||
}
|
}
|
||||||
|
|
||||||
// FindDeletablePluginBySppec fetches a persistent volume plugin by spec. If
|
// FindDeletablePluginBySpec fetches a persistent volume plugin by spec. If
|
||||||
// no plugin is found, returns error.
|
// no plugin is found, returns error.
|
||||||
func (pm *VolumePluginMgr) FindDeletablePluginBySpec(spec *Spec) (DeletableVolumePlugin, error) {
|
func (pm *VolumePluginMgr) FindDeletablePluginBySpec(spec *Spec) (DeletableVolumePlugin, error) {
|
||||||
volumePlugin, err := pm.FindPluginBySpec(spec)
|
volumePlugin, err := pm.FindPluginBySpec(spec)
|
||||||
|
Loading…
Reference in New Issue
Block a user