From a040a83da8f8f09c4033f19b74e43f04415882bb Mon Sep 17 00:00:00 2001 From: chaireze <50840058+chaireze@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:59:04 -0400 Subject: [PATCH] add use wyvern storage class attrib --- pkg/blob/blob.go | 1 + pkg/blob/controllerserver.go | 2 ++ pkg/blob/nodeserver.go | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/pkg/blob/blob.go b/pkg/blob/blob.go index 2d53f76e8..c6775b47a 100644 --- a/pkg/blob/blob.go +++ b/pkg/blob/blob.go @@ -106,6 +106,7 @@ const ( mountPermissionsField = "mountpermissions" useDataPlaneAPIField = "usedataplaneapi" EcStrgAuthenticationField = "edgecache-storage-auth" + UseWyvernField = "wyvern-in-use" // See https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#container-names containerNameMinLength = 3 diff --git a/pkg/blob/controllerserver.go b/pkg/blob/controllerserver.go index ed1f552a4..343edb6b4 100644 --- a/pkg/blob/controllerserver.go +++ b/pkg/blob/controllerserver.go @@ -168,6 +168,8 @@ func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) networkEndpointType = v case EcStrgAuthenticationField: containerNameReplaceMap[EcStrgAuthenticationField] = v + case UseWyvernField: + containerNameReplaceMap[UseWyvernField] = v case mountPermissionsField: // only do validations here, used in NodeStageVolume, NodePublishVolume if v != "" { diff --git a/pkg/blob/nodeserver.go b/pkg/blob/nodeserver.go index 3b3a7d5ed..ea35f4ac7 100644 --- a/pkg/blob/nodeserver.go +++ b/pkg/blob/nodeserver.go @@ -336,6 +336,11 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe } if protocol == EcProtocol { + useWyvern, useWyvernOk := attrib[UseWyvernField] + if useWyvernOk { + klog.Infof("this is the use wyvern field %s", useWyvern) + } + // get authentication method storageAuthType, storageAuthTypeOk := attrib[EcStrgAuthenticationField] if !storageAuthTypeOk {