Skip to content

Commit 611ce30

Browse files
author
Jonathan S. Katz
committed
Use proper bootstrap template for debug output
This also moves the debugging line before the actual template execution to make it possible to more easily debug any issues if the template were customized.
1 parent 52b578e commit 611ce30

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

internal/operator/cluster/clusterlogic.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,16 @@ func addClusterBootstrapJob(clientset kubeapi.Interface,
9797
return err
9898
}
9999

100+
if operator.CRUNCHY_DEBUG {
101+
_ = config.BootstrapTemplate.Execute(os.Stdout, bootstrapFields)
102+
}
103+
100104
var bootstrapSpec bytes.Buffer
105+
101106
if err := config.BootstrapTemplate.Execute(&bootstrapSpec, bootstrapFields); err != nil {
102107
return err
103108
}
104109

105-
if operator.CRUNCHY_DEBUG {
106-
config.DeploymentTemplate.Execute(os.Stdout, bootstrapFields)
107-
}
108-
109110
job := &batchv1.Job{}
110111
if err := json.Unmarshal(bootstrapSpec.Bytes(), job); err != nil {
111112
return err

0 commit comments

Comments
 (0)