Skip to content

Commit

Permalink
add tag matching to Azure File storage class
Browse files Browse the repository at this point in the history
Adding the tags should ensure that we do not match a storage account
that was created by someone else which would be undesirable.

Additionally it solves the problem of matching storage accounts with
private endpoints - currently driver can match those even if
`networkEndpointType` is unset. Using the tags and matching should make
this more predictable and driver should no longer match those.
However, even if this ever gets fixed, we should probably still keep
the tags to prevent matching "foreign" storage accounts.

Upstream issue: kubernetes-sigs/azurefile-csi-driver#2085
  • Loading branch information
RomanBednar authored and openshift-cherrypick-robot committed Oct 9, 2024
1 parent df0b823 commit f4a35ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/overlays/azure-file/base/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ metadata:
provisioner: file.csi.azure.com
allowVolumeExpansion: true
parameters:
matchTags: "true"
skuName: Standard_LRS # available values: Standard_LRS, Standard_GRS, Standard_ZRS, Standard_RAGRS, Premium_LRS
tags: storageClassName=azurefile-csi
reclaimPolicy: Delete
volumeBindingMode: Immediate
mountOptions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ mountOptions:
- nosharesock
- actimeo=30
parameters:
matchTags: "true"
skuName: Standard_LRS
tags: storageClassName=azurefile-csi
provisioner: file.csi.azure.com
reclaimPolicy: Delete
volumeBindingMode: Immediate
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ mountOptions:
- nosharesock
- actimeo=30
parameters:
matchTags: "true"
skuName: Standard_LRS
tags: storageClassName=azurefile-csi
provisioner: file.csi.azure.com
reclaimPolicy: Delete
volumeBindingMode: Immediate

0 comments on commit f4a35ef

Please sign in to comment.