1
0
mirror of https://github.com/rancher/rke.git synced 2025-04-27 11:21:08 +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 {
Debugf(msg string, args ...interface{})
Infof(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{}) {
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 {
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, "")
for _, host := range allHosts {
kubeletName := GetCrtNameForHost(host, KubeletCertName)
@ -509,7 +509,7 @@ func GenerateKubeletCertificate(ctx context.Context, certs map[string]Certificat
if !rotate {
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)
if err != nil {
return err