|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thanks for helping improve `kubernetes-ontology`. |
| 4 | + |
| 5 | +The project is still early, so the best contributions are small, concrete, and |
| 6 | +easy to verify. Good examples: |
| 7 | + |
| 8 | +- New diagnostic graph fixtures for real Kubernetes failure modes. |
| 9 | +- Tests for graph edges, diagnostic budgets, degraded sources, or Helm evidence. |
| 10 | +- Documentation fixes that reduce setup steps or clarify the read-only safety model. |
| 11 | +- Bug reports with a minimal manifest, command, and observed output. |
| 12 | + |
| 13 | +## Development Setup |
| 14 | + |
| 15 | +Install Go, Helm, Python 3, and Docker if you want to run the full validation |
| 16 | +path. For normal Go changes: |
| 17 | + |
| 18 | +```bash |
| 19 | +make test |
| 20 | +``` |
| 21 | + |
| 22 | +For the repository CI checks: |
| 23 | + |
| 24 | +```bash |
| 25 | +make ci |
| 26 | +``` |
| 27 | + |
| 28 | +For kind-based end-to-end validation: |
| 29 | + |
| 30 | +```bash |
| 31 | +kind create cluster --name ko-e2e --config samples/kind-helm-storage-demo/kind-config.yaml |
| 32 | +docker build -t kubernetes-ontology:e2e . |
| 33 | +kind load docker-image kubernetes-ontology:e2e --name ko-e2e |
| 34 | +bash scripts/ci/verify_kind_e2e.sh |
| 35 | +kind delete cluster --name ko-e2e |
| 36 | +``` |
| 37 | + |
| 38 | +The kind test installs the sample Helm workload, deploys the current |
| 39 | +`kubernetes-ontology` chart, and verifies real CLI and viewer queries against the |
| 40 | +in-cluster daemon. |
| 41 | + |
| 42 | +## Pull Request Checklist |
| 43 | + |
| 44 | +- Keep the observed-cluster runtime read-only. |
| 45 | +- Add or update tests for changed graph semantics. |
| 46 | +- Update `AI_CONTRACT.md` or `schemas/diagnostic-subgraph.schema.json` when the |
| 47 | + diagnostic response contract changes. |
| 48 | +- Update README or Quickstart docs when user-facing commands change. |
| 49 | +- Run `make ci` before opening the PR when practical. |
| 50 | + |
| 51 | +## Design Notes |
| 52 | + |
| 53 | +Use the existing package boundaries: |
| 54 | + |
| 55 | +- `internal/collect/k8s` reads Kubernetes objects. |
| 56 | +- `internal/graph` builds and indexes graph facts. |
| 57 | +- `internal/reconcile` applies scoped graph updates. |
| 58 | +- `internal/query` and `internal/service/diagnostic` shape diagnostic responses. |
| 59 | +- `internal/server` exposes the read-only HTTP API. |
| 60 | + |
| 61 | +Prefer explicit graph semantics over clever inference. If an edge is inferred, |
| 62 | +include provenance that tells downstream agents how much to trust it. |
| 63 | + |
| 64 | +## Reporting Security Issues |
| 65 | + |
| 66 | +Do not file public issues for security vulnerabilities. Follow |
| 67 | +`SECURITY.md` instead. |
0 commit comments