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 <lllamnyp@gmail.com>
This commit is contained in:
Timofei Larkin committed 2026-11-12 13:56:16 +03:00
1 parent 7b214464ee
commit d687e73fd4
1 file changed
+3 -5
+3 -5
View File
@@ -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
}