Contributing¶
Issues and pull requests are welcome at github.com/codenio/kubectl-audit/issues.
Development setup¶
Requirements: Go 1.21+, make, a working Kubernetes cluster context.
git clone https://github.com/codenio/kubectl-audit.git
cd kubectl-audit
make bin # build bin/audit
make test # run tests + generate coverage profile
make fmt # format code
make vet # vet code
make install # install to ~/.krew/bin/kubectl-audit
Run without installing:
Before opening a PR¶
- [ ]
make testpasses - [ ]
make fmtandmake vetare clean (make binruns both) - [ ] Validated against a real cluster with
make install && kubectl audit …
Repository layout¶
| Path | Purpose |
|---|---|
cmd/plugin/ |
Entrypoint and CLI (Cobra, config flags, printing) |
pkg/plugin/ |
Audit logic, container list/table data, server-side table handling |
deploy/krew/plugin.yaml |
Krew manifest template for releases |
examples/audit-*/ |
Demo manifests per audit type |
docs/ |
MkDocs documentation source |
Releasing¶
Releases are automated via GitHub Actions on v*.*.* tags. See .github/workflows/release.yml.
Bumping Kubernetes dependencies¶
Reporting bugs¶
Please include:
- Plugin version (binary or release tag)
kubectl versionoutput- Exact command and full error message
- Kubernetes distribution and version (EKS, GKE, k3s, etc.)
Open an issue: github.com/codenio/kubectl-audit/issues/new