Skip to content

Commit

Permalink
Merge pull request #781 from andyzhangx/share-AccessTier
Browse files Browse the repository at this point in the history
feat: add AccessTier in file share creation interface
  • Loading branch information
k8s-ci-robot committed Aug 30, 2021
2 parents 7f817a1 + ce9b57b commit 941e5ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/azureclients/fileclient/azure_fileclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ type ShareOptions struct {
Name string
Protocol storage.EnabledProtocols
RequestGiB int
// supported values: ""(by default), "TransactionOptimized", "Cool", "Hot", "Premium"
AccessTier string
}

// New creates a azure file client
Expand Down Expand Up @@ -72,6 +74,9 @@ func (c *Client) CreateFileShare(resourceGroupName, accountName string, shareOpt
if shareOptions.Protocol == storage.EnabledProtocolsNFS {
fileShareProperties.EnabledProtocols = shareOptions.Protocol
}
if shareOptions.AccessTier != "" {
fileShareProperties.AccessTier = storage.ShareAccessTier(shareOptions.AccessTier)
}
fileShare := storage.FileShare{
Name: &shareOptions.Name,
FileShareProperties: fileShareProperties,
Expand Down

0 comments on commit 941e5ae

Please sign in to comment.