Skip to content

Commit 13da6e6

Browse files
Colvin-Ycodex
andauthored
ci: Add community health files and kind e2e (#21)
Add GitHub community health files, keep Apache-2.0 license detection clean, and package security metadata in release archives. Add a kind-based end-to-end CI job that deploys the sample workload and verifies CLI plus viewer diagnostics against the in-cluster daemon. Co-authored-by: Codex <noreply@openai.com>
1 parent 1d48fdc commit 13da6e6

12 files changed

Lines changed: 440 additions & 19 deletions

File tree

.github/pull_request_template.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Summary
2+
3+
<!-- What changed and why? -->
4+
5+
## Validation
6+
7+
<!-- Paste the exact commands you ran, for example `make ci` or `bash scripts/ci/verify_kind_e2e.sh`. -->
8+
9+
## Safety Checklist
10+
11+
- [ ] This keeps observed Kubernetes resources read-only.
12+
- [ ] Graph or diagnostic contract changes are covered by tests.
13+
- [ ] User-facing command or install changes are documented.
14+
- [ ] Security-sensitive behavior is documented in `SECURITY.md` or the README.
15+
16+
## Notes For Reviewers
17+
18+
<!-- Anything risky, intentionally deferred, or worth reviewing first? -->

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,31 @@ jobs:
7272
python-version: "3.x"
7373

7474
- run: make ci-visualize
75+
76+
kind-e2e:
77+
name: Kind end-to-end
78+
runs-on: ubuntu-latest
79+
steps:
80+
- uses: actions/checkout@v6
81+
82+
- uses: actions/setup-go@v6
83+
with:
84+
go-version-file: go.mod
85+
cache-dependency-path: go.sum
86+
87+
- uses: azure/setup-helm@v4
88+
89+
- uses: helm/kind-action@v1
90+
with:
91+
cluster_name: ko-e2e
92+
config: samples/kind-helm-storage-demo/kind-config.yaml
93+
wait: 120s
94+
95+
- name: Build local image
96+
run: docker build -t kubernetes-ontology:e2e .
97+
98+
- name: Load image into kind
99+
run: kind load docker-image kubernetes-ontology:e2e --name ko-e2e
100+
101+
- name: Verify in-cluster diagnostics
102+
run: bash scripts/ci/verify_kind_e2e.sh

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
-ldflags="-s -w" \
5656
-o "${work}/${cmd}${ext}" "./cmd/${cmd}"
5757
done
58-
cp README.md README.zh-CN.md QUICKSTART.md CHANGELOG.md AI_CONTRACT.md LICENSE "${work}/"
58+
cp README.md README.zh-CN.md QUICKSTART.md CHANGELOG.md AI_CONTRACT.md LICENSE NOTICE SECURITY.md "${work}/"
5959
mkdir -p "${work}/docs"
6060
cp -R docs/assets "${work}/docs/"
6161
mkdir -p "${work}/local"

CODE_OF_CONDUCT.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Code of Conduct
2+
3+
This project is a place to build useful infrastructure together.
4+
5+
## Expected Behavior
6+
7+
- Be respectful and direct.
8+
- Assume good intent, but respond to impact.
9+
- Keep criticism specific to code, docs, design, or behavior.
10+
- Help new contributors find the smallest useful next step.
11+
- Respect private security reports and sensitive cluster data.
12+
13+
## Unacceptable Behavior
14+
15+
- Harassment, threats, or personal attacks.
16+
- Discriminatory language or behavior.
17+
- Publishing private credentials, kubeconfigs, cluster data, or personal
18+
information.
19+
- Derailing technical discussions with repeated off-topic comments.
20+
- Pressuring maintainers or contributors to bypass the project's read-only
21+
safety model.
22+
23+
## Enforcement
24+
25+
Maintainers may edit, hide, or remove comments; close issues; reject
26+
contributions; or block participants who violate this code.
27+
28+
If you see a problem, contact the maintainer privately when possible. For
29+
security-sensitive issues, follow `SECURITY.md`.

CONTRIBUTING.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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.

LICENSE

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
1-
Copyright 2026 Colvin-Y
2-
3-
Licensed under the Apache License, Version 2.0 (the "License");
4-
you may not use this file except in compliance with the License.
5-
You may obtain a copy of the License at
6-
7-
https://www.apache.org/licenses/LICENSE-2.0
8-
9-
Unless required by applicable law or agreed to in writing, software
10-
distributed under the License is distributed on an "AS IS" BASIS,
11-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
See the License for the specific language governing permissions and
13-
limitations under the License.
14-
151
Apache License
162
Version 2.0, January 2004
173
https://www.apache.org/licenses/

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ DAEMON_CONFIG_OVERRIDES = $(CLI_CONFIG_OVERRIDES) $(call make_arg,SERVER_ADDR,ad
4646
CLI_CONFIG_ARGS = $(if $(CONFIG),--config "$(CONFIG)" $(CLI_CONFIG_OVERRIDES),--kubeconfig "$(KUBECONFIG)" --cluster "$(CLUSTER)" --context-namespaces "$(CONTEXT_NAMESPACES)" --workload-resources "$(WORKLOAD_RESOURCES)" --controller-rules "$(CONTROLLER_RULES)" --bootstrap-timeout "$(BOOTSTRAP_TIMEOUT)")
4747
DAEMON_CONFIG_ARGS = $(if $(CONFIG),--config "$(CONFIG)" $(DAEMON_CONFIG_OVERRIDES),--kubeconfig "$(KUBECONFIG)" --cluster "$(CLUSTER)" --context-namespaces "$(CONTEXT_NAMESPACES)" --workload-resources "$(WORKLOAD_RESOURCES)" --controller-rules "$(CONTROLLER_RULES)" --addr "$(SERVER_ADDR)" --bootstrap-timeout "$(BOOTSTRAP_TIMEOUT)" --poll-interval "$(POLL_INTERVAL)")
4848

49-
.PHONY: build build-daemon build-viewer docker-build owl test verify ci ci-go ci-helm ci-binaries ci-client ci-visualize run serve status status-server list-entities-server get-entity-server list-relations-server neighbors-server expand-node-server collapse-node-graph observe-status diagnose-pod diagnose-workload diagnose-helm-release diagnose-pod-server diagnose-workload-server diagnose-helm-release-server visualize visualize-go visualize-check live-check verify-live require-kubeconfig require-entry
49+
.PHONY: build build-daemon build-viewer docker-build owl test verify ci ci-go ci-helm ci-binaries ci-client ci-visualize ci-kind-e2e run serve status status-server list-entities-server get-entity-server list-relations-server neighbors-server expand-node-server collapse-node-graph observe-status diagnose-pod diagnose-workload diagnose-helm-release diagnose-pod-server diagnose-workload-server diagnose-helm-release-server visualize visualize-go visualize-check live-check verify-live require-kubeconfig require-entry
5050

5151
build:
5252
mkdir -p bin
@@ -87,6 +87,9 @@ ci-client: build
8787
ci-visualize: build-viewer visualize-check
8888
bash scripts/ci/verify_viewer.sh
8989

90+
ci-kind-e2e:
91+
bash scripts/ci/verify_kind_e2e.sh
92+
9093
run: build
9194
$(BINARY) $(ARGS)
9295

NOTICE

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
kubernetes-ontology
2+
Copyright 2026 Colvin-Y
3+
4+
This product includes software developed by Colvin-Y.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,8 @@ archives, so marketplace pages should link to the live repository path:
641641
- [docs/design/README.md](docs/design/README.md): design document index
642642
- [docs/ontology/README.md](docs/ontology/README.md): ontology notes
643643
- [docs/release.md](docs/release.md): release checklist
644+
- [CONTRIBUTING.md](CONTRIBUTING.md): contribution workflow and validation
645+
- [SECURITY.md](SECURITY.md): supported versions, reporting, and safety boundaries
644646
- [CHANGELOG.md](CHANGELOG.md): release notes
645647

646648
## License

SECURITY.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Security Policy
2+
3+
`kubernetes-ontology` is designed as a read-only Kubernetes topology and
4+
diagnostic service. It should not mutate observed cluster workloads or write
5+
status, annotations, CRDs, or remediation actions.
6+
7+
## Supported Versions
8+
9+
Security fixes target the latest released version and the default branch.
10+
11+
| Version | Supported |
12+
| ------- | --------- |
13+
| latest release | Yes |
14+
| default branch | Yes |
15+
| older releases | Best effort |
16+
17+
## Reporting A Vulnerability
18+
19+
Please report suspected vulnerabilities privately to the maintainer before
20+
opening a public issue.
21+
22+
Preferred contact:
23+
24+
- GitHub: open a private vulnerability report from the repository Security tab
25+
if available.
26+
- Fallback: contact the repository owner, `Colvin-Y`, through GitHub.
27+
28+
Include:
29+
30+
- Affected version or commit.
31+
- Install mode: Helm, release binary, or source.
32+
- Minimal reproduction steps.
33+
- Whether the issue requires cluster credentials, public HTTP exposure, or
34+
access to Secret-derived graph data.
35+
36+
## Security Boundaries
37+
38+
Expected behavior:
39+
40+
- Kubernetes collection uses `get`, `list`, and `watch`.
41+
- The daemon and viewer should be exposed only on localhost or controlled
42+
internal networks unless an operator adds external protection.
43+
- The HTTP API has no built-in authentication or TLS yet.
44+
- Secret reads are used only to model Secret nodes and `uses_secret` edges.
45+
Disable them with `rbac.readSecrets=false` when that evidence is not needed.
46+
47+
Out of scope for the current MVP:
48+
49+
- Public multi-tenant hosting.
50+
- Built-in HTTP authentication and TLS termination.
51+
- Remediation or cluster mutation.
52+
- Full Kubernetes authorization reasoning.
53+
54+
If a report shows that the runtime writes to observed resources, leaks Secret
55+
values, or makes unsafe claims from partial graph evidence, treat it as high
56+
priority.

0 commit comments

Comments
 (0)