Explorar el Código

Add service key name if the config is missing.

Matt Bolt hace 1 año
padre
commit
34fa5b1abe
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  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 = ""
+		}
 	}
 }