File tree Expand file tree Collapse file tree 4 files changed +5
-22
lines changed
pkg/utils/cloudconfig/azure Expand file tree Collapse file tree 4 files changed +5
-22
lines changed Original file line number Diff line number Diff line change @@ -88,10 +88,6 @@ func (cfg *CloudConfig) validate() error {
8888 return fmt .Errorf ("resource group is empty" )
8989 }
9090
91- if cfg .VnetName == "" {
92- return fmt .Errorf ("virtual network name is empty" )
93- }
94-
9591 if cfg .VnetResourceGroup == "" {
9692 cfg .VnetResourceGroup = cfg .ResourceGroup
9793 }
Original file line number Diff line number Diff line change @@ -133,22 +133,6 @@ func TestValidate(t *testing.T) {
133133 },
134134 wantPass : false ,
135135 },
136- "VnetName empty" : {
137- config : & CloudConfig {
138- ARMClientConfig : azclient.ARMClientConfig {
139- Cloud : "c" ,
140- },
141- AzureAuthConfig : azclient.AzureAuthConfig {
142- UseManagedIdentityExtension : true ,
143- UserAssignedIdentityID : "a" ,
144- },
145- Location : "l" ,
146- SubscriptionID : "s" ,
147- ResourceGroup : "v" ,
148- VnetName : "" ,
149- },
150- wantPass : false ,
151- },
152136 "VnetResourceGroup empty" : {
153137 config : & CloudConfig {
154138 ARMClientConfig : azclient.ARMClientConfig {
@@ -559,8 +543,9 @@ func TestNewCloudConfigFromFile(t *testing.T) {
559543 filePath : "./test/azure_valid_config.json" ,
560544 wantConfig : & CloudConfig {
561545 ARMClientConfig : azclient.ARMClientConfig {
562- Cloud : "AzurePublicCloud" ,
563- TenantID : "00000000-0000-0000-0000-000000000000" ,
546+ Cloud : "AzurePublicCloud" ,
547+ TenantID : "00000000-0000-0000-0000-000000000000" ,
548+ UserAgent : "fleet-member-agent" ,
564549 },
565550 AzureAuthConfig : azclient.AzureAuthConfig {
566551 UseManagedIdentityExtension : true ,
Original file line number Diff line number Diff line change 11{
22 "cloud" : " AzurePublicCloud" ,
3+ "userAgent" : " fleet-member-agent" ,
34 "tenantId" : " 00000000-0000-0000-0000-000000000000" ,
45 "subscriptionId" : " 00000000-0000-0000-0000-000000000000" ,
56 "useManagedIdentityExtension" : true ,
Original file line number Diff line number Diff line change 11config :
22 azureCloudConfig :
33 cloud : " AzurePublicCloud"
4+ userAgent : " fleet-member-agent"
45 tenantId : " 00000000-0000-0000-0000-000000000000"
56 subscriptionId : " 00000000-0000-0000-0000-000000000000"
67 useManagedIdentityExtension : true
You can’t perform that action at this time.
0 commit comments