Skip to content

Commit aa370f2

Browse files
authored
Merge pull request #1167 from somtochiama/azure-docs
Update docs on Azure identity
2 parents 36ca723 + fb2c74d commit aa370f2

File tree

3 files changed

+42
-22
lines changed

3 files changed

+42
-22
lines changed

docs/spec/v1beta2/buckets.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ data:
439439

440440
##### Workload Identity
441441

442-
If you have [Workload Identity mutating webhook](https://azure.github.io/azure-workload-identity/docs/installation/managed-clusters.html)
443-
installed on your cluster. You need to create an Azure Identity and give it
442+
If you have [Workload Identity](https://azure.github.io/azure-workload-identity/docs/installation/managed-clusters.html)
443+
set up on your cluster, you need to create an Azure Identity and give it
444444
access to Azure Blob Storage.
445445

446446
```shell
@@ -465,7 +465,7 @@ az identity federated-credential create \
465465
--subject "system:serviceaccount:flux-system:source-controller"
466466
```
467467

468-
Add a patch to label and annotate the source-controller Pods and ServiceAccount
468+
Add a patch to label and annotate the source-controller Deployment and ServiceAccount
469469
correctly so that it can match an identity binding:
470470

471471
```yaml
@@ -501,7 +501,7 @@ patches:
501501
```
502502

503503
If you have set up Workload Identity correctly and labeled the source-controller
504-
Pod and ServiceAccount, then you don't need to reference a Secret. For more information,
504+
Deployment and ServiceAccount, then you don't need to reference a Secret. For more information,
505505
please see [documentation](https://azure.github.io/azure-workload-identity/docs/quick-start.html).
506506

507507
```yaml
@@ -517,7 +517,7 @@ spec:
517517
endpoint: https://testfluxsas.blob.core.windows.net
518518
```
519519

520-
##### Managed Identity with AAD Pod Identity
520+
##### Deprecated: Managed Identity with AAD Pod Identity
521521

522522
If you are using [aad pod identity](https://azure.github.io/aad-pod-identity/docs),
523523
You need to create an Azure Identity and give it access to Azure Blob Storage.
@@ -561,7 +561,7 @@ spec:
561561
selector: ${IDENTITY_NAME}
562562
```
563563

564-
Label the source-controller correctly so that it can match an identity binding:
564+
Label the source-controller Deployment correctly so that it can match an identity binding:
565565

566566
```yaml
567567
apiVersion: apps/v1
@@ -577,7 +577,7 @@ spec:
577577
```
578578

579579
If you have set up aad-pod-identity correctly and labeled the source-controller
580-
Pod, then you don't need to reference a Secret.
580+
Deployment, then you don't need to reference a Secret.
581581

582582
```yaml
583583
apiVersion: source.toolkit.fluxcd.io/v1beta2

docs/spec/v1beta2/helmrepositories.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,21 @@ to the IAM role when using IRSA.
224224

225225
#### Azure
226226

227-
The `azure` provider can be used to authenticate automatically using kubelet managed
228-
identity or Azure Active Directory pod-managed identity (aad-pod-identity), and
227+
The `azure` provider can be used to authenticate automatically using Workload Identity, Kubelet Managed
228+
Identity or Azure Active Directory pod-managed identity (aad-pod-identity), and
229229
by extension gain access to ACR.
230230

231231
##### Kubelet Managed Identity
232232

233233
When the kubelet managed identity has access to ACR, source-controller running on
234234
it will also have access to ACR.
235235

236+
**Note:** If you have more than one identity configured on the cluster, you have to specify which one to use
237+
by setting the `AZURE_CLIENT_ID` environment variable in the source-controller deployment.
238+
239+
If you are running into further issues, please look at the
240+
[troubleshooting guide](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azidentity/TROUBLESHOOTING.md#azure-virtual-machine-managed-identity).
241+
236242
##### Azure Workload Identity
237243

238244
When using Workload Identity to enable access to ACR, add the following patch to
@@ -270,13 +276,17 @@ patches:
270276
azure.workload.identity/use: "true"
271277
```
272278

273-
To use Workload Identity, you have to install the Workload Identity
274-
mutating webhook and create an identity that has access to ACR. Next, establish
279+
Ensure Workload Identity is properly set up on your cluster and the mutating webhook is installed.
280+
Create an identity that has access to ACR. Next, establish
275281
a federated identity between the source-controller ServiceAccount and the
276-
identity. Patch the source-controller Pod and ServiceAccount as shown in the patch
282+
identity. Patch the source-controller Deployment and ServiceAccount as shown in the patch
277283
above. Please take a look at this [guide](https://azure.github.io/azure-workload-identity/docs/quick-start.html#6-establish-federated-identity-credential-between-the-identity-and-the-service-account-issuer--subject).
278284

279-
##### AAD Pod Identity
285+
##### Deprecated: AAD Pod Identity
286+
287+
**Warning:** The AAD Pod Identity project will be archived in
288+
[September 2023](https://github.com/Azure/aad-pod-identity#-announcement),
289+
and you are advised to use Workload Identity instead.
280290

281291
When using aad-pod-identity to enable access to ACR, add the following patch to
282292
your bootstrap repository, in the `flux-system/kustomization.yaml` file:
@@ -302,7 +312,7 @@ to give the `source-controller` pod access to the ACR. To do this, you have to i
302312
`aad-pod-identity` on your cluster, create a managed identity that has access to the
303313
container registry (this can also be the Kubelet identity if it has `AcrPull` role
304314
assignment on the ACR), create an `AzureIdentity` and `AzureIdentityBinding` that describe
305-
the managed identity and then label the `source-controller` pods with the name of the
315+
the managed identity and then label the `source-controller` deployment with the name of the
306316
AzureIdentity as shown in the patch above. Please take a look at [this guide](https://azure.github.io/aad-pod-identity/docs/)
307317
or [this one](https://docs.microsoft.com/en-us/azure/aks/use-azure-ad-pod-identity)
308318
if you want to use AKS pod-managed identities add-on that is in preview.

docs/spec/v1beta2/ocirepositories.md

+18-8
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,21 @@ to the IAM role when using IRSA.
157157

158158
#### Azure
159159

160-
The `azure` provider can be used to authenticate automatically using kubelet
161-
managed identity or Azure Active Directory pod-managed identity (aad-pod-identity),
160+
The `azure` provider can be used to authenticate automatically using Workload Identity, Kubelet Managed
161+
Identity or Azure Active Directory pod-managed identity (aad-pod-identity),
162162
and by extension gain access to ACR.
163163

164164
##### Kubelet Managed Identity
165165

166166
When the kubelet managed identity has access to ACR, source-controller running
167167
on it will also have access to ACR.
168168

169+
**Note:** If you have more than one identity configured on the cluster, you have to specify which one to use
170+
by setting the `AZURE_CLIENT_ID` environment variable in the source-controller deployment.
171+
172+
If you are running into further issues, please look at the
173+
[troubleshooting guide](https://github.com/Azure/azure-sdk-for-go/blob/main/sdk/azidentity/TROUBLESHOOTING.md#azure-virtual-machine-managed-identity).
174+
169175
##### Workload Identity
170176

171177
When using Workload Identity to enable access to ACR, add the following patch to
@@ -203,13 +209,17 @@ patches:
203209
azure.workload.identity/use: "true"
204210
```
205211

206-
To use Workload Identity, you have to install the Workload Identity
207-
mutating webhook and create an identity that has access to ACR. Next, establish
208-
a federated identity between the source-controller ServiceAccount and the
209-
identity. Patch the source-controller Pod and ServiceAccount as shown in the patch
212+
Ensure Workload Identity is properly set up on your cluster and the mutating webhook is installed.
213+
Create an identity that has access to ACR. Next, establish
214+
a federated identity between the source-controller ServiceAccount and the
215+
identity. Patch the source-controller Deployment and ServiceAccount as shown in the patch
210216
above. Please take a look at this [guide](https://azure.github.io/azure-workload-identity/docs/quick-start.html#6-establish-federated-identity-credential-between-the-identity-and-the-service-account-issuer--subject).
211217

212-
##### AAD Pod Identity
218+
##### Deprecated: AAD Pod Identity
219+
220+
**Note:** The AAD Pod Identity project will be archived in [September 2023](https://github.com/Azure/aad-pod-identity#-announcement),
221+
and you are advised to use Workload Identity instead.
222+
213223
When using aad-pod-identity to enable access to ACR, add the following patch to
214224
your bootstrap repository, in the `flux-system/kustomization.yaml` file:
215225

@@ -234,7 +244,7 @@ has to be used to give the `source-controller` pod access to the ACR.
234244
To do this, you have to install `aad-pod-identity` on your cluster, create a managed identity
235245
that has access to the container registry (this can also be the Kubelet identity
236246
if it has `AcrPull` role assignment on the ACR), create an `AzureIdentity` and `AzureIdentityBinding`
237-
that describe the managed identity and then label the `source-controller` pods
247+
that describe the managed identity and then label the `source-controller` deployment
238248
with the name of the AzureIdentity as shown in the patch above. Please take a look
239249
at [this guide](https://azure.github.io/aad-pod-identity/docs/) or
240250
[this one](https://docs.microsoft.com/en-us/azure/aks/use-azure-ad-pod-identity)

0 commit comments

Comments
 (0)