From a63efedfbfb1817522480988a154027ab8f59f52 Mon Sep 17 00:00:00 2001 From: Ali Date: Mon, 13 Apr 2026 06:47:15 +0500 Subject: [PATCH] fix: prevent Chain and Result installation on lite profile The lite profile should only install TektonPipelines, but the reconciler was creating TektonChain and TektonResult CRs because their conditions only checked .Spec.Chain.Disabled (default: false) without also checking the profile. This follows the same pattern already used for TektonTrigger, which correctly gates on both the disabled flag AND the profile: if !tc.Spec.Trigger.Disabled && (tc.Spec.Profile == ProfileAll || tc.Spec.Profile == ProfileBasic) Apply the same profile check to Chain and Result so they are only created for the "all" and "basic" profiles. Fixes #2781 ```release-note NONE ``` --- pkg/reconciler/shared/tektonconfig/tektonconfig.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/reconciler/shared/tektonconfig/tektonconfig.go b/pkg/reconciler/shared/tektonconfig/tektonconfig.go index 4189669c99..70a9a88575 100644 --- a/pkg/reconciler/shared/tektonconfig/tektonconfig.go +++ b/pkg/reconciler/shared/tektonconfig/tektonconfig.go @@ -280,7 +280,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, tc *v1alpha1.TektonConfi } // Ensure Chain CR - if !tc.Spec.Chain.Disabled { + if !tc.Spec.Chain.Disabled && (tc.Spec.Profile == v1alpha1.ProfileAll || tc.Spec.Profile == v1alpha1.ProfileBasic) { tektonchain := chain.GetTektonChainCR(tc, r.operatorVersion) logger.Debug("Ensuring TektonChain CR exists") if _, err := chain.EnsureTektonChainExists(ctx, r.operatorClientSet.OperatorV1alpha1().TektonChains(), tektonchain); err != nil { @@ -302,7 +302,7 @@ func (r *Reconciler) ReconcileKind(ctx context.Context, tc *v1alpha1.TektonConfi } // Ensure Result CR - if !tc.Spec.Result.Disabled { + if !tc.Spec.Result.Disabled && (tc.Spec.Profile == v1alpha1.ProfileAll || tc.Spec.Profile == v1alpha1.ProfileBasic) { tektonresult := result.GetTektonResultCR(tc, r.operatorVersion) if platformData := r.extension.GetPlatformData(); platformData != "" { if tektonresult.Annotations == nil {