Skip to content

Commit 86e4378

Browse files
devantlerclaude
andauthored
fix(storage): let the vulnerability scanner use the V2 migration worker (#6578)
* fix(storage): let the vulnerability scanner use the V2 migration worker The temporary placement pinned kubevuln to prod-worker-1. Its autoscaled memory request (~1 GB) no longer fits there, so the scanner has been Pending since 2026-11-24T01:30Z and no new images are scanned. Allow worker 1 or the V2 migration worker, as the security-progress collector in the same rollout already does. Part of #6424 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(storage): pin the scanner's two-host temporary placement The rendered-placement regression required the old worker-1 hostname selector. Require the exact worker-1-or-V2 node affinity while the runtime-headroom component is selected, none without it, and no hostname selector in either case. Part of #6424 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 82cae35 commit 86e4378

3 files changed

Lines changed: 25 additions & 4 deletions

File tree

‎k8s/bases/components/longhorn-v1-runtime-headroom/README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ NoSchedule toleration. The policy-reporting UI uses workers 1 and 2 or the V2
88
migration worker through its production patch. Its three eligible hosts allow
99
two replicas and a rolling surge to remain on separate nodes. Kustomize's two controllers
1010
use worker 1 or the migration workers; the Coroot security-progress collector
11-
uses worker 1 or the V2 migration worker.
11+
and the vulnerability scanner use worker 1 or the V2 migration worker. The
12+
scanner's memory request follows its autoscaler recommendation, so a single
13+
eligible host can leave it unschedulable once that host fills up.
1214
CSI and Reloader require separate hosts across revisions so their rolling surges
1315
cannot concentrate controller requests. Their replicas, resource requests,
1416
disruption budgets, security settings and other spreading rules remain

‎k8s/bases/components/longhorn-v1-runtime-headroom/kustomization.yaml‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,18 @@ patches:
1717
spec:
1818
values:
1919
kubevuln:
20-
nodeSelector:
21-
kubernetes.io/hostname: prod-worker-1
20+
affinity:
21+
nodeAffinity:
22+
requiredDuringSchedulingIgnoredDuringExecution:
23+
nodeSelectorTerms:
24+
- matchExpressions:
25+
- key: kubernetes.io/hostname
26+
operator: In
27+
values: [prod-worker-1]
28+
- matchExpressions:
29+
- key: storage.platform.devantler.tech/migration-pool
30+
operator: In
31+
values: [v2]
2232
- target:
2333
group: helm.toolkit.fluxcd.io
2434
version: v2

‎scripts/tests/test-ksail-operator-rendered-placement.sh‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,18 @@ assert_workload_headroom() {
5050
workload("Deployment";"observability";"crossplane-sync-exporter") as $exporter |
5151
workload("HelmRelease";"policy-reporter";"policy-reporter") as $reporter |
5252
$kubescape.spec.values.kubevuln.nodeSelector["kubernetes.io/hostname"] as $scannerHost |
53+
$kubescape.spec.values.kubevuln.affinity as $scannerAffinity |
5354
$exporter.spec.template.spec.nodeSelector["kubernetes.io/hostname"] as $exporterHost |
5455
$reporter.spec.values.ui.affinity.nodeAffinity as $reporterAffinity |
55-
($scannerHost == (if $scanner_enabled then "prod-worker-1" else null end)) and
56+
$scannerHost == null and
57+
(if $scanner_enabled then
58+
$scannerAffinity ==
59+
{nodeAffinity:{requiredDuringSchedulingIgnoredDuringExecution:{nodeSelectorTerms:
60+
[{matchExpressions:[{key:"kubernetes.io/hostname",operator:"In",values:["prod-worker-1"]}]},
61+
{matchExpressions:[{key:"storage.platform.devantler.tech/migration-pool",operator:"In",values:["v2"]}]}]}}}
62+
else
63+
$scannerAffinity == null
64+
end) and
5665
(if $enabled then
5766
$exporterHost == "prod-worker-1" and $exporter.spec.strategy.type == "Recreate" and
5867
$reporterAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms ==

0 commit comments

Comments
 (0)