Skip to content

[WIP]feat: support allowCrossTenantReplication storage class parameter#3049

Open
andyzhangx wants to merge 2 commits intomasterfrom
feat/allow-cross-tenant-replication
Open

[WIP]feat: support allowCrossTenantReplication storage class parameter#3049
andyzhangx wants to merge 2 commits intomasterfrom
feat/allow-cross-tenant-replication

Conversation

@andyzhangx
Copy link
Copy Markdown
Member

@andyzhangx andyzhangx commented Apr 5, 2026

What

Add allowcrosstenantreplication parameter to StorageClass to control cross-tenant object replication on the storage account.

Why

Users may want to disable cross-tenant object replication for security compliance (least-privilege). Currently there's no way to configure this via the CSI driver.

Dependency

⚠️ Blocked on kubernetes-sigs/cloud-provider-azure#10148 — adds AllowCrossTenantReplication to AccountOptions. After that PR merges, this repo needs a vendor bump before this PR can fully work.

Usage

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: azurefile-no-cross-tenant
provisioner: file.csi.azure.com
parameters:
  allowcrosstenantreplication: "false"

Changes

  • Add allowcrosstenantreplication field constant in azurefile.go
  • Parse the parameter in controllerserver.go and pass to AccountOptions

Add allowcrosstenantreplication parameter to StorageClass to control
cross-tenant object replication on the storage account. When set to
false, the storage account cannot be used as source or destination
for cross-tenant replication, following least-privilege principles.
@k8s-ci-robot k8s-ci-robot requested a review from cvvz April 5, 2026 02:30
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from gnufied April 5, 2026 02:30
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 5, 2026
@andyzhangx andyzhangx changed the title feat: support allowCrossTenantReplication storage class parameter [WIP]feat: support allowCrossTenantReplication storage class parameter Apr 5, 2026
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 5, 2026
Remove direct vendor modification for AllowCrossTenantReplication.
This change should come from cloud-provider-azure first, then be
consumed via a vendor bump in this repo.
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

@andyzhangx: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-azurefile-csi-driver-windows-build 9a7e807 link true /test pull-azurefile-csi-driver-windows-build
pull-azurefile-csi-driver-verify 9a7e807 link true /test pull-azurefile-csi-driver-verify
pull-azurefile-csi-driver-unit 9a7e807 link true /test pull-azurefile-csi-driver-unit
pull-azurefile-csi-driver-sanity 9a7e807 link true /test pull-azurefile-csi-driver-sanity
pull-azurefile-csi-driver-external-e2e-nfs 9a7e807 link true /test pull-azurefile-csi-driver-external-e2e-nfs
pull-azurefile-csi-driver-e2e-capz 9a7e807 link true /test pull-azurefile-csi-driver-e2e-capz
pull-azurefile-csi-driver-external-e2e-smb 9a7e807 link true /test pull-azurefile-csi-driver-external-e2e-smb
pull-azurefile-csi-driver-e2e-migration 9a7e807 link true /test pull-azurefile-csi-driver-e2e-migration
pull-azurefile-csi-driver-e2e-capz-windows-2022-hostprocess 9a7e807 link true /test pull-azurefile-csi-driver-e2e-capz-windows-2022-hostprocess
pull-azurefile-csi-driver-e2e-capz-windows-2019-hostprocess 9a7e807 link true /test pull-azurefile-csi-driver-e2e-capz-windows-2019-hostprocess

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants