Azure / azure-cli

Azure Command-Line Interface
MIT License
3.99k stars 2.96k forks source link

Initialize Cloud Config reading from ARM metadata with API Version 2022-09-01 #25815

Open bganapa opened 1 year ago

bganapa commented 1 year ago

Related command az cloud register

Is your feature request related to a problem? Please describe. Azure Stack needs custom endpoints and many of the azure code bases have hard coded the values in various places depending on the cloud name. This will not work for disconnected custom clouds like Azure Stack as the endpoints are defined by the customer configurations.

We worked with ARM team to provide the custom dataplane endpoints through the ARM metadata with a newer api version 2022-09-01

Describe the solution you'd like CLI cloud config should read the ARM metadata with api version 2022-09-01 instead of the current 1.0 and expose them in CLI Context so that all the extensions could make use of it

Describe alternatives you've considered

Other alternatives are hardcoding the values, or making the ARM metadata request with api version 2022-09-01 in CLI extensions like connectedk8s, k8s-extensions, k8s-configuration etc..

Additional context Additional context is shared via internal mail.

The followign are the new fields added with api version 2022-09-01

"suffixes":{ "relayEndpointSuffix":"servicebus.azs.microsoft.com", ... }, dataplaneEndpoints":{ "arcConfigEndpoint":"https://edge.dp.kubernetesconfiguration.azs.microsoft.com/", "arcGlobalNotificationServiceEndpoint":"https://guestnotificationservice.azs.microsoft.com/", "arcHybridIdentityServiceEndpoint":"https://his.azs.microsoft.com/", "globalContainerRegistryEndpoint":"edgemcr.edgeacr.azs.microsoft.com", "arcGuestConfigEndpoint":"https://agentserviceapi.azs.microsoft.com/" },

yonzhan commented 1 year ago

@jiasli for awareness