Skip to content

Commit

Permalink
[OpenShift] removes obsolete installerSets created for Addon during U…
Browse files Browse the repository at this point in the history
…pgrade

Signed-off-by: Shivam Mukhade <smukhade@redhat.com>
  • Loading branch information
Shivam Mukhade committed Jan 27, 2022
1 parent 9597954 commit 4a79279
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/reconciler/openshift/tektonaddon/tektonaddon.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, ta *v1alpha1.TektonAddon
// Pass the object through defaulting
ta.SetDefaults(ctx)

if err := tektoninstallerset.CleanUpObsoleteResources(ctx, r.operatorClientSet, CreatedByValue); err != nil {
return err
}

// validate the params
ptVal, _ := findValue(ta.Spec.Params, v1alpha1.PipelineTemplatesParam)
ctVal, _ := findValue(ta.Spec.Params, v1alpha1.ClusterTasksParam)
Expand Down

0 comments on commit 4a79279

Please sign in to comment.