Contributing¶
The source is at github.com/ngpayyappilly/k8s-debug. Changes go
through pull requests to main.
Add or change a tool¶
- Add the package to the
apt-get installlist in theDockerfile(or, for a standalone binary, add a pinned, checksum-verified download step like the existing ones). - Add the command name to the
TOOLSlist inscripts/smoke-test.sh. - Document it: add a
## \toolname`section to the matching page underdocs/tools/`, with the package, the permissions it needs, and examples for Kubernetes situations. - Add it to the tables in
docs/index.md,docs/tools/index.mdand the banner inmotd.txtif it is important enough to advertise. - Run the checks (below) and open a PR.
The documentation check fails the build if a tool in the smoke test has no section, so docs cannot silently fall behind the image.
Run the checks locally¶
docker build -t k8s-debug:dev .
scripts/smoke-test.sh k8s-debug:dev # every tool exists and binaries run
scripts/check-docs.sh # every tool is documented
pip install -r docs/requirements.txt
mkdocs serve # live preview at http://127.0.0.1:8000
mkdocs build --strict # what CI runs; broken links fail
Pull requests also run hadolint, shellcheck and actionlint, and build and smoke-test the image on both
amd64 and arm64.
Writing documentation¶
- Say what the tool is for in Kubernetes terms before listing flags.
- Every example should be something you have run. State the permission it needs.
- Prefer tested facts over general knowledge. If behaviour depends on the cluster, runtime or kubectl version, say so.
- Use
ghcr.io/ngpayyappilly/k8s-debug:latestin examples, and placeholders such as<pod>for things the reader must replace.
Releases¶
Releases are cut by pushing a version tag:
git tag v1.2.3 && git push origin v1.2.3
The publish workflow builds both platforms and pushes 1.2.3, 1.2, 1 and latest. Pre-release tags such as
v1.3.0-rc.1 publish only that exact tag. Pushes to main publish edge and sha-<commit>.
The documentation site is rebuilt and deployed from main whenever docs/ or mkdocs.yml changes.
Extend the image for your own needs¶
If your platform needs tools that are not here (a JDK, py-spy, a database client), build on top:
FROM ghcr.io/ngpayyappilly/k8s-debug:1.2.3
RUN apt-get update \
&& apt-get install -y --no-install-recommends redis-tools postgresql-client \
&& rm -rf /var/lib/apt/lists/*
COPY team-aliases.sh /etc/team-aliases.sh
RUN echo '. /etc/team-aliases.sh' >> /root/.bashrc
Pin the base to an exact version so your image changes only when you choose.