Skip to content

Commit abf29da

Browse files
committed
docs/spec: document Bucket's Azure Blob support
Signed-off-by: Hidde Beydals <[email protected]>
1 parent 8d4fce1 commit abf29da

File tree

1 file changed

+168
-2
lines changed

1 file changed

+168
-2
lines changed

docs/spec/v1beta2/buckets.md

Lines changed: 168 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ Supported options are:
120120

121121
- [Generic](#generic)
122122
- [AWS](#aws)
123+
- [Azure](#azure)
123124
- [GCP](#gcp)
124125

125126
If you do not specify `.spec.provider`, it defaults to `generic`.
@@ -260,6 +261,171 @@ data:
260261
secretkey: <BASE64>
261262
```
262263

264+
#### Azure
265+
266+
When a Bucket's `.spec.provider` is set to `azure`, the source-controller will
267+
attempt to communicate with the specified [Endpoint](#endpoint) using the
268+
[Azure Blob Storage SDK for Go](https://github.com/Azure/azure-sdk-for-go/tree/main/sdk/storage/azblob).
269+
270+
Without a [Secret reference](#secret-reference), authentication using a chain
271+
with:
272+
273+
- [Environment credentials](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#EnvironmentCredential)
274+
- [Managed Identity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#ManagedIdentityCredential)
275+
with the `AZURE_CLIENT_ID`
276+
- Managed Identity with a system-assigned identity
277+
278+
is attempted by default. If no chain can be established, the bucket
279+
is assumed to be publicly reachable.
280+
281+
When a reference is specified, it expects a Secret with one of the following
282+
sets of `.data` fields:
283+
284+
- `tenantId`, `clientId` and `clientSecret` for authenticating a Service
285+
Principal with a secret.
286+
- `tenantId`, `clientId` and `clientCertificate` (plus optionally
287+
`clientCertificatePassword` and/or `clientCertificateSendChain`) for
288+
authenticating a Service Principal with a certificate.
289+
- `clientId` for authenticating using a Managed Identity.
290+
- `accountKey` for authenticating using a
291+
[Shared Key](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/storage/azblob#SharedKeyCredential).
292+
293+
For any Managed Identity and/or Azure Active Directory authentication method,
294+
the base URL can be configured using `.data.authorityHost`. If not supplied,
295+
[`AzurePublicCloud` is assumed](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity#AuthorityHost).
296+
297+
##### Azure example
298+
299+
```yaml
300+
---
301+
apiVersion: source.toolkit.fluxcd.io/v1beta2
302+
kind: Bucket
303+
metadata:
304+
name: azure-public
305+
namespace: default
306+
spec:
307+
interval: 5m0s
308+
provider: azure
309+
bucketName: podinfo
310+
endpoint: https://podinfoaccount.blob.core.windows.net
311+
timeout: 30s
312+
```
313+
314+
##### Azure Service Principal Secret example
315+
316+
```yaml
317+
---
318+
apiVersion: source.toolkit.fluxcd.io/v1beta2
319+
kind: Bucket
320+
metadata:
321+
name: azure-service-principal-secret
322+
namespace: default
323+
spec:
324+
interval: 5m0s
325+
provider: azure
326+
bucketName: <bucket-name>
327+
endpoint: https://<account-name>.blob.core.windows.net
328+
secretRef:
329+
name: azure-sp-auth
330+
---
331+
apiVersion: v1
332+
kind: Secret
333+
metadata:
334+
name: azure-sp-auth
335+
namespace: default
336+
type: Opaque
337+
data:
338+
tenantId: <BASE64>
339+
clientId: <BASE64>
340+
clientSecret: <BASE64>
341+
```
342+
343+
##### Azure Service Principal Certificate example
344+
345+
```yaml
346+
---
347+
apiVersion: source.toolkit.fluxcd.io/v1beta2
348+
kind: Bucket
349+
metadata:
350+
name: azure-service-principal-cert
351+
namespace: default
352+
spec:
353+
interval: 5m0s
354+
provider: azure
355+
bucketName: <bucket-name>
356+
endpoint: https://<account-name>.blob.core.windows.net
357+
secretRef:
358+
name: azure-sp-auth
359+
---
360+
apiVersion: v1
361+
kind: Secret
362+
metadata:
363+
name: azure-sp-auth
364+
namespace: default
365+
type: Opaque
366+
data:
367+
tenantId: <BASE64>
368+
clientId: <BASE64>
369+
clientCertificate: <BASE64>
370+
# Plus optionally
371+
clientCertificatePassword: <BASE64>
372+
clientCertificateSendChain: <BASE64> # either "1" or "true"
373+
```
374+
375+
##### Azure Managed Identity with Client ID example
376+
377+
```yaml
378+
---
379+
apiVersion: source.toolkit.fluxcd.io/v1beta2
380+
kind: Bucket
381+
metadata:
382+
name: azure-managed-identity
383+
namespace: default
384+
spec:
385+
interval: 5m0s
386+
provider: azure
387+
bucketName: <bucket-name>
388+
endpoint: https://<account-name>.blob.core.windows.net
389+
secretRef:
390+
name: azure-smi-auth
391+
---
392+
apiVersion: v1
393+
kind: Secret
394+
metadata:
395+
name: azure-smi-auth
396+
namespace: default
397+
type: Opaque
398+
data:
399+
clientId: <BASE64>
400+
```
401+
402+
##### Azure Blob Shared Key example
403+
404+
```yaml
405+
---
406+
apiVersion: source.toolkit.fluxcd.io/v1beta2
407+
kind: Bucket
408+
metadata:
409+
name: azure-shared-key
410+
namespace: default
411+
spec:
412+
interval: 5m0s
413+
provider: azure
414+
bucketName: <bucket-name>
415+
endpoint: https://<account-name>.blob.core.windows.net
416+
secretRef:
417+
name: azure-key
418+
---
419+
apiVersion: v1
420+
kind: Secret
421+
metadata:
422+
name: azure-key
423+
namespace: default
424+
type: Opaque
425+
data:
426+
accountKey: <BASE64>
427+
```
428+
263429
#### GCP
264430

265431
When a Bucket's `.spec.provider` is set to `gcp`, the source-controller will
@@ -281,7 +447,7 @@ The Provider allows for specifying the
281447

282448
```yaml
283449
---
284-
apiVersion: source.toolkit.fluccd.io/v1beta2
450+
apiVersion: source.toolkit.fluxcd.io/v1beta2
285451
kind: Bucket
286452
metadata:
287453
name: gcp-workload-identity
@@ -299,7 +465,7 @@ spec:
299465

300466
```yaml
301467
---
302-
apiVersion: source.toolkit.fluccd.io/v1beta1
468+
apiVersion: source.toolkit.fluxcd.io/v1beta2
303469
kind: Bucket
304470
metadata:
305471
name: gcp-secret

0 commit comments

Comments
 (0)