Skip to content

feat(quickstart): add a webhook tunnel so webhook triggers fire locally - #2

Merged
justinwilkin merged 2 commits into
mainfrom
feat/webhook-tunnel
Oct 26, 2026
Merged

justinwilkin merged 2 commits into
mainfrom
feat/webhook-tunnel

Conversation

@justinwilkin

Copy link
Copy Markdown
Member

Adds a Cloudflare quick tunnel to the quickstart so webhook triggers fire on a local cluster.

Changes

  • make tunnel: Starts a quick tunnel to the kora API on localhost:9443 as api.local.runkora.io. It prints each trigger source's webhook URL and the command that prints its signing secret. The process ID, URL and log live in quickstart/.tunnel/, which git ignores.
  • make tunnel-stop: Stops the tunnel. make down stops it too.
  • make up: Asks at the end whether to start a tunnel. TUNNEL=yes or TUNNEL=no skips the question, and without a terminal it starts none.
  • Docs: The quickstart README gains "Receive webhooks locally", with the setup steps, what the tunnel exposes and how to get a stable URL. The single-tenant README points to it.

Testing

  • make validate passes.
  • make tunnel started a tunnel on the quickstart. A GitHub ping signed with the github source's secret returned 202 through it, and the same request with a bad signature returned 404.
  • TUNNEL=no and a run without a terminal skip the question.

@runkora runkora Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Walkthrough

Adds make tunnel, tunnel-stop and ask-tunnel to the quickstart so webhook triggers can fire locally through a Cloudflare quick tunnel. Updates the READMEs and .gitignore.

Severity Finding Location
medium Empty trigger source fields shift the read columns quickstart/Makefile:299

Review effort: Low
Risk: Medium, exposes the local cluster API publicly
Coverage: 5 of 5 files reviewed

Where to focus

Area Why it needs a person
quickstart/Makefile Confirm exposing the whole API through the tunnel is acceptable.
Checked

README updates, root Makefile target forwarding, .gitignore.

Comment thread quickstart/Makefile Resolved
@runkora

runkora Bot commented Oct 26, 2026

Copy link
Copy Markdown

Visual Walkthrough

The quickstart Makefile gains an optional webhook tunnel with start, stop and a prompt during make up.

Tunnel start path

The tunnel target starts a Cloudflare quick tunnel and prints each trigger source's webhook URL.

sequenceDiagram
    participant M as quickstart Makefile
    participant C as cloudflared
    participant K as Trigger sources
    M->>M: prompt or read TUNNEL
    alt answer is not yes
        M-->>M: no tunnel started
    else answer is yes
        M->>M: stop previous tunnel
        alt cloudflared not installed
            M-->>M: exit with install hint
        else installed
            M->>C: start quick tunnel
            C-->>M: tunnel URL in log
            alt no URL within 30 seconds
                M-->>M: exit, see log
            else URL found
                M->>K: list trigger sources
                K-->>M: webhook path per source
                alt path is empty
                    M-->>M: print not ready
                else path is set
                    M-->>M: print URL and secret command
                end
            end
        end
    end
Loading
Node Code Symbols
quickstart Makefile quickstart/Makefile ask-tunnel, tunnel, tunnel-stop
Trigger sources quickstart/Makefile triggersources webhookPath signingSecretRef
Target wiring

The up and down targets call the new tunnel targets, and the root Makefile forwards them to the quickstart.

flowchart TB
    subgraph root [root Makefile]
        Fwd[forwards quickstart targets]:::changed
    end
    subgraph qs [quickstart Makefile]
        Up[up]:::changed
        Ask[ask-tunnel]:::added
        Tun[tunnel]:::added
        Stop[tunnel-stop]:::added
        Down[down]:::changed
    end
    Fwd --> Ask
    Up --> Ask
    Ask --> Tun
    Tun --> Stop
    Down --> Stop
    classDef added fill:#1f883d,stroke:#1a7f37,stroke-width:2px,color:#ffffff
    classDef changed fill:#bf8700,stroke:#9a6700,stroke-width:2px,color:#ffffff
    classDef removed fill:#cf222e,stroke:#a40e26,stroke-width:2px,stroke-dasharray:5,color:#ffffff
    classDef context fill:transparent,stroke:#8c959f,stroke-width:1px,stroke-dasharray:3,color:#8c959f
    linkStyle default stroke:#8c959f,stroke-width:2px
    style root fill:transparent,stroke:#8c959f
    style qs fill:transparent,stroke:#8c959f
Loading

Legend: green = added, amber = changed, red = removed, dashed grey = context

Node Code Symbols
root Makefile Makefile QUICKSTART_TARGETS
up quickstart/Makefile up
ask-tunnel quickstart/Makefile ask-tunnel
tunnel quickstart/Makefile tunnel
tunnel-stop quickstart/Makefile tunnel-stop
down quickstart/Makefile down

@justinwilkin
justinwilkin merged commit 6789405 into main Oct 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants