Skip to content

Commit 470027e

Browse files
authored
Upgrade objstore and change Azure bucket client (#5645)
* upgrade objstore and change Azure bucket clinet Signed-off-by: Ben Ye <[email protected]> * update pr number Signed-off-by: Ben Ye <[email protected]> * fix doc again Signed-off-by: Ben Ye <[email protected]> --------- Signed-off-by: Ben Ye <[email protected]>
1 parent 09ee53a commit 470027e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1165
-568
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Changelog
22

33
## master / unreleased
4-
* [ENHANCEMENT] Store Gateway: Added `-store-gateway.enabled-tenants` and `-store-gateway.disabled-tenants` to explicitly enable or disable store-gateway for specific tenants. #5638
4+
* [CHANGE] Azure Storage: Upgraded objstore dependency and support Azure Workload Identity Authentication. Added `connection_string` to support authenticating via SAS token. Marked `msi_resource` config as deprecating. #5645
55
* [FEATURE] Ingester: Add per-tenant new metric `cortex_ingester_tsdb_data_replay_duration_seconds`. #5477
6+
* [ENHANCEMENT] Store Gateway: Added `-store-gateway.enabled-tenants` and `-store-gateway.disabled-tenants` to explicitly enable or disable store-gateway for specific tenants. #5638
67

78
## 1.16.0 in progress
89

docs/blocks-storage/querier.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,13 @@ blocks_storage:
339339
# CLI flag: -blocks-storage.azure.account-key
340340
[account_key: <string> | default = ""]
341341
342+
# The values of `account-name` and `endpoint-suffix` values will not be
343+
# ignored if `connection-string` is set. Use this method over `account-key`
344+
# if you need to authenticate via a SAS token or if you use the Azurite
345+
# emulator.
346+
# CLI flag: -blocks-storage.azure.connection-string
347+
[connection_string: <string> | default = ""]
348+
342349
# Azure storage container name
343350
# CLI flag: -blocks-storage.azure.container-name
344351
[container_name: <string> | default = ""]
@@ -352,12 +359,14 @@ blocks_storage:
352359
# CLI flag: -blocks-storage.azure.max-retries
353360
[max_retries: <int> | default = 20]
354361

355-
# Azure storage MSI resource. Either this or account key must be set.
362+
# Deprecated: Azure storage MSI resource. It will be set automatically by
363+
# Azure SDK.
356364
# CLI flag: -blocks-storage.azure.msi-resource
357365
[msi_resource: <string> | default = ""]
358366

359367
# Azure storage MSI resource managed identity client Id. If not supplied
360-
# system assigned identity is used
368+
# default Azure credential will be used. Set it to empty if you need to
369+
# authenticate via Azure Workload Identity.
361370
# CLI flag: -blocks-storage.azure.user-assigned-id
362371
[user_assigned_id: <string> | default = ""]
363372

docs/blocks-storage/store-gateway.md

+11-2
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,13 @@ blocks_storage:
459459
# CLI flag: -blocks-storage.azure.account-key
460460
[account_key: <string> | default = ""]
461461
462+
# The values of `account-name` and `endpoint-suffix` values will not be
463+
# ignored if `connection-string` is set. Use this method over `account-key`
464+
# if you need to authenticate via a SAS token or if you use the Azurite
465+
# emulator.
466+
# CLI flag: -blocks-storage.azure.connection-string
467+
[connection_string: <string> | default = ""]
468+
462469
# Azure storage container name
463470
# CLI flag: -blocks-storage.azure.container-name
464471
[container_name: <string> | default = ""]
@@ -472,12 +479,14 @@ blocks_storage:
472479
# CLI flag: -blocks-storage.azure.max-retries
473480
[max_retries: <int> | default = 20]
474481

475-
# Azure storage MSI resource. Either this or account key must be set.
482+
# Deprecated: Azure storage MSI resource. It will be set automatically by
483+
# Azure SDK.
476484
# CLI flag: -blocks-storage.azure.msi-resource
477485
[msi_resource: <string> | default = ""]
478486

479487
# Azure storage MSI resource managed identity client Id. If not supplied
480-
# system assigned identity is used
488+
# default Azure credential will be used. Set it to empty if you need to
489+
# authenticate via Azure Workload Identity.
481490
# CLI flag: -blocks-storage.azure.user-assigned-id
482491
[user_assigned_id: <string> | default = ""]
483492

docs/configuration/config-file-reference.md

+40-8
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,12 @@ azure:
621621
# CLI flag: -alertmanager-storage.azure.account-key
622622
[account_key: <string> | default = ""]
623623
624+
# The values of `account-name` and `endpoint-suffix` values will not be
625+
# ignored if `connection-string` is set. Use this method over `account-key` if
626+
# you need to authenticate via a SAS token or if you use the Azurite emulator.
627+
# CLI flag: -alertmanager-storage.azure.connection-string
628+
[connection_string: <string> | default = ""]
629+
624630
# Azure storage container name
625631
# CLI flag: -alertmanager-storage.azure.container-name
626632
[container_name: <string> | default = ""]
@@ -634,12 +640,14 @@ azure:
634640
# CLI flag: -alertmanager-storage.azure.max-retries
635641
[max_retries: <int> | default = 20]
636642

637-
# Azure storage MSI resource. Either this or account key must be set.
643+
# Deprecated: Azure storage MSI resource. It will be set automatically by
644+
# Azure SDK.
638645
# CLI flag: -alertmanager-storage.azure.msi-resource
639646
[msi_resource: <string> | default = ""]
640647

641648
# Azure storage MSI resource managed identity client Id. If not supplied
642-
# system assigned identity is used
649+
# default Azure credential will be used. Set it to empty if you need to
650+
# authenticate via Azure Workload Identity.
643651
# CLI flag: -alertmanager-storage.azure.user-assigned-id
644652
[user_assigned_id: <string> | default = ""]
645653

@@ -886,6 +894,12 @@ azure:
886894
# CLI flag: -blocks-storage.azure.account-key
887895
[account_key: <string> | default = ""]
888896
897+
# The values of `account-name` and `endpoint-suffix` values will not be
898+
# ignored if `connection-string` is set. Use this method over `account-key` if
899+
# you need to authenticate via a SAS token or if you use the Azurite emulator.
900+
# CLI flag: -blocks-storage.azure.connection-string
901+
[connection_string: <string> | default = ""]
902+
889903
# Azure storage container name
890904
# CLI flag: -blocks-storage.azure.container-name
891905
[container_name: <string> | default = ""]
@@ -899,12 +913,14 @@ azure:
899913
# CLI flag: -blocks-storage.azure.max-retries
900914
[max_retries: <int> | default = 20]
901915

902-
# Azure storage MSI resource. Either this or account key must be set.
916+
# Deprecated: Azure storage MSI resource. It will be set automatically by
917+
# Azure SDK.
903918
# CLI flag: -blocks-storage.azure.msi-resource
904919
[msi_resource: <string> | default = ""]
905920

906921
# Azure storage MSI resource managed identity client Id. If not supplied
907-
# system assigned identity is used
922+
# default Azure credential will be used. Set it to empty if you need to
923+
# authenticate via Azure Workload Identity.
908924
# CLI flag: -blocks-storage.azure.user-assigned-id
909925
[user_assigned_id: <string> | default = ""]
910926

@@ -4142,6 +4158,12 @@ azure:
41424158
# CLI flag: -ruler-storage.azure.account-key
41434159
[account_key: <string> | default = ""]
41444160
4161+
# The values of `account-name` and `endpoint-suffix` values will not be
4162+
# ignored if `connection-string` is set. Use this method over `account-key` if
4163+
# you need to authenticate via a SAS token or if you use the Azurite emulator.
4164+
# CLI flag: -ruler-storage.azure.connection-string
4165+
[connection_string: <string> | default = ""]
4166+
41454167
# Azure storage container name
41464168
# CLI flag: -ruler-storage.azure.container-name
41474169
[container_name: <string> | default = ""]
@@ -4155,12 +4177,14 @@ azure:
41554177
# CLI flag: -ruler-storage.azure.max-retries
41564178
[max_retries: <int> | default = 20]
41574179

4158-
# Azure storage MSI resource. Either this or account key must be set.
4180+
# Deprecated: Azure storage MSI resource. It will be set automatically by
4181+
# Azure SDK.
41594182
# CLI flag: -ruler-storage.azure.msi-resource
41604183
[msi_resource: <string> | default = ""]
41614184

41624185
# Azure storage MSI resource managed identity client Id. If not supplied
4163-
# system assigned identity is used
4186+
# default Azure credential will be used. Set it to empty if you need to
4187+
# authenticate via Azure Workload Identity.
41644188
# CLI flag: -ruler-storage.azure.user-assigned-id
41654189
[user_assigned_id: <string> | default = ""]
41664190

@@ -4415,6 +4439,12 @@ azure:
44154439
# CLI flag: -runtime-config.azure.account-key
44164440
[account_key: <string> | default = ""]
44174441
4442+
# The values of `account-name` and `endpoint-suffix` values will not be
4443+
# ignored if `connection-string` is set. Use this method over `account-key` if
4444+
# you need to authenticate via a SAS token or if you use the Azurite emulator.
4445+
# CLI flag: -runtime-config.azure.connection-string
4446+
[connection_string: <string> | default = ""]
4447+
44184448
# Azure storage container name
44194449
# CLI flag: -runtime-config.azure.container-name
44204450
[container_name: <string> | default = ""]
@@ -4428,12 +4458,14 @@ azure:
44284458
# CLI flag: -runtime-config.azure.max-retries
44294459
[max_retries: <int> | default = 20]
44304460

4431-
# Azure storage MSI resource. Either this or account key must be set.
4461+
# Deprecated: Azure storage MSI resource. It will be set automatically by
4462+
# Azure SDK.
44324463
# CLI flag: -runtime-config.azure.msi-resource
44334464
[msi_resource: <string> | default = ""]
44344465

44354466
# Azure storage MSI resource managed identity client Id. If not supplied
4436-
# system assigned identity is used
4467+
# default Azure credential will be used. Set it to empty if you need to
4468+
# authenticate via Azure Workload Identity.
44374469
# CLI flag: -runtime-config.azure.user-assigned-id
44384470
[user_assigned_id: <string> | default = ""]
44394471

go.mod

+4-4
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ require (
5151
github.com/sony/gobreaker v0.5.0
5252
github.com/spf13/afero v1.9.5
5353
github.com/stretchr/testify v1.8.4
54-
github.com/thanos-io/objstore v0.0.0-20230921130928-63a603e651ed
54+
github.com/thanos-io/objstore v0.0.0-20231112185854-37752ee64d98
5555
github.com/thanos-io/promql-engine v0.0.0-20231013104847-4517c0d5f591
5656
github.com/thanos-io/thanos v0.32.5-0.20231103115946-463a6ce8b53c
5757
github.com/uber/jaeger-client-go v2.30.0+incompatible
@@ -89,8 +89,8 @@ require (
8989
cloud.google.com/go/compute/metadata v0.2.3 // indirect
9090
cloud.google.com/go/iam v1.1.1 // indirect
9191
cloud.google.com/go/storage v1.30.1 // indirect
92-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 // indirect
93-
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 // indirect
92+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 // indirect
93+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect
9494
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect
9595
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 // indirect
9696
github.com/AzureAD/microsoft-authentication-library-for-go v1.1.1 // indirect
@@ -143,7 +143,7 @@ require (
143143
github.com/google/btree v1.0.1 // indirect
144144
github.com/google/pprof v0.0.0-20230705174524-200ffdc848b8 // indirect
145145
github.com/google/s2a-go v0.1.4 // indirect
146-
github.com/google/uuid v1.3.0 // indirect
146+
github.com/google/uuid v1.3.1 // indirect
147147
github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect
148148
github.com/googleapis/gax-go/v2 v2.12.0 // indirect
149149
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201207153454-9f6bf00c00a7 // indirect

go.sum

+8-7
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,10 @@ gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zum
605605
git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc=
606606
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw=
607607
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
608-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY=
609-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q=
610-
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1 h1:LNHhpdK7hzUcx/k1LIcuh5k7k1LGIWLQfCjaneSj7Fc=
611-
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.1/go.mod h1:uE9zaUfEQT/nbQjVi2IblCG9iaLtZsuYZ8ne+PuQ02M=
608+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0 h1:9kDVnTz3vbfweTqAUmk/a/pH5pWFCHtvRpHYC0G/dcA=
609+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.8.0/go.mod h1:3Ug6Qzto9anB6mGlEdgYMDF5zHQ+wwhEaYR4s17PHMw=
610+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI=
611+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs=
612612
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY=
613613
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM=
614614
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 h1:u/LLAOFgsMv7HmNL4Qufg58y+qElGOt5qv0z1mURkRY=
@@ -1068,8 +1068,9 @@ github.com/google/s2a-go v0.1.4 h1:1kZ/sQM3srePvKs3tXAvQzo66XfcReoqFpIpIccE7Oc=
10681068
github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A=
10691069
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
10701070
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1071-
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
10721071
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1072+
github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4=
1073+
github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
10731074
github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8=
10741075
github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8=
10751076
github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg=
@@ -1514,8 +1515,8 @@ github.com/tencentyun/cos-go-sdk-v5 v0.7.40 h1:W6vDGKCHe4wBACI1d2UgE6+50sJFhRWU4
15141515
github.com/tencentyun/cos-go-sdk-v5 v0.7.40/go.mod h1:4dCEtLHGh8QPxHEkgq+nFaky7yZxQuYwgSJM87icDaw=
15151516
github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e h1:f1Zsv7OAU9iQhZwigp50Yl38W10g/vd5NC8Rdk1Jzng=
15161517
github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e/go.mod h1:jXcofnrSln/cLI6/dhlBxPQZEEQHVPCcFaH75M+nSzM=
1517-
github.com/thanos-io/objstore v0.0.0-20230921130928-63a603e651ed h1:iWQdY3S6DpWjelVvKKSKgS7LeLkhK4VaEnQfphB9ZXA=
1518-
github.com/thanos-io/objstore v0.0.0-20230921130928-63a603e651ed/go.mod h1:oJ82xgcBDzGJrEgUsjlTj6n01+ZWUMMUR8BlZzX5xDE=
1518+
github.com/thanos-io/objstore v0.0.0-20231112185854-37752ee64d98 h1:gx2MTto1UQRumGoJzY3aFPQ31Ov3nOV7NaD7j6q288k=
1519+
github.com/thanos-io/objstore v0.0.0-20231112185854-37752ee64d98/go.mod h1:JauBAcJ61tRSv9widgISVmA6akQXDeUMXBrVmWW4xog=
15191520
github.com/thanos-io/promql-engine v0.0.0-20231013104847-4517c0d5f591 h1:6bZbFM+Mvy2kL8BeL8TJ5+5pV3sUR2PSLaZyw911rtQ=
15201521
github.com/thanos-io/promql-engine v0.0.0-20231013104847-4517c0d5f591/go.mod h1:vfXJv1JXNdLfHnjsHsLLJl5tyI7KblF76Wo5lZ9YC4Q=
15211522
github.com/thanos-io/thanos v0.32.5-0.20231103115946-463a6ce8b53c h1:hMpXd1ybZB/vnR3+zex93va42rQ++2E0qi2wVSf3AwY=

pkg/storage/bucket/azure/bucket_client.go

+9-8
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@ import (
44
"github.com/go-kit/log"
55
"github.com/prometheus/common/model"
66
"github.com/thanos-io/objstore"
7+
"github.com/thanos-io/objstore/exthttp"
78
"github.com/thanos-io/objstore/providers/azure"
89
yaml "gopkg.in/yaml.v2"
910
)
1011

1112
func NewBucketClient(cfg Config, name string, logger log.Logger) (objstore.Bucket, error) {
1213
bucketConfig := azure.Config{
13-
StorageAccountName: cfg.StorageAccountName,
14-
StorageAccountKey: cfg.StorageAccountKey.Value,
15-
ContainerName: cfg.ContainerName,
16-
Endpoint: cfg.Endpoint,
17-
MaxRetries: cfg.MaxRetries,
18-
MSIResource: cfg.MSIResource,
19-
UserAssignedID: cfg.UserAssignedID,
20-
HTTPConfig: azure.HTTPConfig{
14+
StorageAccountName: cfg.StorageAccountName,
15+
StorageAccountKey: cfg.StorageAccountKey.Value,
16+
StorageConnectionString: cfg.StorageConnectionString.Value,
17+
ContainerName: cfg.ContainerName,
18+
Endpoint: cfg.Endpoint,
19+
MaxRetries: cfg.MaxRetries,
20+
UserAssignedID: cfg.UserAssignedID,
21+
HTTPConfig: exthttp.HTTPConfig{
2122
IdleConnTimeout: model.Duration(cfg.IdleConnTimeout),
2223
ResponseHeaderTimeout: model.Duration(cfg.ResponseHeaderTimeout),
2324
InsecureSkipVerify: cfg.InsecureSkipVerify,

pkg/storage/bucket/azure/config.go

+12-9
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ import (
99

1010
// Config holds the config options for an Azure backend
1111
type Config struct {
12-
StorageAccountName string `yaml:"account_name"`
13-
StorageAccountKey flagext.Secret `yaml:"account_key"`
14-
ContainerName string `yaml:"container_name"`
15-
Endpoint string `yaml:"endpoint_suffix"`
16-
MaxRetries int `yaml:"max_retries"`
17-
MSIResource string `yaml:"msi_resource"`
18-
UserAssignedID string `yaml:"user_assigned_id"`
12+
StorageAccountName string `yaml:"account_name"`
13+
StorageAccountKey flagext.Secret `yaml:"account_key"`
14+
StorageConnectionString flagext.Secret `yaml:"connection_string"`
15+
ContainerName string `yaml:"container_name"`
16+
Endpoint string `yaml:"endpoint_suffix"`
17+
MaxRetries int `yaml:"max_retries"`
18+
// Deprecated: set automatically by Azure SDK.
19+
MSIResource string `yaml:"msi_resource"`
20+
UserAssignedID string `yaml:"user_assigned_id"`
1921

2022
http.Config `yaml:"http"`
2123
}
@@ -29,10 +31,11 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
2931
func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) {
3032
f.StringVar(&cfg.StorageAccountName, prefix+"azure.account-name", "", "Azure storage account name")
3133
f.Var(&cfg.StorageAccountKey, prefix+"azure.account-key", "Azure storage account key")
34+
f.Var(&cfg.StorageConnectionString, prefix+"azure.connection-string", "The values of `account-name` and `endpoint-suffix` values will not be ignored if `connection-string` is set. Use this method over `account-key` if you need to authenticate via a SAS token or if you use the Azurite emulator.")
3235
f.StringVar(&cfg.ContainerName, prefix+"azure.container-name", "", "Azure storage container name")
3336
f.StringVar(&cfg.Endpoint, prefix+"azure.endpoint-suffix", "", "Azure storage endpoint suffix without schema. The account name will be prefixed to this value to create the FQDN")
3437
f.IntVar(&cfg.MaxRetries, prefix+"azure.max-retries", 20, "Number of retries for recoverable errors")
35-
f.StringVar(&cfg.MSIResource, prefix+"azure.msi-resource", "", "Azure storage MSI resource. Either this or account key must be set.")
36-
f.StringVar(&cfg.UserAssignedID, prefix+"azure.user-assigned-id", "", "Azure storage MSI resource managed identity client Id. If not supplied system assigned identity is used")
38+
f.StringVar(&cfg.MSIResource, prefix+"azure.msi-resource", "", "Deprecated: Azure storage MSI resource. It will be set automatically by Azure SDK.")
39+
f.StringVar(&cfg.UserAssignedID, prefix+"azure.user-assigned-id", "", "Azure storage MSI resource managed identity client Id. If not supplied default Azure credential will be used. Set it to empty if you need to authenticate via Azure Workload Identity.")
3740
cfg.Config.RegisterFlagsWithPrefix(prefix+"azure.", f)
3841
}

pkg/storage/bucket/azure/config_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ account_name: test-account-name
4545
account_key: test-account-key
4646
container_name: test-container-name
4747
endpoint_suffix: test-endpoint-suffix
48-
msi_resource: test-msi-resource
4948
user_assigned_id: test-user-assigned-id
5049
max_retries: 1
5150
http:
@@ -63,7 +62,6 @@ http:
6362
StorageAccountKey: flagext.Secret{Value: "test-account-key"},
6463
ContainerName: "test-container-name",
6564
Endpoint: "test-endpoint-suffix",
66-
MSIResource: "test-msi-resource",
6765
UserAssignedID: "test-user-assigned-id",
6866
MaxRetries: 1,
6967
Config: http.Config{

0 commit comments

Comments
 (0)