The Knative reconciler.LeaderAware interface requires:
Promote(Bucket, func(Bucket, types.NamespacedName)) error
Our code had the wrong enqueue function signature using
(Bucket, string) error instead.
https://claude.ai/code/session_01QfFzqKQUsxxBsiZUhuJ3pG
Two jobs:
- build: compiles all controller binaries and runs go vet
- e2e: spins up KinD cluster with Knative via chainguard-dev/actions,
deploys CRDs and controllers with ko, verifies rollout, runs
smoke test creating a GitRepository CR. On failure, collects
kind-diag diagnostics as artifacts.
https://claude.ai/code/session_01QfFzqKQUsxxBsiZUhuJ3pG
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