From fc9b9fbf1aaeda8ea40b0f2d8d15573a70be554a Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Wed, 13 Nov 2024 11:21:34 +0100 Subject: [PATCH] adapt patches to allow running csi without credentials --- pkg/csi/cinder/openstack/noop_openstack.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/csi/cinder/openstack/noop_openstack.go b/pkg/csi/cinder/openstack/noop_openstack.go index 4cd5c231d6..6c7a9b0497 100644 --- a/pkg/csi/cinder/openstack/noop_openstack.go +++ b/pkg/csi/cinder/openstack/noop_openstack.go @@ -23,6 +23,7 @@ import ( "github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots" "github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes" "github.com/gophercloud/gophercloud/openstack/compute/v2/servers" + "k8s.io/apimachinery/pkg/util/wait" "k8s.io/cloud-provider-openstack/pkg/util/metadata" ) @@ -31,6 +32,8 @@ type NoopOpenStack struct { metadataOpts metadata.Opts } +var _ IOpenStack = &NoopOpenStack{} + func (os *NoopOpenStack) CreateVolume(name string, size int, vtype, availability string, snapshotID string, sourcevolID string, tags *map[string]string) (*volumes.Volume, error) { return nil, fmt.Errorf("CreateVolume is not implemented for ephemeral storage in this configuration") } @@ -63,6 +66,10 @@ func (os *NoopOpenStack) WaitVolumeTargetStatus(volumeID string, tStatus []strin return nil } +func (os *NoopOpenStack) WaitVolumeTargetStatusWithCustomBackoff(volumeID string, tStatus []string, backoff *wait.Backoff) error { + return nil +} + func (os *NoopOpenStack) DetachVolume(instanceID, volumeID string) error { return nil }