Просмотр исходного кода

Add service key name if the config is missing.

Matt Bolt 1 год назад
Родитель
Сommit
34fa5b1abe
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      pkg/cloud/provider/providerconfig.go

+ 6 - 0
pkg/cloud/provider/providerconfig.go

@@ -77,6 +77,12 @@ func (pc *ProviderConfig) onConfigFileUpdated(changeType config.ChangeType, data
 		if pc.customPricing.ShareTenancyCosts == "" {
 			pc.customPricing.ShareTenancyCosts = models.DefaultShareTenancyCost
 		}
+
+		// If the sample nil service key name is set, zero it out so that it is not
+		// misinterpreted as a real service key.
+		if pc.customPricing.ServiceKeyName == "AKIXXX" {
+			pc.customPricing.ServiceKeyName = ""
+		}
 	}
 }