dns scripts: add --existing-n offset and on-disk manifest#69
Merged
Conversation
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.
OliverMKing
reviewed
May 7, 2026
jaiveerk
requested changes
May 7, 2026
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).
jaiveerk
approved these changes
May 7, 2026
2 tasks
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.
Summary
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.mktempfile under/tmp(path printed by the script) and applied with onekubectl 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/tmpis OS-managed.dns-test=true); no manifest-file handoff between setup and cleanup.Test plan
scripts/setup/dns-ingresses.sh --namespace server --count 5and verify 5 ingresses created (kubectl get ingress -n server -l dns-test=true); script logs the temp manifest path.--existing-n 5 --count 5and verify indices 6–10 created with no collisions.scripts/cleanup/dns-ingresses.sh --namespace serverand verify ingresses gone.test-dns-resourcesmatrix job (validate.yaml) passes.