Skip to content

dns scripts: add --existing-n offset and on-disk manifest#69

Merged
meecethereese merged 2 commits into
mainfrom
maufe/setup-traffic
May 7, 2026
Merged

dns scripts: add --existing-n offset and on-disk manifest#69
meecethereese merged 2 commits into
mainfrom
maufe/setup-traffic

Conversation

@meecethereese
Copy link
Copy Markdown
Contributor

@meecethereese meecethereese commented May 7, 2026

Summary

  • Setup scripts (dns-ingresses.sh, dns-httproutes.sh) accept a new --existing-n <N> flag (default 0) so additional batches can be appended without colliding with existing resource names.
  • Manifests are now written to a unique mktemp file under /tmp (path printed by the script) and applied with one kubectl apply --server-side -f, instead of being held in memory — avoids RAM blowup at large object counts. The temp file lives outside the repo, so the script is safe to run from any CWD, and /tmp is OS-managed.
  • Cleanup scripts delete by label selector (dns-test=true); no manifest-file handoff between setup and cleanup.

Test plan

  • Run scripts/setup/dns-ingresses.sh --namespace server --count 5 and verify 5 ingresses created (kubectl get ingress -n server -l dns-test=true); script logs the temp manifest path.
  • Re-run with --existing-n 5 --count 5 and verify indices 6–10 created with no collisions.
  • Run scripts/cleanup/dns-ingresses.sh --namespace server and verify ingresses gone.
  • Repeat for httproutes variants.
  • CI test-dns-resources matrix job (validate.yaml) passes.

Setup scripts now accept --existing-n <N> (default 0) so additional
batches can be appended without colliding with existing resource names.
Manifests are written to a single file on disk and applied in one
kubectl call instead of being held in memory, avoiding RAM blowup at
large counts. Cleanup scripts remove that local manifest file as part
of teardown.
@meecethereese meecethereese requested a review from a team as a code owner May 7, 2026 12:03
Comment thread scripts/cleanup/dns-ingresses.sh Outdated
Comment thread scripts/cleanup/dns-ingresses.sh Outdated
Decouples setup from caller CWD and removes the implicit cross-script
file handoff. The manifest file lives under /tmp and is OS-managed, so
cleanup no longer needs to know about it (deletion is label-driven).
Copy link
Copy Markdown
Contributor

@OliverMKing OliverMKing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@meecethereese meecethereese merged commit c13b991 into main May 7, 2026
17 checks passed
@meecethereese meecethereese mentioned this pull request May 7, 2026
2 tasks
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.

3 participants