4a9ec8b2ad522bd4573cab3cf53a21bc084e37b6
Build and Push Image / build (push) Successful in 23s
gitea-k3s-deployer
Lightweight Go deployment service that taps into Gitea (https://git.site.latha.org) and deploys applications to K3s (dash.latha.org / k3s-kplae-u30796) via Server-Side Apply.
Features
- Gitea Webhook Listener (
POST /webhook/gitea): VerifiesX-Gitea-Signature(HMAC-SHA256) and handlesping,push,release, andworkflow_runevents. - Two Deployment Modes:
.latha-deploy.yaml/deploy.yaml: Declarative app spec that rendersNamespace,Deployment(with safe non-BestEffortdefaultrequests/limits),Service, and TraefikIngress(websecure+letsencrypt).k8s/*.yamldirectory: Syncs raw Kubernetes manifests with${IMAGE_TAG},${SHORT_SHA},${COMMIT_SHA},${APP_NAME}, and${REF}substitution.
- Web UI Dashboard (
GET /): Shows registered apps, deployment history + logs, recent webhook deliveries, manual deploy trigger, and one-click rollback. - REST API & Observability:
GET /healthz,GET /readyz,GET /metricsGET /api/apps,POST /api/appsGET /api/deployments,GET /api/deployments/{id},POST /api/deploy,POST /api/deployments/{id}/rollbackGET /api/webhooks
Example .latha-deploy.yaml
name: my-app
namespace: apps
branch: main
image: git.site.latha.org/experiments/my-app
tagStrategy: sha # sha | latest | release | ref
port: 8080
host: my-app.site.latha.org
healthPath: /healthz
replicas: 1
secretRefs:
- my-app-secrets
Secrets (OpenBao -> K8s Secret)
Create gitea-deployer-secrets in namespace gitea-deployer with:
GITEA_WEBHOOK_SECRET: Shared HMAC-SHA256 secret configured on Gitea webhooksGITEA_TOKEN: Gitea personal access token for reading private repositories
Languages
Go
86.4%
HTML
13.2%
Dockerfile
0.4%