🤖 Generated by the Daily AI Assistant
Problem. The drain-autoscale-node-storage ClusterPolicy (the mutate-existing retrofit half split out in #2378) has never produced a single UpdateRequest. Live evidence, 2026-07-02 ~22:10Z (~28h after admission, policy Ready since 17:56Z):
- All 4 pre-existing
autoscale-cx33-* Longhorn Node CRs still have spec.allowScheduling: true (the policy should set false + evictionRequested: true).
kubectl get updaterequests -A → 0.
- 24h of kyverno-background-controller logs contain zero lines for this policy, while
propagate-reloader-to-flagger-primary (also mutate-existing) logs "successfully created UR on policy update" for its targets every hour on the controller resync.
Root cause. The rule's match — which doubles as the trigger enumeration for mutateExistingOnPolicyUpdate and the hourly background resync — carries operations: [CREATE]. Existing resources enumerated in background context never satisfy a CREATE-only filter, so the retrofit selects nothing, ever. The in-file comment claiming the hourly background scan runs "regardless of triggers" is empirically wrong (see log comparison above). The filterless propagate-reloader-to-flagger-primary match is the proven working pattern.
Impact. The 2026-06-30 FinOps goal is silently unmet: Longhorn replicas stay schedulable on the 4 autoscale nodes, which keeps them CA-unremovable (cluster stuck at 10 nodes; see #2360 aftermath) — ongoing cost.
Proposed direction. Drop the operations: filter from the match (mirror propagate-reloader). Node-CR churn then re-enqueues URs, but the patch is an idempotent 2-field re-assert — same trade the reloader policy already makes cluster-wide. Rough size: XS (one manifest + comment).
Problem. The
drain-autoscale-node-storageClusterPolicy (the mutate-existing retrofit half split out in #2378) has never produced a single UpdateRequest. Live evidence, 2026-07-02 ~22:10Z (~28h after admission, policy Ready since 17:56Z):autoscale-cx33-*Longhorn Node CRs still havespec.allowScheduling: true(the policy should setfalse+evictionRequested: true).kubectl get updaterequests -A→ 0.propagate-reloader-to-flagger-primary(also mutate-existing) logs "successfully created UR on policy update" for its targets every hour on the controller resync.Root cause. The rule's match — which doubles as the trigger enumeration for
mutateExistingOnPolicyUpdateand the hourly background resync — carriesoperations: [CREATE]. Existing resources enumerated in background context never satisfy a CREATE-only filter, so the retrofit selects nothing, ever. The in-file comment claiming the hourly background scan runs "regardless of triggers" is empirically wrong (see log comparison above). The filterlesspropagate-reloader-to-flagger-primarymatch is the proven working pattern.Impact. The 2026-06-30 FinOps goal is silently unmet: Longhorn replicas stay schedulable on the 4 autoscale nodes, which keeps them CA-unremovable (cluster stuck at 10 nodes; see #2360 aftermath) — ongoing cost.
Proposed direction. Drop the
operations:filter from the match (mirror propagate-reloader). Node-CR churn then re-enqueues URs, but the patch is an idempotent 2-field re-assert — same trade the reloader policy already makes cluster-wide. Rough size: XS (one manifest + comment).