This commit is contained in:
Jonathan Chang 2024-06-17 14:52:02 -07:00
Родитель 6a775b25fd
Коммит 32fbfb909b
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -9,6 +9,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
configclient "github.com/openshift/client-go/config/clientset/versioned"
@ -153,6 +154,10 @@ func New(ctx context.Context, log *logrus.Entry, _env env.Interface, db database
}
fpCredRPTenant, err := _env.FPNewClientCertificateCredential(_env.TenantID())
options := _env.Environment().EnvironmentCredentialOptions()
spTokenCredential, err := azidentity.NewEnvironmentCredential(options)
if err != nil {
return nil, err
}
@ -264,7 +269,7 @@ func New(ctx context.Context, log *logrus.Entry, _env env.Interface, db database
rpPrivateLinkServices: network.NewPrivateLinkServicesClient(_env.Environment(), _env.SubscriptionID(), msiAuthorizer),
armRPPrivateLinkServices: armRPPrivateLinkServices,
dns: dns.NewManager(_env, localFPAuthorizer),
dns: dns.NewManager(_env, spTokenCredential),
storage: storage,
subnet: subnet.NewManager(_env.Environment(), r.SubscriptionID, fpAuthorizer),
graph: graph.NewManager(_env, log, aead, storage),