Event-driven CI/CD controller for Kubernetes. Listens for events (GitHub webhooks, etc.), maps them to Tekton PipelineRuns/TaskRuns via TriggerBindings and TriggerTemplates, and creates Kubernetes resources through EventListeners.
Behavioral guidelines: See .agents/guidelines.md for generic coding principles.
# Build all binaries
make all
# Build specific component
make bin/controller
make bin/eventlistenersink
make bin/interceptors
make bin/webhook
make bin/tkn-triggers
# Unit tests — no cluster required
make test-unit
# End-to-end tests — requires a running cluster
make test-e2e
# YAML tests
make test-yamls
# Format code — required before PR submission
make fmt
# Lint — must pass before every PR
make golangci-lint
# Code generation — required after modifying types or CRD schemas
./hack/update-codegen.sh# Lint a single Go file
golangci-lint run path/to/file.go
# Type-check using staticcheck
staticcheck ./path/to/pkg/...
# Format a single file in place
gofmt -w path/to/file.go
# Vet the package containing the file
go vet ./path/to/pkg/...-
Dependencies are vendored. All Go dependencies live in
vendor/. Review agents should ignore thevendor/directory — it contains third-party code. -
Use structured logging. Import
knative.dev/pkg/loggingand use context-aware loggers. Never usefmt.Printforlog.Printin production code. -
CRD types live in
pkg/apis/. After modifying any type definition, run./hack/update-codegen.shto regenerate deepcopy, client, and informer code. -
Interceptors are the request/response processing layer. Core interceptors (CEL, GitHub, GitLab, Bitbucket, Slack) live in
pkg/interceptors/and run as a dedicated HTTPS service (port 8443). Custom interceptors are registered via theClusterInterceptorCRD and called by the sink over HTTP(S). Thepkg/interceptors/webhook/package handles the deprecatedInterceptor.Webhookfield for calling arbitrary external URLs directly from the sink — distinct fromClusterInterceptor. -
Test coverage is enforced. PRs adding functionality must include tests. E2E tests are tagged and require a cluster — unit tests should not.
-
Config lives in
config/. Kubernetes manifests (CRDs, RBAC, deployments) are generated/managed there. Do not hand-edit generated CRD YAML.
Controller (cmd/controller, pkg/reconciler/): Reconciles EventListener,
TriggerBinding, TriggerTemplate, ClusterTriggerBinding, ClusterInterceptor CRDs.
Uses Knative's controller framework.
EventListener Sink (cmd/eventlistenersink, pkg/sink/): HTTP server
that receives events and processes them through trigger bindings, templates, and
interceptors to create Kubernetes resources.
Interceptors (cmd/interceptors, pkg/interceptors/): HTTPS service (port 8443)
handling core interceptors (CEL, GitHub, GitLab, Bitbucket, Slack). The sink calls interceptors
via HTTP POST. ClusterInterceptors can extend this for custom logic.
Webhook (cmd/webhook): Kubernetes admission webhook for validating and
defaulting CRD resources.
tkn-triggers CLI (cmd/tkn-triggers): CLI plugin for tkn to interact
with Triggers resources.
Utility CLIs (cmd/binding-eval, cmd/cel-eval, cmd/triggerrun): Developer
tools for evaluating bindings, CEL expressions, and trigger processing locally.
- New interceptor type: Follow
pkg/interceptors/cel/as the reference implementation - New reconciler: Follow
pkg/reconciler/eventlistener/for structure and patterns - New CRD type: Add to
pkg/apis/triggers/, update./hack/update-codegen.sh - Sink event processing: See
pkg/sink/sink.gofor the main event handling path - E2E tests: Follow examples in
test/eventlistener_test.go - CEL expressions: See
pkg/interceptors/cel/anddocs/cel_expressions.md
- Pull requests must follow the repository PR template in
.github/pull_request_template.md. - Run
make fmtbefore submitting for review. make golangci-lintmust pass with zero issues.- Tests required for any functionality changes.
- Follow Tekton commit message standards.
- Add
/kind <type>label (bug, feature, cleanup, etc.). - Update release notes block if user-facing changes.
- Run
./hack/update-codegen.shafter modifying CRD types. - Ignore
vendor/directory in reviews — contains vendored dependencies only.
None configured yet. Repo-local skills can be added to .agents/skills/.