Skip to content

Commit bb771cf

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 c780536 commit bb771cf

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
@@ -98,15 +98,16 @@ func addClusterBootstrapJob(clientset kubernetes.Interface, client *rest.RESTCli
9898
return err
9999
}
100100

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

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

0 commit comments

Comments
 (0)