Jelajahi Sumber

Add service key name if the config is missing.

Matt Bolt 1 tahun lalu
induk
melakukan
34fa5b1abe
1 mengubah file dengan 6 tambahan dan 0 penghapusan
  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 = ""
+		}
 	}
 }