@@ -301,21 +301,16 @@ metadata:
301
301
302
302
# ### Azure
303
303
304
- When a Bucket's `.spec.provider` is set to `azure`, the source-controller will
305
- attempt to communicate with the specified [Endpoint](#endpoint) using the
306
- [Azure Blob Storage SDK for Go](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/storage/azblob).
307
-
308
- Without a [Secret reference](#secret-reference), authentication using a chain
309
- with :
304
+ For detailed setup instructions, see : https://fluxcd.io/flux/integrations/azure/#for-azure-blob-storage
310
305
311
- - [Environment credentials](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#EnvironmentCredential)
312
- - [Workload Identity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#WorkloadIdentityCredential)
313
- - [Managed Identity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#ManagedIdentityCredential)
314
- with the `AZURE_CLIENT_ID`
315
- - Managed Identity with a system-assigned identity
306
+ When using a [Secret reference](#secret-reference), it expects a Secret with
307
+ authentication fields (see examples below). Without a Secret reference,
308
+ authorization using a credential chain with Environment, Workload Identity,
309
+ and Managed Identity is attempted by default. For Workload Identity
310
+ authentication, configure the source-controller as described in the integration guide.
316
311
317
- is attempted by default. If no chain can be established, the bucket
318
- is assumed to be publicly reachable .
312
+ The source-controller uses the [Azure Blob Storage SDK for Go](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/storage/azblob)
313
+ to communicate with the specified [Endpoint](#endpoint) .
319
314
320
315
When a reference is specified, it expects a Secret with one of the following
321
316
sets of `.data` fields :
@@ -466,86 +461,6 @@ data:
466
461
accountKey: <BASE64>
467
462
` ` `
468
463
469
- # #### Workload Identity
470
-
471
- If you have [Workload Identity](https://azure.github.io/azure-workload-identity/docs/installation/managed-clusters.html)
472
- set up on your cluster, you need to create an Azure Identity and give it
473
- access to Azure Blob Storage.
474
-
475
- ` ` ` shell
476
- export IDENTITY_NAME="blob-access"
477
-
478
- az role assignment create --role "Storage Blob Data Reader" \
479
- --assignee-object-id "$(az identity show -n $IDENTITY_NAME -o tsv --query principalId -g $RESOURCE_GROUP)" \
480
- --scope "/subscriptions/<SUBSCRIPTION-ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.Storage/storageAccounts/<account-name>/blobServices/default/containers/<container-name>"
481
- ` ` `
482
-
483
- Establish a federated identity between the Identity and the source-controller
484
- ServiceAccount.
485
-
486
- ` ` ` shell
487
- export SERVICE_ACCOUNT_ISSUER="$(az aks show --resource-group <RESOURCE_GROUP> --name <CLUSTER-NAME> --query "oidcIssuerProfile.issuerUrl" -otsv)"
488
-
489
- az identity federated-credential create \
490
- --name "kubernetes-federated-credential" \
491
- --identity-name "${IDENTITY_NAME}" \
492
- --resource-group "${RESOURCE_GROUP}" \
493
- --issuer "${SERVICE_ACCOUNT_ISSUER}" \
494
- --subject "system:serviceaccount:flux-system:source-controller"
495
- ` ` `
496
-
497
- Add a patch to label and annotate the source-controller Deployment and ServiceAccount
498
- correctly so that it can match an identity binding :
499
-
500
- ` ` ` yaml
501
- apiVersion: kustomize.config.k8s.io/v1beta1
502
- kind: Kustomization
503
- resources:
504
- - gotk-components.yaml
505
- - gotk-sync.yaml
506
- patches:
507
- - patch: |-
508
- apiVersion: v1
509
- kind: ServiceAccount
510
- metadata:
511
- name: source-controller
512
- namespace: flux-system
513
- annotations:
514
- azure.workload.identity/client-id: <AZURE_CLIENT_ID>
515
- labels:
516
- azure.workload.identity/use: "true"
517
- - patch: |-
518
- apiVersion: apps/v1
519
- kind: Deployment
520
- metadata:
521
- name: source-controller
522
- namespace: flux-system
523
- labels:
524
- azure.workload.identity/use: "true"
525
- spec:
526
- template:
527
- metadata:
528
- labels:
529
- azure.workload.identity/use: "true"
530
- ` ` `
531
-
532
- If you have set up Workload Identity correctly and labeled the source-controller
533
- Deployment and ServiceAccount, then you don't need to reference a Secret. For more information,
534
- please see [documentation](https://azure.github.io/azure-workload-identity/docs/quick-start.html).
535
-
536
- ` ` ` yaml
537
- apiVersion: source.toolkit.fluxcd.io/v1
538
- kind: Bucket
539
- metadata:
540
- name: azure-bucket
541
- namespace: flux-system
542
- spec:
543
- interval: 5m0s
544
- provider: azure
545
- bucketName: testsas
546
- endpoint: https://testfluxsas.blob.core.windows.net
547
- ` ` `
548
-
549
464
# #### Deprecated: Managed Identity with AAD Pod Identity
550
465
551
466
If you are using [aad pod identity](https://azure.github.io/aad-pod-identity/docs),
0 commit comments