Skip to content

Commit

Permalink
refactor: remove resources after theyve completed reconciling
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Jan 24, 2024
1 parent 1e3a9db commit c90cab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/v1beta1/build_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ func (r *LagoonBuildReconciler) Reconcile(ctx context.Context, req ctrl.Request)
// with the introduction of v1beta2, this will let any existing pending/qeued/running builds continue through
// but once the build is completed or failed and has processed anything else it needs to do, it should delete the resource
if _, ok := lagoonBuild.Labels["lagoon.sh/buildStatus"]; ok {
if !helpers.ContainsString(
lagoonv1beta1.BuildRunningPendingStatus,
if helpers.ContainsString(
lagoonv1beta1.BuildCompletedCancelledFailedStatus,
lagoonBuild.Labels["lagoon.sh/buildStatus"],
) {
opLog.Info(fmt.Sprintf("%s found in namespace %s is no longer required, removing it. v1beta1 is deprecated in favor of v1beta2",
Expand Down

0 comments on commit c90cab8

Please sign in to comment.