Webhook Endpoints Reference

Configure webhooks for instant site updates on git push.

Endpoint

POST https://<webhook-domain>/sync/<namespace>/<sitename>

In the kup6s cluster with default configuration:

POST https://webhook.pages.kup6s.com/sync/<namespace>/<sitename>

Authentication

Currently, webhooks are unauthenticated. The endpoint only triggers a sync operation for the specified site.

Response Codes

Code

Description

200

Sync triggered successfully

404

StaticSite not found

500

Internal error

Git Provider Configuration

Forgejo / Gitea

  1. Go to Repository Settings > Webhooks

  2. Click Add Webhook > Forgejo

  3. Configure:

    • Target URL: https://webhook.pages.kup6s.com/sync/<namespace>/<sitename>

    • HTTP Method: POST

    • Trigger On: Push Events

    • Branch filter: main (or your configured branch)

  4. Click Add Webhook

GitLab

  1. Go to Repository Settings > Webhooks

  2. Click Add new webhook

  3. Configure:

    • URL: https://webhook.pages.kup6s.com/sync/<namespace>/<sitename>

    • Trigger: Push events

    • Enable SSL verification: Yes

  4. Click Add webhook

GitHub

  1. Go to Repository Settings > Webhooks

  2. Click Add webhook

  3. Configure:

    • Payload URL: https://webhook.pages.kup6s.com/sync/<namespace>/<sitename>

    • Content type: application/json

    • Which events: Just the push event

    • Active: Yes

  4. Click Add webhook

Testing Webhooks

Test a webhook manually using curl:

curl -X POST https://webhook.pages.kup6s.com/sync/my-namespace/my-site

Check site status after triggering:

kubectl get staticsite my-site -n my-namespace

Webhook Domain Configuration

The webhook domain is configured in the Helm values:

webhook:
  enabled: true
  domain: "webhook.pages.kup6s.com"
  clusterIssuer: "letsencrypt-cluster-issuer"

This creates:

  • A Traefik IngressRoute for the domain

  • A cert-manager Certificate for TLS

DNS Requirements

Ensure the webhook domain resolves to your cluster’s ingress IP:

# Get ingress IP
kubectl get svc -n kube-system traefik -o jsonpath='{.status.loadBalancer.ingress[0].ip}'

# Create DNS A record pointing webhook.pages.kup6s.com to this IP

Without Webhooks

If webhooks are disabled, sites sync based on syncInterval (default: 5 minutes).

To force an immediate sync without webhooks:

  1. Delete and recreate the StaticSite

  2. Or trigger a sync via kubectl annotation:

    kubectl annotate staticsite my-site -n my-namespace \
      pages.kup6s.com/sync=$(date +%s) --overwrite