Skip to content

Commit

Permalink
add use wyvern storage class attrib
Browse files Browse the repository at this point in the history
  • Loading branch information
chaireze committed Sep 19, 2023
1 parent 0caf6fa commit a040a83
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/blob/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions pkg/blob/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down
5 changes: 5 additions & 0 deletions pkg/blob/nodeserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a040a83

Please sign in to comment.