Merge pull request #2384 from polivbr/fix-azure-private-dns

[azure] remove dummy MSI_ENDPOINT
This commit is contained in:
Kubernetes Prow Robot 2021-11-17 07:33:54 -08:00 committed by GitHub
commit 13951ff91e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,6 @@ package azure
import (
"fmt"
"io/ioutil"
"os"
"strings"
"github.com/Azure/go-autorest/autorest/adal"
@ -104,10 +103,6 @@ func getAccessToken(cfg config, environment azure.Environment) (*adal.ServicePri
// Try to retrieve token with MSI.
if cfg.UseManagedIdentityExtension {
log.Info("Using managed identity extension to retrieve access token for Azure API.")
os.Setenv("MSI_ENDPOINT", "http://dummy")
defer func() {
os.Unsetenv("MSI_ENDPOINT")
}()
if cfg.UserAssignedIdentityID != "" {
log.Infof("Resolving to user assigned identity, client id is %s.", cfg.UserAssignedIdentityID)