Skip to content

Commit

Permalink
add job controller
Browse files Browse the repository at this point in the history
  • Loading branch information
zreigz committed Apr 30, 2024
1 parent 4cc3821 commit f336df0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ func main() {
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "HealthConvert")
}
if err = (&controller.StackRunJobReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
ConsoleClient: ctrlMgr.GetClient(),
}).SetupWithManager(mgr); err != nil {
setupLog.Error(err, "unable to create controller", "controller", "StackRun")
}

//+kubebuilder:scaffold:builder

if err = (&controller.PipelineGateReconciler{
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/stackrunjob_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func getExitCodeStatus(exitCode int32) console.StackStatus {
}

func getStackRunID(job *batchv1.Job) string {
return strings.TrimPrefix("stack-", job.Name)
return strings.TrimPrefix(job.Name, "stack-")
}

// SetupWithManager sets up the controller with the Manager.
Expand Down

0 comments on commit f336df0

Please sign in to comment.