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 |
|---|---|
|
Sync triggered successfully |
|
StaticSite not found |
|
Internal error |
Git Provider Configuration¶
Forgejo / Gitea¶
Go to Repository Settings > Webhooks
Click Add Webhook > Forgejo
Configure:
Target URL:
https://webhook.pages.kup6s.com/sync/<namespace>/<sitename>HTTP Method:
POSTTrigger On: Push Events
Branch filter:
main(or your configured branch)
Click Add Webhook
GitLab¶
Go to Repository Settings > Webhooks
Click Add new webhook
Configure:
URL:
https://webhook.pages.kup6s.com/sync/<namespace>/<sitename>Trigger: Push events
Enable SSL verification: Yes
Click Add webhook
GitHub¶
Go to Repository Settings > Webhooks
Click Add webhook
Configure:
Payload URL:
https://webhook.pages.kup6s.com/sync/<namespace>/<sitename>Content type:
application/jsonWhich events: Just the push event
Active: Yes
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:
Delete and recreate the StaticSite
Or trigger a sync via kubectl annotation:
kubectl annotate staticsite my-site -n my-namespace \ pages.kup6s.com/sync=$(date +%s) --overwrite