Merge pull request #80033 from qingsenLi/k8s-190711

use klog.Error instead of klog.Errorf when had no format
This commit is contained in:
Kubernetes Prow Robot 2019-07-12 06:31:43 -07:00 committed by GitHub
commit eb4ff661a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -297,13 +297,13 @@ func setConfigFromSecret(cfg *Config) error {
if content, ok := secret.Data["clouds.conf"]; ok { if content, ok := secret.Data["clouds.conf"]; ok {
err = gcfg.ReadStringInto(cfg, string(content)) err = gcfg.ReadStringInto(cfg, string(content))
if err != nil { if err != nil {
klog.Errorf("Cannot parse data from the secret.") klog.Error("Cannot parse data from the secret.")
return fmt.Errorf("cannot parse data from the secret") return fmt.Errorf("cannot parse data from the secret")
} }
return nil return nil
} }
klog.Errorf("Cannot find \"clouds.conf\" key in the secret.") klog.Error("Cannot find \"clouds.conf\" key in the secret.")
return fmt.Errorf("cannot find \"clouds.conf\" key in the secret") return fmt.Errorf("cannot find \"clouds.conf\" key in the secret")
} }

View File

@ -698,7 +698,7 @@ func (lbaas *LbaasV2) EnsureLoadBalancer(ctx context.Context, clusterName string
internal := getStringFromServiceAnnotation(apiService, ServiceAnnotationLoadBalancerInternal, "false") internal := getStringFromServiceAnnotation(apiService, ServiceAnnotationLoadBalancerInternal, "false")
switch internal { switch internal {
case "true": case "true":
klog.V(4).Infof("Ensure an internal loadbalancer service.") klog.V(4).Info("Ensure an internal loadbalancer service.")
internalAnnotation = true internalAnnotation = true
case "false": case "false":
if len(floatingPool) != 0 { if len(floatingPool) != 0 {