Skip to content

Commit

Permalink
Add debug logging to kubeadm config
Browse files Browse the repository at this point in the history
  • Loading branch information
aojea committed Jun 21, 2019
1 parent 4642818 commit d198ca3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/cluster/internal/kubeadm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ package kubeadm
import (
"bytes"
"strings"
"text/template"
"text/template"
log "github.com/sirupsen/logrus"


"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/util/version"
Expand Down Expand Up @@ -440,6 +442,7 @@ metadata:
// Config returns a kubeadm config generated from config data, in particular
// the kubernetes version
func Config(data ConfigData) (config string, err error) {
log.Debugf("Configuration Input data: %v", data)
ver, err := version.ParseGeneric(data.KubernetesVersion)
if err != nil {
return "", err
Expand Down Expand Up @@ -468,6 +471,7 @@ func Config(data ConfigData) (config string, err error) {
err = t.Execute(&buff, data)
if err != nil {
return "", errors.Wrap(err, "error executing config template")
}
}
log.Debugf("Configuration generated:\n %v", buff.String())
return buff.String(), nil
}

0 comments on commit d198ca3

Please sign in to comment.