Repository navigation
Description
Update 2026-11-26 (infra move): The cluster side of this trigger belongs to dan-petty/homelab.
This item keeps the product part: the Sensor for rag-ingest and its network policy in k8s/devops/, the Secret row of this workload, and the rag-push-check command of the design. Argo Events, the GitHub EventSource, its public route and its ingress policy are the homelab follow-up, which comes first.
Follow-up: dan-petty/homelab#299.
Split from #3589.
Problem: A default-branch push does not start an ingest. The index waits for the next poll. Why deferred: The cluster does not install Argo Events. A GitHub webhook needs an event source, a Sensor, a public endpoint and a webhook secret. These are outside the scheduled lane. Acceptance criteria: Argo Events event source receives a GitHub push webhook for a repository in service.repos. A Sensor creates one Workflow from WorkflowTemplate rag-ingest with mutex rag-ingest. The event source validates the webhook secret. NetworkPolicies admit the webhook route to the event source. k8s/README.md and the cluster checks describe the push trigger. uv run devops ci passes.
Proposed design
Problem statement
Build the Argo Events push trigger for RAG ingest; hold the production GitHub webhook for the deferred issue. The change installs Argo Events and adds a GitHub push EventSource and a Sensor. The Sensor creates one Workflow from WorkflowTemplate rag-ingest with mutex rag-ingest. The webhook route uses the existing Cloudflare Tunnel and a Kubernetes Secret. A person registers the production GitHub webhook and secret in the deferred issue.
Acceptance criteria
Requirement: Argo Events in the infra stack
The infra stack SHALL deploy the Argo Events controller and its CRDs.
Scenario: K8s manifest validation
- WHEN
uv run devops ci --check --only k8sruns after the Argo Events manifests are registered inMANIFESTS_BY_STACKorHELM_RELEASES_BY_STACK. - THEN The command exits 0.
Requirement: GitHub push EventSource
The k8s manifests SHALL define an Argo Events EventSource for GitHub push events for the repositories in service.repos.
Scenario: EventSource manifest validation
- WHEN
uv run devops ci --check --only k8sruns. - THEN The command exits 0.
Requirement: One ingest Workflow per push
The k8s manifests SHALL define a Sensor that creates one Workflow from WorkflowTemplate rag-ingest with mutex rag-ingest.
Scenario: Sensor manifest validation
- WHEN
uv run devops ci --check --only k8sruns. - THEN The command exits 0.
Requirement: Webhook secret validation
The EventSource MUST validate the GitHub webhook signature with the test secret.
Scenario: Live signed push check
- WHEN
uv run devops k8s rag-push-check --testsends a signed GitHub push payload to the EventSource. - THEN The command exits 0 and prints the name of the created
rag-ingestWorkflow.
Requirement: Webhook route NetworkPolicy
The k8s manifests SHALL define a NetworkPolicy that admits the webhook route from the ingress controller to the EventSource pods.
Scenario: K8s network policy validation
- WHEN
uv run devops ci --check --only k8sruns. - THEN The command exits 0.
Requirement: Push trigger documentation
k8s/README.md SHALL describe the push trigger, the test secret and the deferred production webhook step.
Scenario: Documentation validation
- WHEN
uv run devops ci --check --only docsruns. - THEN The command exits 0.
Requirement: Full CI
The change SHALL pass uv run devops ci.
Scenario: Full CI run
- WHEN
uv run devops ciruns. - THEN The command exits 0.
Existing Tool Considered
No alternatives check has run. Argo Events is the open, maintained tool that covers the need: its GitHub EventSource receives a push webhook and its Sensor creates a Workflow. It lacks a public ingress and a secret store, so the change uses the existing Cloudflare Tunnel and a Kubernetes Secret from the keyring.
Key questions
- Which tool turns a GitHub push into a RAG ingest Workflow?: Argo Events. Its GitHub EventSource receives the push webhook. Its Sensor creates the Workflow. It pairs with the Argo Workflows controller that the infra stack already runs. (best practice) [sources: k8s/README.md]
- Chosen: Argo Events. It is open, maintained, and its GitHub EventSource and Sensor cover the push-to-Workflow path. The infra stack already runs Argo Workflows.
- Rejected: GitHub Actions repository_dispatch. It adds a second CI path and no cluster-local event source or Sensor.
- Rejected: Custom webhook service. It needs code to build and keep for signature validation, event filtering and Workflow creation.
- How does the EventSource get the webhook secret?: Generate the secret in the keyring. Write it to a Kubernetes Secret with
devops k8s push-secrets. The EventSource reads that Secret. (best practice) [sources: k8s/README.md]- Chosen: Keyring and
devops k8s push-secrets. It follows the existing cluster Secret pattern and keeps no secret in git. - Rejected: Manual
kubectl create secret. It has no durable source and a second cluster gets no secret. - Rejected: GitHub Actions secret. The cluster cannot read a GitHub Actions secret.
- Chosen: Keyring and
- How is the webhook endpoint exposed?: Add one Ingress path through the existing Cloudflare Tunnel. Keep every other service route private. (best practice) [sources: docs/adr/0003-polling-is-how-the-roadmap-sees-changes.md, k8s/README.md]
- Chosen: Cloudflare Tunnel Ingress path. ADR 0003 exposes the webhook endpoint through the existing Cloudflare Tunnel on a single path.
- Rejected: NodePort. It exposes a node port to the network and does not use the tunnel.
- Rejected: LoadBalancer Service. It asks for a new public address.
- Does the push trigger replace the scheduled poll?: No. The poll stays the source of truth. The push trigger only cuts the delay. (best practice) [sources: docs/adr/0003-polling-is-how-the-roadmap-sees-changes.md]
- Chosen: Keep the poll. ADR 0003 makes polling the source of truth and a webhook only a latency cut.
- Rejected: Remove the poll. A missed webhook would stop the ingest with no fallback.
- Can the implement job register the GitHub webhook and the production webhook secret?: No. The webhook secret comes from the keyring. The repository webhook is a repository setting. The proposal defers that part to a new issue. (best practice) [sources: k8s/README.md, docs/adr/0003-polling-is-how-the-roadmap-sees-changes.md]
- Chosen: Defer the webhook registration and secret. The implement job has no keyring secret and no repository admin setting.
- Rejected: Automate with the existing GitHub App. The repository does not show that the app holds the webhook admin permission.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
devops-cli-service commentedon Nov 13, 2026
Both start an ingest on a default-branch push, but 3950 uses the Service to create a Job and the candidate uses Argo Events.devops-cli-service commentedon Nov 17, 2026
Waiting for the alternatives check to run. The next refine round looks at the item again after the check records a verdict.