From d687e73fd40d455868fc32fd904112b10e4cb6de Mon Sep 17 00:00:00 2001 From: Timofei Larkin Date: Mon, 26 Oct 2026 10:51:43 +0100 Subject: [PATCH] docs(lineage-webhook): cut the rationale from the verdict comment Comments carry the mechanism, not the reason the change was made; the reason is in the design doc and the PR. Assisted-by: LLM Signed-off-by: Timofei Larkin --- internal/lineagecontrollerwebhook/webhook.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/lineagecontrollerwebhook/webhook.go b/internal/lineagecontrollerwebhook/webhook.go index d2ef5f938..a98735da3 100644 --- a/internal/lineagecontrollerwebhook/webhook.go +++ b/internal/lineagecontrollerwebhook/webhook.go @@ -194,11 +194,9 @@ func (h *LineageControllerWebhook) computeLabels(ctx context.Context, obj *unstr resourceSelectors := h.getResourceSelectors(obj.GroupVersionKind().GroupKind(), crd) selected := matchResourceToExcludeInclude(ctx, obj.GetName(), templateLabels, obj.GetLabels(), resourceSelectors) - // The verdict can be narrowed by the object and never widened: a chart that - // renders tenantresource "false" keeps it even where the definition selects - // the name, while a chart-set "true" is replaced by the computed verdict. - // This is what lets a chart take a Secret the definition still selects off - // the tenantsecrets projection while the definition catches up. + // The object may narrow the verdict and never widen it: a rendered "false" + // is kept even where the definition selects the name, a rendered "true" is + // replaced by the computed verdict. if obj.GetLabels()[corev1alpha1.TenantResourceLabelKey] == "false" { selected = false }