Repository navigation
fix(e2e-targets): keep karpenter from evicting test targets mid-scan - #112
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Karpenter consolidation (
Evicted pod: Underutilized,consolidationPolicy: WhenEmptyOrUnderutilizedin thedefaultNodePool) moves single-replica e2e targets indistributorto 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.04each) 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 ofbrokencrystals(0.1.71),dvwa(0.0.10),juiceshop(0.0.11),altoroj(0.0.6),beebox/bwapp (0.0.8).simple-service0.5.2: new valuepodAnnotations(default{}). Other charts are unchanged until they bump.juiceshop,altoroj,beeboxmove tosimple-service0.5.2 and set the annotation there. altoroj and beebox were on vendored 0.3.0/0.0.1; remove those archives andChart.lock, as juiceshop already does.Verification
helm lintandhelm template(v3.17.0) for all 5 charts. Rendered diff of beebox and altoroj vsmain: the pod annotation,nginx.org/*ingress annotations instead of the ignorednginx.ingress.kubernetes.io/*ones,ingressClassName: nginx, andhostAliases target.localfor 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.