1
0
Fork 0
mirror of https://github.com/imjasonh/git-k8s synced 2026-07-10 07:31:59 +00:00
Commit graph

2 commits

Author SHA1 Message Date
Claude
1d7073009f
Add Prometheus metrics, health probes, Git timeouts, and unit tests
Critical production-readiness improvements:

- Prometheus metrics: reconcile count/latency per controller, Git operation
  duration (clone/push/ls-remote) via pkg/metrics with /metrics on :9090
- Health probes: leverage Knative's built-in health server on :8080, add
  readiness/liveness probes to all four deployment manifests
- Git operation timeouts: 5-minute context deadline on all git.CloneContext
  and PushContext calls to prevent indefinite blocking on large repos
- Unit tests: new ReconcileKind-level tests for push (pending→failed on
  missing repo, auth error paths), sync (branch-not-found, LastSyncTime),
  resolver (missing repo, partial hashes, empty phase), and repowatcher
  (ls-remote errors, empty remote, unchanged branches)

https://claude.ai/code/session_01PaXbaSqhVEqj97kpY4v6rt
2026-03-17 14:32:02 +00:00
Claude
8e65104201
Implement Git-as-K8s control plane with Knative controllers
Build a complete Kubernetes control plane for Git operations using Knative's
pkg framework, go-git for in-memory Git operations, and ko for builds.

Architecture:
- 4 CRDs: GitRepository, GitBranch, GitPushTransaction, GitRepoSync
- Push controller: atomic Git push via go-git with CAS (compare-and-swap)
- Sync controller: two-way sync with in-memory merge base calculation
- Resolver controller: automated 3-way merge for conflicted syncs
- In-cluster Gitea server for backing storage
- Full RBAC, ko-based deployments, and code-gen scaffolding

Note: go.sum needs generation via `go mod tidy` in an environment with
full internet access (knative.dev/pkg v0.0.0-20250520014526-44579e9ce5ed).

https://claude.ai/code/session_01QfFzqKQUsxxBsiZUhuJ3pG
2026-02-27 23:58:44 +00:00