dir2config: more logs on cluster templates

This commit is contained in:
Mikaël Cluseau 2019-10-16 16:21:12 +11:00
parent 36e1367522
commit d27c4ed7a3

View File

@ -60,9 +60,12 @@ func renderClusterTemplates(cluster *clustersconfig.Cluster, setName string,
clusterAsMap["kubernetes_svc_ip"] = cluster.KubernetesSvcIP().String() clusterAsMap["kubernetes_svc_ip"] = cluster.KubernetesSvcIP().String()
clusterAsMap["dns_svc_ip"] = cluster.DNSSvcIP().String() clusterAsMap["dns_svc_ip"] = cluster.DNSSvcIP().String()
log.Print("rendering cluster templates with ", clusterAsMap)
buf := &bytes.Buffer{} buf := &bytes.Buffer{}
for _, t := range templates { for _, t := range templates {
log.Print("- template: ", setName, ": ", t.Name)
fmt.Fprintf(buf, "---\n# %s: %s\n", setName, t.Name) fmt.Fprintf(buf, "---\n# %s: %s\n", setName, t.Name)
err := t.Execute(buf, clusterAsMap, clusterFuncs(cluster)) err := t.Execute(buf, clusterAsMap, clusterFuncs(cluster))