Skip to content

Commit 9bb541b

Browse files
committed
Update docs
Signed-off-by: Somtochi Onyekwere <[email protected]>
1 parent 736e091 commit 9bb541b

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

docs/spec/v1beta2/buckets.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -537,15 +537,18 @@ The leading question mark is optional.
537537
The query values from the `sasKey` data field in the Secrets gets merged with the ones in the `spec.endpoint` of the `Bucket`.
538538
If the same key is present in the both of them, the value in the `sasKey` takes precedence.
539539

540-
**Note:** SAS Token has an expiry date and it should be updated before it expires so that Flux can
541-
continue to access Azure Storage. Also, The source-controller can use a account-level SAS token or a container-level SAS token.
542-
The minimum permissions for an account-level SAS Token is:
543-
- Allowed services: Blob
544-
- Allowed resource types: Container, Object
545-
- Allowed permission: Read, List
546-
547-
The minimum permissions for a container-level SAS Token is:
548-
- Permission: Read, List
540+
**Note:** The SAS token has an expiry date and it must be updated before it expires to allow Flux to
541+
continue to access Azure Storage. It is allowed to use an account-level or container-level SAS token.
542+
543+
The minimum permissions for an account-level SAS token are:
544+
- Allowed services: `Blob`
545+
- Allowed resource types: `Container`, `Object`
546+
- Allowed permissions: `Read`, `List`
547+
548+
The minimum permissions for a container-level SAS token are:
549+
- Allowed permissions: `Read`, `List`
550+
551+
Refer to the [Azure documentation](https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas#blob-service) for a full overview on permissions.
549552

550553
#### GCP
551554

pkg/azure/blob.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ import (
2121
"crypto/md5"
2222
"errors"
2323
"fmt"
24+
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
2425
"io"
2526
"net/url"
2627
"os"
2728
"path/filepath"
2829
"strings"
2930

30-
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
3131
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
32+
to "github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
3233
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
3334
_ "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
3435
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
@@ -180,10 +181,9 @@ func (c *BlobClient) BucketExists(ctx context.Context, bucketName string) (bool,
180181
if err != nil {
181182
return false, err
182183
}
183-
184-
var max int32 = 1
184+
185185
items := container.ListBlobsFlat(&azblob.ContainerListBlobsFlatOptions{
186-
MaxResults: &max,
186+
MaxResults: to.Ptr(int32(1)),
187187
})
188188
// We call next page only once since we just want to see if we get an error
189189
items.NextPage(ctx)

0 commit comments

Comments
 (0)