package main import ( "os" "knative.dev/pkg/injection/sharedmain" "knative.dev/pkg/signals" "github.com/imjasonh/git-k8s/pkg/health" _ "github.com/imjasonh/git-k8s/pkg/metrics" // register Prometheus metrics "github.com/imjasonh/git-k8s/pkg/reconciler/push" "github.com/imjasonh/git-k8s/pkg/workspace" ) func main() { ctx := signals.NewContext() go health.ServeMetrics(ctx, ":9090") //nolint:errcheck // GIT_CACHE_DIR enables PVC-backed workspace caching when set. // Push controller needs full history to resolve refs referenced by // push transactions (e.g., older tags or historical commits). cacheDir := os.Getenv("GIT_CACHE_DIR") wsMgr := workspace.NewManager(cacheDir, false) ctx = workspace.WithManager(ctx, wsMgr) sharedmain.MainWithContext(ctx, "push-controller", push.NewController) }