Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/azurefile/azurefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const (
allowBlobPublicAccessField = "allowblobpublicaccess"
publicNetworkAccessField = "publicnetworkaccess"
allowSharedKeyAccessField = "allowsharedkeyaccess"
allowCrossTenantReplicationField = "allowcrosstenantreplication"
storageEndpointSuffixField = "storageendpointsuffix"
fsGroupChangePolicyField = "fsgroupchangepolicy"
ephemeralField = "csi.storage.k8s.io/ephemeral"
Expand Down
9 changes: 8 additions & 1 deletion pkg/azurefile/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
var secretNamespace, pvcNamespace, protocol, customTags, storageEndpointSuffix, networkEndpointType, shareAccessTier, accountAccessTier, rootSquashType, tagValueDelimiter string
var createAccount, useSeretCache, matchTags, selectRandomMatchingAccount, getLatestAccountKey, encryptInTransit, mountWithManagedIdentity, mountWithWIToken bool
var vnetResourceGroup, vnetName, vnetLinkName, publicNetworkAccess, subnetName, shareNamePrefix, fsGroupChangePolicy, useDataPlaneAPI string
var requireInfraEncryption, disableDeleteRetentionPolicy, enableLFS, isMultichannelEnabled, allowSharedKeyAccess *bool
var requireInfraEncryption, disableDeleteRetentionPolicy, enableLFS, isMultichannelEnabled, allowSharedKeyAccess, allowCrossTenantReplication *bool
var provisionedBandwidthMibps, provisionedIops *int32
// set allowBlobPublicAccess as false by default
allowBlobPublicAccess := ptr.To(false)
Expand Down Expand Up @@ -225,6 +225,12 @@
return nil, status.Errorf(codes.InvalidArgument, "invalid %s: %s in storage class", allowSharedKeyAccessField, v)
}
allowSharedKeyAccess = &value
case allowCrossTenantReplicationField:
value, err := strconv.ParseBool(v)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "invalid %s: %s in storage class", allowCrossTenantReplicationField, v)
}
allowCrossTenantReplication = &value
case pvcNameKey:
fileShareNameReplaceMap[pvcNameMetadata] = v
case pvNameKey:
Expand Down Expand Up @@ -557,6 +563,7 @@
DisableFileServiceDeleteRetentionPolicy: disableDeleteRetentionPolicy,
AllowBlobPublicAccess: allowBlobPublicAccess,
AllowSharedKeyAccess: allowSharedKeyAccess,
AllowCrossTenantReplication: allowCrossTenantReplication,

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / build (1.16.x, windows-latest)

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / Go Lint

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions) (typecheck)

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / Go Lint

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions) (typecheck)

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / Build

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / Build

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / Go Lint

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions) (typecheck)

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / Go Lint

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions) (typecheck)

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / Build

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / build (1.16.x, windows-latest)

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / Analyze (go)

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / Build

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions

Check failure on line 566 in pkg/azurefile/controllerserver.go

View workflow job for this annotation

GitHub Actions / Build

unknown field AllowCrossTenantReplication in struct literal of type "sigs.k8s.io/cloud-provider-azure/pkg/provider/storage".AccountOptions
PublicNetworkAccess: publicNetworkAccess,
VNetResourceGroup: vnetResourceGroup,
VNetName: vnetName,
Expand Down
Loading