Skip to content

OSDOCS-13459#Add cross-subscription support for Azure File #92108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lpettyjo
Copy link
Contributor

@lpettyjo lpettyjo commented Apr 11, 2025

@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 11, 2025
@ocpdocs-previewbot
Copy link

ocpdocs-previewbot commented Apr 11, 2025

@lpettyjo lpettyjo added branch/enterprise-4.19 peer-review-needed Signifies that the peer review team needs to review this PR labels Apr 11, 2025
@lpettyjo lpettyjo added this to the Planned for 4.19 GA milestone Apr 11, 2025
Copy link

openshift-ci bot commented Apr 11, 2025

@lpettyjo: all tests passed!

Full PR test history. Your PR dashboard.

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.

@mburke5678 mburke5678 added the peer-review-in-progress Signifies that the peer review team is reviewing this PR label Apr 11, 2025
$ az identity list --query "[?clientId=='${mi_id}'].{Name:name}" --output tsv
====

. Obtain the Azure identity (service principal or managed identity) permission to access the resource group in another subscription where you want to provision the Azure File share:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need (service principal or managed identity) here, as it is in the prereqs?

Suggested change
. Obtain the Azure identity (service principal or managed identity) permission to access the resource group in another subscription where you want to provision the Azure File share:
. Record the Azure identity by running the following applicable commands. The Azure identity is needed in the next step:


.. On the *Role* tab, choose the contributor role to assign, and then click *Next*. You can also create and choose your own role with required permission.

.. On the *Members* tab, choose an assignee by selecting the type of assignee: “User, group, or service principal” (Or “Managed identity”), click *Select members*, search for and then select the desired service principal or managed identity, and then click *Select* to confirm.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Substeps?

Suggested change
.. On the *Members* tab, choose an assignee by selecting the type of assignee: “User, group, or service principal” (Or “Managed identity”), click *Select members*, search for and then select the desired service principal or managed identity, and then click *Select* to confirm.
.. On the *Members* tab:
... Choose an assignee by selecting the type of assignee: “User, group, or service principal” (Or “Managed identity”).
... Click *Select members*.
... Search for and then select the desired service principal or managed identity.
... Click *Select* to confirm.

Copy link
Contributor

@mburke5678 mburke5678 Apr 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this means; maybe it is clearer in the UI

“User, group, or service principal” (Or “Managed identity”)

Maybe??

Suggested change
.. On the *Members* tab, choose an assignee by selecting the type of assignee: User, group, or service principal” (Or “Managed identity”), click *Select members*, search for and then select the desired service principal or managed identity, and then click *Select* to confirm.
.. On the *Members* tab, choose an assignee by selecting the type of assignee: "User, group, or service principal" or "User, group, or Managed identity", click *Select members*, search for and then select the desired service principal or managed identity, and then click *Select* to confirm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, should this be in mark up as UI elements?

Suggested change
.. On the *Members* tab, choose an assignee by selecting the type of assignee: User, group, or service principal (Or Managed identity), click *Select members*, search for and then select the desired service principal or managed identity, and then click *Select* to confirm.
.. On the *Members* tab, choose an assignee by selecting the type of assignee: *User, group, or service principal* (Or *Managed identity*), click *Select members*, search for and then select the desired service principal or managed identity, and then click *Select* to confirm.

+
[NOTE]
====
If you just want to use a specific storage account to provision the Azure File share, you can also obtain the Azure identity (service principal or managed identity) permission to access the storage account only with the similar steps.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per ISG: Do not use just to mean only; use only instead. (Or nothing!).
I guessed on the phrasing at the end. It seemed to read only with the similar steps, rather than the storage account only, which I think is the case.

Suggested change
If you just want to use a specific storage account to provision the Azure File share, you can also obtain the Azure identity (service principal or managed identity) permission to access the storage account only with the similar steps.
If you want to use a specific storage account to provision the Azure File share, you can also obtain the Azure identity (service principal or managed identity) permission to access only the storage account by using similar steps.

If you just want to use a specific storage account to provision the Azure File share, you can also obtain the Azure identity (service principal or managed identity) permission to access the storage account only with the similar steps.
====

. Create an Azure File storage class using a similar configuration to the following:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
. Create an Azure File storage class using a similar configuration to the following:
. Create an Azure File storage class by using a similar configuration to the following:

Comment on lines +85 to +86
<4> Storage account name, if you want to specify your own
<5> Name of the SKU type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent?

Suggested change
<4> Storage account name, if you want to specify your own
<5> Name of the SKU type
<4> The storage account name, if you want to specify your own
<5> The name of the SKU type

<4> Storage account name, if you want to specify your own
<5> Name of the SKU type

. Create a persistent volume claim (PVC) specifying the Azure File storage class that you created in the previous step using a similar configuration to the following:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a little clearer?

Suggested change
. Create a persistent volume claim (PVC) specifying the Azure File storage class that you created in the previous step using a similar configuration to the following:
. Create a persistent volume claim (PVC) that specifies the Azure File storage class you created in the previous step by using a similar configuration to the following:

Comment on lines +105 to +106
<1> `<pvc-name>` is the name of the PVC.
<2> `<sc-name-cross-sub>` is the name of the storage class that you created in the previous step.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the variables in the call-outs?

Suggested change
<1> `<pvc-name>` is the name of the PVC.
<2> `<sc-name-cross-sub>` is the name of the storage class that you created in the previous step.
<1> The name of the PVC.
<2> The name of the storage class that you created in the previous step.

[id="persistent-storage-csi-azure-file-cross-sub-overview_{context}"]
= Azure File cross-subscription support

Cross-subscription support allows you to have an {product-title} cluster in one Azure subscription and mount your Azure file share in another Azure subscription using the Azure File Container Storage Interface (CSI) driver.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Suggested change
Cross-subscription support allows you to have an {product-title} cluster in one Azure subscription and mount your Azure file share in another Azure subscription using the Azure File Container Storage Interface (CSI) driver.
Cross-subscription support allows you to have an {product-title} cluster in one Azure subscription and mount your Azure file share in another Azure subscription by using the Azure File Container Storage Interface (CSI) driver.

Comment on lines +23 to +28
[source,terminal]
====
$ sp_id=$(oc -n openshift-cluster-csi-drivers get secret azure-file-credentials -o jsonpath='{.data.azure_client_id}' | base64 --decode)

$ az ad sp show --id ${sp_id} --query displayName --output tsv
====
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[source,terminal]
====
$ sp_id=$(oc -n openshift-cluster-csi-drivers get secret azure-file-credentials -o jsonpath='{.data.azure_client_id}' | base64 --decode)
$ az ad sp show --id ${sp_id} --query displayName --output tsv
====
[source,terminal]
----
$ sp_id=$(oc -n openshift-cluster-csi-drivers get secret azure-file-credentials -o jsonpath='{.data.azure_client_id}' | base64 --decode)
$ az ad sp show --id ${sp_id} --query displayName --output tsv
----

Comment on lines +32 to +37
[source,terminal]
====
$ mi_id=$(oc -n openshift-cluster-csi-drivers get secret azure-file-credentials -o jsonpath='{.data.azure_client_id}' | base64 --decode)

$ az identity list --query "[?clientId=='${mi_id}'].{Name:name}" --output tsv
====
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[source,terminal]
====
$ mi_id=$(oc -n openshift-cluster-csi-drivers get secret azure-file-credentials -o jsonpath='{.data.azure_client_id}' | base64 --decode)
$ az identity list --query "[?clientId=='${mi_id}'].{Name:name}" --output tsv
====
[source,terminal]
----
$ mi_id=$(oc -n openshift-cluster-csi-drivers get secret azure-file-credentials -o jsonpath='{.data.azure_client_id}' | base64 --decode)
$ az identity list --query "[?clientId=='${mi_id}'].{Name:name}" --output tsv
----

Comment on lines +29 to +30
.Example PV YAML file
[source, terminal]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.Example PV YAML file
[source, terminal]
.Example PV YAML file
[source,yaml]

. Create a persistent value claim (PVC) specifying the existing Azure File share referenced in Step 1 using a similar configuration to the following:
+
.Example PVC YAML file
[source, yaml]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure the space is needed, or does anything.

Suggested change
[source, yaml]
[source,yaml]

@mburke5678
Copy link
Contributor

@lpettyjo A few suggestions. Otherwise LGTM

@mburke5678 mburke5678 added peer-review-done Signifies that the peer review team has reviewed this PR and removed peer-review-in-progress Signifies that the peer review team is reviewing this PR peer-review-needed Signifies that the peer review team needs to review this PR labels Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch/enterprise-4.19 peer-review-done Signifies that the peer review team has reviewed this PR size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants