diff --git a/log/log.go b/log/log.go index 2871812c..d2639f18 100644 --- a/log/log.go +++ b/log/log.go @@ -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...) +} diff --git a/pki/services.go b/pki/services.go index cc052fbe..8542f96e 100644 --- a/pki/services.go +++ b/pki/services.go @@ -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