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
A default-branch push does not start a RAG ingest. The index waits for the next poll. The cluster side (Argo Events, the GitHub EventSource, its public route and its ingress policy) is in dan-petty/homelab#299. This item adds the product Sensor for rag-ingest, its NetworkPolicy, the webhook Secret row and the rag-push-check command. The poll stays the source of truth.
Acceptance criteria
Requirement: RAG ingest Sensor
The product k8s manifests SHALL define an Argo Events Sensor that creates one Workflow from WorkflowTemplate rag-ingest with mutex rag-ingest for a GitHub push event.
Scenario: Sensor manifest validation
- WHEN
uv run devops ci --check --only k8sruns after the Sensor manifest is registered inPRODUCT_MANIFESTS_BY_STACK. - THEN The command exits 0.
Requirement: Sensor NetworkPolicy
The product k8s manifests SHALL define an egress NetworkPolicy for the Sensor pods.
Scenario: NetworkPolicy validation
- WHEN
uv run devops ci --check --only k8sruns. - THEN The command exits 0 and the k8s check reports no dual-type NetworkPolicy.
Requirement: Webhook Secret row
The product Secret table SHALL define a row for the GitHub webhook secret in the argo-events namespace with a keyring generator.
Scenario: Secret row test
- WHEN
uv run pytest tests/commands/k8s/test_k8s.py -k webhook_secretruns. - THEN The test passes and the row names the keyring key
rag_github_webhook_secret.
Requirement: Signed push check command
The rag-push-check command MUST build a GitHub HMAC SHA-256 signature from the webhook secret and send it in the X-Hub-Signature-256 header.
Scenario: Command unit test
- WHEN
uv run pytest tests/commands/k8s/test_k8s.py -k rag_push_checkruns. - THEN The test passes and the fake EventSource receives the signed push payload.
Requirement: Pending a person after the merge
The live rag-push-check proof MUST create one rag-ingest Workflow after dan-petty/homelab#299 is done.
Scenario: Live signed push check
- WHEN A person runs
uv run devops k8s rag-push-check --testafter the merge and afterdan-petty/homelab#299. - THEN The command exits 0 and prints the name of exactly one created
rag-ingestWorkflow.
Requirement: Push trigger documentation
k8s/README.md SHALL describe the product Sensor, the webhook Secret row and the homelab EventSource dependency.
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. The open, maintained tool is Argo Events: its Sensor creates one Workflow from WorkflowTemplate rag-ingest on a GitHub push event. It lacks the GitHub EventSource, its public route and its ingress policy; dan-petty/homelab#299 provides them. The change adds only the product Sensor, its NetworkPolicy, the webhook Secret row and the rag-push-check command. The command is a thin signed-HTTP client: about 150 lines, 8k tokens to build, 2k tokens to keep, and 2 hours.
Key questions
- Which open tool turns a GitHub push into a RAG ingest Workflow?: Argo Events. Its Sensor creates one Workflow from WorkflowTemplate
rag-ingeston a GitHub push event. The homelab follow-up installs Argo Events and the GitHub EventSource. (best practice) [sources: k8s/README.md]- Chosen: Argo Events. It is open, maintained, and its Sensor creates Workflows from event sources.
- Rejected: GitHub Actions repository_dispatch. It adds a second CI path and no cluster-local Sensor.
- Rejected: Custom webhook service. It needs code for signature validation, filtering and Workflow creation.
- Where do the Sensor and its NetworkPolicy live?: In
k8s/devops/argo-events/, registered inPRODUCT_MANIFESTS_BY_STACK. The product base ships them, and the homelab follow-up installs the Argo Events controller. (best practice) [sources: k8s/README.md, k8s/devops/alerts/inbox.yaml]- Chosen: k8s/devops/argo-events/. The product base groups product manifests by component and registers each path in PRODUCT_MANIFESTS_BY_STACK.
- Rejected: k8s/devops/ root. It mixes the Sensor with unrelated product manifests.
- Rejected: dan-petty/homelab. The issue update keeps the product Sensor and its NetworkPolicy in this repository.
- What traffic does the Sensor NetworkPolicy allow?: The policy has type
Egress. It allows the Sensor to reach the Argo Events event bus and the Kubernetes API. It allows no ingress. (best practice) [sources: k8s/README.md]- Chosen: Egress-only policy to the event bus and the API. The Sensor subscribes to the event bus and creates Workflows through the Kubernetes API.
- Rejected: Ingress policy from the ingress controller. The ingress controller reaches the EventSource, not the Sensor; the homelab follow-up owns that route.
- Rejected: No NetworkPolicy. The cluster uses NetworkPolicies and the issue asks for one.
- How does the EventSource get the GitHub webhook secret?: Add a product row to
src/devops_cli/k8s/cluster_secrets.pyfor theargo-eventsnamespace. The row reads the keyring keyrag_github_webhook_secretand generates the value when the keyring has none. The homelab EventSource reads that Secret. (best practice) [sources: k8s/README.md, src/devops_cli/k8s/cluster_secrets.py]- Chosen: Product Secret row from the keyring. The k8s README says every cluster Secret comes from the keyring and a product row holds its generator.
- 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.
- How does the webhook endpoint reach the EventSource?: The homelab follow-up
dan-petty/homelab#299adds the public route and its ingress policy. This item adds no ingress. (best practice) [sources: k8s/README.md]- Chosen: Homelab follow-up route. The k8s README says the environment tree of the cluster lives only in dan-petty/homelab.
- Rejected: Product base Ingress. It puts a cluster route in the product base, which the issue update moves to homelab.
- Rejected: NodePort. It exposes a node port and does not use the existing tunnel.
- Does the push trigger replace the scheduled poll?: No. The scheduled poll stays the source of truth and the fallback. The push trigger only cuts the delay. (best practice) [sources: k8s/README.md]
- Chosen: Keep the poll. A missed webhook would stop the ingest with no fallback.
- Rejected: Remove the poll. It makes the webhook the only trigger and loses the fallback.
- How does
rag-push-checksign the test payload?: It reads the same keyring secret and sends an HMAC SHA-256 signature in theX-Hub-Signature-256header, as GitHub does. (best practice) [sources: src/devops_cli/k8s/cluster_secrets.py]- Chosen: HMAC SHA-256 signature. GitHub signs each webhook delivery with HMAC SHA-256 and the EventSource validates that signature.
- Rejected: Unsigned test payload. The EventSource would reject it and the check would prove nothing.
- Can the implement job register the GitHub webhook and the production secret?: No. The repository webhook is a repository setting and the secret comes from the keyring. The homelab follow-up
dan-petty/homelab#299holds that person step. (best practice) [sources: AGENTS.md, k8s/README.md]- Chosen: Defer to homelab#299. Only a person changes repository settings and secrets, and the issue update moves the EventSource and route to homelab.
- 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
dan-petty/homelab#299 installs Argo Events, the GitHub EventSource, its public route and its ingress policy. This item waits for it.
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.
devops-cli-service commentedon Nov 27, 2026
Owner question: See Suspected block in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence