Skip to content

ci: component-scoped e2e testing on kind for Renovate PRs - #35

Draft
jdaln wants to merge 7 commits into
mainfrom
ci/component-e2e-kind
Draft

ci: component-scoped e2e testing on kind for Renovate PRs#35
jdaln wants to merge 7 commits into
mainfrom
ci/component-e2e-kind

Conversation

@jdaln

@jdaln jdaln commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What

When Renovate bumps a cluster component (exareme2, mip-stack, ECK, haproxy ingress, datacatalog), the PR now deploys that component on an ephemeral kind cluster through Argo CD at the PR's revision and asserts service-level health before merge.

How

  • changes job maps the diff to profiles (scripts/e2e/changed-profiles.sh); a dynamic matrix runs only the requested profiles, each on its own runner.
  • Every profile installs the HA Argo CD overlay (shared bring-up extracted into scripts/e2e/lib.sh, reused by the existing smoke test), then applies the component's production Application manifests with targetRevision: main rewritten to the PR head SHA at runtime (structured yq edit, conditioned on the mip-infra repoURL, with check_zero assertions). Committed files keep main, so check-main-revisions is untouched.
  • Checks assert content, not just status codes: exareme2 /healthcheck + non-empty /algorithms, ES cluster green via CRD status and API, haproxy routing an echo backend's body through the production Service (which holds the real VIP via a MetalLB /32 shim), datacatalog actuator UP.
  • Kind shims under tests/e2e/: StorageClass aliases for the CephFS classes, MetalLB pool-no-auto, cert-manager (ACME never load-bearing via a CI-only health override), non-interactive secrets.
  • Submariner and federation-Z overrides get render-only checks (a single kind cluster can't form an IPsec mesh / reach the hybrid cluster).

Docs: docs/testing.md rewritten.

Validation

This PR touches scripts/e2e/**, which maps to all profiles — the checks on this PR are the pipeline's own end-to-end validation. Expect first-run findings (e.g. the exact mip-stack backend endpoint is asserted loosely until confirmed here).

Local: git push && PROFILE=exareme2 KEEP=1 bash scripts/e2e/run-e2e.sh

jdaln added 7 commits July 23, 2026 19:54
Behavior-preserving: kind-argo-test.sh keeps its assertions and CLI
contract (CLUSTER/KEEP); cluster creation, overlay install, rollout
waits and AppProject apply move to the shared lib so the component
e2e runner can reuse them.
Profiles (exareme2, mip-stack, eck, haproxy, datacatalog) deploy the
changed component through Argo CD at the PR head SHA and assert
service-level health (Synced/Healthy, rollouts, in-cluster curl with
content assertions). Committed manifests keep targetRevision: main;
the runner rewrites them at runtime with check_zero-style assertions.

tests/e2e holds the CI-only shims: StorageClass aliases for the CephFS
classes, a /32 MetalLB pool carrying the production VIP, a federation-A
overlay (drops the sample exareme2-overlay app, downgrades RWX claims
to RWO, disables keycloak/public ingress) and shrunk ECK values.
changes job maps the diff to profiles (scripts/e2e/changed-profiles.sh,
kept in sync with the workflow paths and renovate managerFilePatterns);
one matrix job per profile on kind; render-only job for submariner and
the hybrid federation overrides. Renovate manages the cert-manager /
MetalLB pins in the e2e scripts via an annotation manager.
teardown_cluster captured $? after the trap's rm -rf, turning any
e2e failure into exit 0. It now takes the exit code explicitly.
- changed-profiles.sh fails closed when the base ref is unresolvable
  (was: silent all-false mapping -> green check testing nothing)
- ClusterIssuer health neutralized via CI-only argocd-cm override so
  Let's Encrypt account registration can never gate the haproxy profile
- projects/templates/** now triggers the mip-stack profile (the
  federation AppProject chart was fully untested)
- kind-argo-smoke paths include scripts/e2e/lib.sh (the smoke test's
  own bring-up code was no longer covered by its trigger)
- ensure_probe recreates a Completed probe pod from a prior KEEP=1 run
- wait_app tolerates 3 min of ComparisonError (cold chart-repo clone)
  before failing fast
- ci-secrets generates passwords outside the heredocs so a generator
  failure aborts instead of applying empty secrets
- revision rewrite is now a structured yq edit conditioned on the
  mip-infra repoURL instead of an unconditional sed over rendered YAML
- eck profile overlays the production eck-stack Application (values-only
  patch) instead of maintaining a forked copy
- workflow: dynamic matrix from the changes job (no idle runners),
  kind-action gets the 4-node config directly (no create-then-recreate),
  dispatch concurrency keyed by profile, e2e timeout 50m
- mip-stack: the upstream chart's 'default true $ingress.enabled'
  swallows enabled:false (sprig treats false as empty), so the Ingress
  deployed anyway and, with no controller in the profile, pinned the
  app at Progressing for the full 900s. Gate via global.publicHost=''
  (the chart's other, reliable condition), like the datacatalog overlay.
- haproxy: the production configmap enforces ssl-redirect on :80, so
  the content assertion got 30x with an empty body. Assert the redirect
  itself on :80, then assert the echo body over https (-k, self-signed
  default cert); the unknown-Host negative check moves to https too.
- eck: a 1-node ES is legitimately yellow once Kibana creates a
  replica-carrying index (the CR briefly said green, the API said
  yellow). Accept green/yellow and add a document write + search as
  the actual service-level assertion.

exareme2 and datacatalog passed unchanged on the first run.
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