@@ -37,33 +37,22 @@ const (
3737)
3838
3939// azureCloudConfig is the configuration passed to Cloud Provider Azure.
40- // The specification is described in https://kubernetes-sigs.github.io/cloud-provider-azure/install/configs/.
40+ // The specification is described in https://cloud-provider-azure.sigs.k8s.io/install/configs/.
41+ // Field order follows the upstream documentation: auth configs first, then cluster config.
4142type azureCloudConfig struct {
42- // SubscriptionID is the ID of the Azure Subscription that the cluster is deployed in.
43- SubscriptionID string `json:"subscriptionId,omitempty"`
44- // TenantID is the ID of the tenant that the cluster is deployed in.
45- TenantID string `json:"tenantId"`
46- // CloudConfigType is the cloud configure type for Azure cloud provider. Supported values are file, secret and merge.
47- CloudConfigType string `json:"cloudConfigType,omitempty"`
48- // VMType is the type of azure nodes.
49- VMType string `json:"vmType,omitempty" yaml:"vmType,omitempty"`
50- // ResourceGroup is the name of the resource group that the cluster is deployed in.
51- ResourceGroup string `json:"resourceGroup,omitempty"`
52- // Location is the location of the resource group that the cluster is deployed in.
53- Location string `json:"location,omitempty"`
54- // RouteTableName is the name of the route table attached to the subnet that the cluster is deployed in.
55- RouteTableName string `json:"routeTableName,omitempty"`
56- // VnetName is the name of the virtual network that the cluster is deployed in.
57- VnetName string `json:"vnetName"`
58-
59- // UseInstanceMetadata specifies where instance metadata service is used where possible.
60- UseInstanceMetadata bool `json:"useInstanceMetadata,omitempty"`
61- // UseManagedIdentityExtension specifies where managed service
62- // identity is used for the virtual machine to access Azure
63- // ARM APIs.
64- UseManagedIdentityExtension bool `json:"useManagedIdentityExtension,omitempty"`
65- // DisableAvailabilitySetNodes disables VMAS nodes support.
66- DisableAvailabilitySetNodes bool `json:"disableAvailabilitySetNodes,omitempty"`
43+ // Auth configs
44+ TenantID string `json:"tenantId,omitempty"`
45+ SubscriptionID string `json:"subscriptionId,omitempty"`
46+ UseManagedIdentityExtension bool `json:"useManagedIdentityExtension,omitempty"`
47+
48+ // Cluster config
49+ ResourceGroup string `json:"resourceGroup,omitempty"`
50+ Location string `json:"location,omitempty"`
51+ VnetName string `json:"vnetName,omitempty"`
52+ SubnetName string `json:"subnetName,omitempty"`
53+ SecurityGroupName string `json:"securityGroupName,omitempty"`
54+ UseInstanceMetadata bool `json:"useInstanceMetadata,omitempty"`
55+ DisableAvailabilitySetNodes bool `json:"disableAvailabilitySetNodes,omitempty"`
6756}
6857
6958// CloudConfigBuilder creates the cloud configuration file
@@ -130,17 +119,17 @@ func (b *CloudConfigBuilder) build(c *fi.NodeupModelBuilderContext, inTree bool)
130119 }
131120
132121 c := & azureCloudConfig {
133- CloudConfigType : "file" ,
134- SubscriptionID : b .NodeupConfig .AzureSubscriptionID ,
122+ // Auth
135123 TenantID : b .NodeupConfig .AzureTenantID ,
136- Location : b .NodeupConfig .AzureLocation ,
137- VMType : "vmss" ,
124+ SubscriptionID : b .NodeupConfig .AzureSubscriptionID ,
125+ UseManagedIdentityExtension : true ,
126+ // Cluster
138127 ResourceGroup : b .NodeupConfig .AzureResourceGroup ,
139- RouteTableName : b .NodeupConfig .AzureRouteTableName ,
128+ Location : b .NodeupConfig .AzureLocation ,
140129 VnetName : vnetName ,
130+ SubnetName : b .NodeupConfig .AzureSubnetName ,
131+ SecurityGroupName : b .NodeupConfig .AzureSecurityGroupName ,
141132 UseInstanceMetadata : true ,
142- UseManagedIdentityExtension : true ,
143- // Disable availability set nodes as we currently use VMSS.
144133 DisableAvailabilitySetNodes : true ,
145134 }
146135 data , err := json .Marshal (c )
0 commit comments