Commit Graph

23 Commits

Author SHA1 Message Date
ZhenYi
f5084974b3 fix(k8s): add APP_SESSION_SECRET to ConfigMap to fix captcha errors with multi-pod
Without a shared cookie signing key, each pod generates a random key on
startup. Requests that hit different pods fail session validation, causing
CaptchaError when the captcha and login requests route to different pods.
2026-04-15 23:31:11 +08:00
ZhenYi
b6022e824d feat(k8s): enforce minimum 2 replicas for all services except email-worker 2026-04-15 23:08:25 +08:00
ZhenYi
e7cf0c544f fix(k8s): remove all health probes from gitserver 2026-04-15 23:07:17 +08:00
ZhenYi
dd4bbf3bb5 fix(k8s): add startupProbe to gitserver deployment template 2026-04-15 23:04:17 +08:00
ZhenYi
451e55596a fix(k8s): protect PVCs from deletion on helm uninstall 2026-04-15 23:00:55 +08:00
ZhenYi
c033cc3ff8 fix(k8s): add procps to worker images and fix probe commands
- Add procps to git-hook and email-worker Dockerfiles (provides pgrep)
- Change all exec probes from pgrep to kill -0 1 (more reliable, bash built-in)
- Add startupProbe to gitserver with 30 failure threshold (5min max startup time)
- Increase gitserver liveness initialDelay to 30s for slower SSH init
2026-04-15 22:13:16 +08:00
ZhenYi
0ce70eca7f fix(deploy): bind app to 0.0.0.0 for K8s Service connectivity 2026-04-15 14:26:42 +08:00
ZhenYi
d307c13878 fix(deploy): route /api and /ws to app, frontend as default on gitdata.ai 2026-04-15 14:19:25 +08:00
ZhenYi
6c3f5b49f8 feat(deploy): single unified Ingress with per-host routing
Replace multiple conflicting Ingress resources with one that routes:
- gitdata.ai         → frontend (port 80)
- api.gitdata.ai     → app (port 8080)
- git.gitdata.ai     → gitserver-http (port 8022)
- static.gitdata.ai  → static (port 8081)

Disable service-level ingress configs in values.yaml (they would
conflict on the same host/path). Single TLS secret covers all hosts.
2026-04-15 14:17:03 +08:00
ZhenYi
b9a9acbc75 fix(deploy): correct ConfigMap name from -secrets to -config
All deployments referenced the wrong ConfigMap name.
ConfigMap is named gitdata-config in the cluster.
2026-04-15 14:11:40 +08:00
ZhenYi
d4c9759a7e revert: use configMapRef instead of secretRef
ConfigMap is managed externally and contains all required env vars.
Keeping envFrom + configMapRef injection pattern.
2026-04-15 14:09:48 +08:00
ZhenYi
b7b56938aa fix(deploy): use secretRef instead of configMapRef in all deployments
ConfigMap was removed from Helm chart (managed externally).
Secret contains all required env vars (APP_DATABASE_URL, APP_REDIS_URL,
SMTP credentials, SSH domain/key, etc.) and is always rendered
(helm.sh/resource-policy: keep prevents deletion on upgrade).
Also add APP_SSH_PORT and APP_SSH_SERVER_PRIVATE_KEY to secret template.
2026-04-15 14:06:40 +08:00
ZhenYi
ad2cb7255f refactor(deploy): use envFrom with configMapRef for all deployments
Replace individual configMapKeyRef env vars with envFrom + configMapRef
to inject the full ConfigMap, plus minimal env blocks for static values.
Also remove resources block from operator deployment (K8s schema validation).
2026-04-15 13:48:13 +08:00
ZhenYi
b37425d3c7 fix: add SMTP env vars to email-worker deployment 2026-04-15 13:24:45 +08:00
ZhenYi
3bc381da45 feat: add SMTP env vars to app deployment 2026-04-15 11:51:29 +08:00
ZhenYi
2f31e7268b feat: add imagePullSecrets support to all deployment templates 2026-04-15 10:59:15 +08:00
ZhenYi
33c5501fc9 fix: remove resources from deployment templates to fix K8s schema validation 2026-04-15 10:56:22 +08:00
ZhenYi
53c63dad19 fix: simplify static deployment template, fix YAML parse error 2026-04-15 10:47:25 +08:00
ZhenYi
9112cb2dff fix: use scratch variable for port binding in static template 2026-04-15 10:42:53 +08:00
ZhenYi
9776c923c0 fix: use %v instead of %s+print for port in static template 2026-04-15 10:40:02 +08:00
ZhenYi
0ebbc6e29e fix: remove limits from resources to fix K8s schema validation
The cluster's API server rejects the limits field in Deployment containers.
Keep only requests (CPU/memory) for now.
2026-04-15 10:38:47 +08:00
ZhenYi
650243510c refactor: remove namespace and configmap from Helm chart
Namespace and ConfigMap are managed manually (not by Helm).
2026-04-15 10:30:02 +08:00
ZhenYi
93cfff9738 init 2026-04-15 09:08:09 +08:00