Skip to content

Commit

Permalink
Merge pull request #19 from avoltz/echairez/ee-workload-identity
Browse files Browse the repository at this point in the history
temporary patch for workload identity + cloud config as secret
  • Loading branch information
chaireze authored Jun 23, 2023
2 parents ad0a9b4 + f5334c0 commit af783fd
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/blob/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,17 @@ func getCloudProvider(kubeconfig, nodeID, secretName, secretNamespace, userAgent
if err != nil {
klog.V(2).Infof("InitializeCloudFromSecret: failed to get cloud config from secret %s/%s: %v", az.SecretNamespace, az.SecretName, err)
}

if tenantID := os.Getenv("AZURE_TENANT_ID"); tenantID != "" {
config.TenantID = tenantID
}
if clientID := os.Getenv("AZURE_CLIENT_ID"); clientID != "" {
config.AADClientID = clientID
}
if federatedTokenFile := os.Getenv("AZURE_FEDERATED_TOKEN_FILE"); federatedTokenFile != "" {
config.AADFederatedTokenFile = federatedTokenFile
config.UseFederatedWorkloadIdentityExtension = true
}
}

if config == nil {
Expand Down

0 comments on commit af783fd

Please sign in to comment.