Skip to content

Commit

Permalink
Update reconcile->finish naming, inline with create and start
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-groux-hs authored and yorugac committed Feb 11, 2022
1 parent 350ca49 commit 46fb8e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion controllers/k6_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (r *K6Reconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) {
case "created":
return StartJobs(ctx, log, k6, r)
case "started":
return ReconcileJobs(ctx, log, k6, r)
return FinishJobs(ctx, log, k6, r)
case "finished":
// delete if configured
if k6.Spec.Cleanup == "post" {
Expand Down
4 changes: 2 additions & 2 deletions controllers/k6_reconcile.go → controllers/k6_finish.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
)

// Reconcile k6 status with job status
func ReconcileJobs(ctx context.Context, log logr.Logger, k6 *v1alpha1.K6, r *K6Reconciler) (ctrl.Result, error) {
// Mark k6 as finished as jobs finish
func FinishJobs(ctx context.Context, log logr.Logger, k6 *v1alpha1.K6, r *K6Reconciler) (ctrl.Result, error) {
selector := labels.SelectorFromSet(map[string]string{
"app": "k6",
"k6_cr": k6.Name,
Expand Down

0 comments on commit 46fb8e3

Please sign in to comment.