Skip to content

fix(e2e-targets): keep karpenter from evicting test targets mid-scan - #112

Merged
mykhailo-bright merged 2 commits into
mainfrom
fix/e2e-targets-do-not-disrupt
Nov 24, 2026
Merged

mykhailo-bright merged 2 commits into
mainfrom
fix/e2e-targets-do-not-disrupt

Conversation

@mykhailo-bright

@mykhailo-bright mykhailo-bright commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Why

Karpenter consolidation (Evicted pod: Underutilized, consolidationPolicy: WhenEmptyOrUnderutilized in the default NodePool) moves single-replica e2e targets in distributor to another node while a test is running. The target is down until the new pod is ready and in-pod state (BC's postgres/keycloak, DVWA's DB) is reset. Scans miss findings or run until timeout, and the batch has to be rerun. See IR-835.

11-19..11-24: 129 consolidation evictions in distributor, 118 of them e2e targets. In the 4 nightly exploiter runs (11-20, 11-21, 11-23, 11-24) 23 of 62 failed tests had their target evicted mid-run. Example: 35348 on 11-21 lost its BC pod at 01:26:14 and 01:32:51 (savings: $0.04 each) and took 31 min instead of 8.

This PR applies the annotation to the 5 most affected SET targets as a proof, ahead of the namespace-wide fix in IR-835.

What

  • karpenter.sh/do-not-disrupt: "true" on the pod template of brokencrystals (0.1.71), dvwa (0.0.10), juiceshop (0.0.11), altoroj (0.0.6), beebox/bwapp (0.0.8).
  • simple-service 0.5.2: new value podAnnotations (default {}). Other charts are unchanged until they bump.
  • juiceshop, altoroj, beebox move to simple-service 0.5.2 and set the annotation there. altoroj and beebox were on vendored 0.3.0/0.0.1; remove those archives and Chart.lock, as juiceshop already does.

Verification

helm lint and helm template (v3.17.0) for all 5 charts. Rendered diff of beebox and altoroj vs main: the pod annotation, nginx.org/* ingress annotations instead of the ignored nginx.ingress.kubernetes.io/* ones, ingressClassName: nginx, and hostAliases target.local for beebox (already in every other simple-service chart).

Follow-up

After release, watch the next nightlies for target evictions and failures of tests on these 5 targets.

Karpenter consolidation ("Evicted pod: Underutilized") moves single-replica
e2e targets in the distributor namespace to another node while a test is
running. The target is down until the new pod is ready and its in-pod data
is reset, so scans miss findings or run until timeout and whole test
batches have to be rerun (IR-835).

Add the karpenter.sh/do-not-disrupt pod annotation to the targets of the
most affected SET tests: brokencrystals, dvwa, juiceshop, altoroj and
beebox (bwapp).

simple-service 0.5.2 gets two values: podAnnotations and
ingress.sslRedirect (default "False", unchanged for other charts).
juiceshop, altoroj and beebox move to it and set sslRedirect "True".
altoroj and beebox were on vendored simple-service 0.3.0/0.0.1 whose
ingress-nginx annotations F5 ignores, so they redirected http to https by
F5 default; juiceshop lost that redirect with 0.5.1. "True" keeps the
crawler on https, as for dvwa in #110. Drop the vendored dependency
archives and locks, as juiceshop already does.

IR-835
The previous commit assumed F5 NGINX redirects http to https by default
for these targets. The cluster config sets ssl-redirect "False"
globally (cluster-vulnerable-apps common/f5-nginx-ingress), so juiceshop,
altoroj and beebox serve plain http today and sslRedirect "True" would
have changed their behavior. Keep this change limited to the
karpenter.sh/do-not-disrupt annotation; http to https redirects for the
targets that need them go in a separate change.

IR-835
@mykhailo-bright
mykhailo-bright merged commit 63bc955 into main Nov 24, 2026
3 checks passed
@mykhailo-bright
mykhailo-bright deleted the fix/e2e-targets-do-not-disrupt branch November 24, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant