Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-1.24] chore: only use sas token for azcopy when useDataPlaneAPI is used #1296

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/blob/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func NewDriver(options *DriverOptions, kubeClient kubernetes.Interface, cloud *p
if d.accountSearchCache, err = azcache.NewTimedCache(time.Minute, getter, false); err != nil {
klog.Fatalf("%v", err)
}
if d.dataPlaneAPIVolCache, err = azcache.NewTimedCache(10*time.Minute, getter, false); err != nil {
if d.dataPlaneAPIVolCache, err = azcache.NewTimedCache(24*30*time.Hour, getter, false); err != nil {
klog.Fatalf("%v", err)
}
if d.azcopySasTokenCache, err = azcache.NewTimedCache(15*time.Minute, getter, false); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/blob/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ func (d *Driver) authorizeAzcopyWithIdentity() ([]string, error) {
func (d *Driver) getAzcopyAuth(ctx context.Context, accountName, accountKey, storageEndpointSuffix string, accountOptions *azure.AccountOptions, secrets map[string]string, secretName, secretNamespace string) (string, []string, error) {
var authAzcopyEnv []string
useSasToken := false
if len(secrets) == 0 && len(secretName) == 0 {
if !d.useDataPlaneAPI("", accountName) && len(secrets) == 0 && len(secretName) == 0 {
var err error
authAzcopyEnv, err = d.authorizeAzcopyWithIdentity()
if err != nil {
Expand Down
Loading