1
0
mirror of https://github.com/rancher/rke.git synced 2025-04-28 03:31:24 +00:00

Drop the log level to Debug since rancher can call this everytime worker connects back every ~2 mins

This commit is contained in:
Prachi Damle 2020-01-15 16:29:25 -08:00
parent 38f9b2902e
commit d56f641cdd
2 changed files with 7 additions and 2 deletions

View File

@ -13,6 +13,7 @@ const (
) )
type logger interface { type logger interface {
Debugf(msg string, args ...interface{})
Infof(msg string, args ...interface{}) Infof(msg string, args ...interface{})
Warnf(msg string, args ...interface{}) Warnf(msg string, args ...interface{})
} }
@ -37,3 +38,7 @@ func Infof(ctx context.Context, msg string, args ...interface{}) {
func Warnf(ctx context.Context, msg string, args ...interface{}) { func Warnf(ctx context.Context, msg string, args ...interface{}) {
getLogger(ctx).Warnf(msg, args...) getLogger(ctx).Warnf(msg, args...)
} }
func Debugf(ctx context.Context, msg string, args ...interface{}) {
getLogger(ctx).Debugf(msg, args...)
}

View File

@ -491,7 +491,7 @@ func GenerateKubeletCertificate(ctx context.Context, certs map[string]Certificat
if caCrt == nil || caKey == nil { if caCrt == nil || caKey == nil {
return fmt.Errorf("CA Certificate or Key is empty") return fmt.Errorf("CA Certificate or Key is empty")
} }
log.Infof(ctx, "[certificates] Generating Kubernetes Kubelet certificates") log.Debugf(ctx, "[certificates] Generating Kubernetes Kubelet certificates")
allHosts := hosts.NodesToHosts(rkeConfig.Nodes, "") allHosts := hosts.NodesToHosts(rkeConfig.Nodes, "")
for _, host := range allHosts { for _, host := range allHosts {
kubeletName := GetCrtNameForHost(host, KubeletCertName) kubeletName := GetCrtNameForHost(host, KubeletCertName)
@ -509,7 +509,7 @@ func GenerateKubeletCertificate(ctx context.Context, certs map[string]Certificat
if !rotate { if !rotate {
serviceKey = certs[kubeletName].Key serviceKey = certs[kubeletName].Key
} }
log.Infof(ctx, "[certificates] Generating %s certificate and key", kubeletName) log.Debugf(ctx, "[certificates] Generating %s certificate and key", kubeletName)
kubeletCrt, kubeletKey, err := GenerateSignedCertAndKey(caCrt, caKey, true, kubeletName, kubeletAltNames, serviceKey, nil) kubeletCrt, kubeletKey, err := GenerateSignedCertAndKey(caCrt, caKey, true, kubeletName, kubeletAltNames, serviceKey, nil)
if err != nil { if err != nil {
return err return err