9 Commits

Author SHA1 Message Date
Gonçalo Rodrigues
f5f2251e24 fix(k8s): move ServiceMonitor manifests to k8s/monitoring/ subdirectory
The k8s/*.yaml glob in each skaffold.yaml picks up servicemonitor.yaml
and fails when monitoring is disabled (CRD not installed). Moving them
to k8s/monitoring/ keeps the config but excludes them from the default
deploy. Apply manually when enable_monitoring=true.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 22:43:04 +01:00
Gonçalo Rodrigues
d4ccff518e feat: switch to gugagr.xyz with TLS via Let's Encrypt (#39)
Adds Traefik Helm release (kube-system) with ACME HTTP-01 challenge
configured for Let's Encrypt, replacing the k3s-disabled bundled Traefik.

Migrates all hostnames from *.homelab.local to *.gugagr.xyz and upgrades
all ingresses to HTTPS with certresolver=letsencrypt annotations.

Adds var.domain (default homelab.local) to Terraform so the domain is
a single config point for monitoring and Gitea ingresses.

Gateway reads DOMAIN env var at runtime — falls back to homelab.local
so local k3d dev continues to work without changes.

Co-authored-by: Gonçalo Rodrigues <guga@Goncalos-MacBook-Pro.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 21:45:19 +01:00
Gonçalo Rodrigues
dcb573ed8a fix(auth): set cookie Domain to .homelab.local for subdomain coverage
Without the leading dot, the auth_token cookie was only sent to the
exact host homelab.local — not to finance.homelab.local, auth.homelab.local,
etc. — so the forward-auth check failed on any subdomain after login.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 16:43:33 +01:00
Gonçalo Rodrigues
0442f6cde7 feat: add Skaffold for local k3d development
- Root skaffold.yaml composes all services; local profile auto-activates
  on k3d-homelab context (push: false, k3d image import); ci profile
  pushes to registry with git-commit tags
- Per-service skaffold.yaml for per-service dev (run from service dir)
- Add finance-api skaffold.yaml (was missing)
- Deployment images use bare name (homelab/<svc>) — Skaffold substitutes
  the correct tagged image; no registry prefix needed for local dev
- Add namespace: auth to all auth service manifests
- Remove skaffold.yaml from .gitignore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 16:30:24 +01:00
Gonçalo Rodrigues
f5c08d6f02 fix: add git.homelab.local registry prefix and imagePullSecrets to all app deployments
auth/gateway, auth/users, and test/example-service were referencing
images without a registry prefix, causing k8s to fall back to Docker Hub
(which doesn't have these images).

Also generalises the gitea-registry imagePullSecret to all app namespaces
(auth, finance, home, test) via a for_each in Terraform.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 16:01:55 +01:00
Gonçalo Rodrigues
b27268febe fix: revert image names to match service.mk directory-derived names
service.mk builds homelab/<dirname>:latest so manifests must match:
- homelab/api:latest (finance/services/api)
- homelab/users:latest (auth/services/users)
- homelab/gateway:latest (auth/services/gateway)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 16:04:26 +01:00
Gonçalo Rodrigues
85930ef40f ci: switch to self-hosted runner with local k3d image import
Removes all ghcr.io and registry dependencies. Workflows now build
images locally, import them into k3d, and deploy with kubectl set image
— all on the self-hosted runner which already has Docker and kubectl.

Also removes the github Terraform provider and ci.tf since no registry
pull secrets or GitHub Actions secrets are needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 14:33:12 +01:00
Gonçalo Rodrigues
94b23fc839 ci: add GitHub Actions workflows and update image references to ghcr.io
Three path-filtered workflows (finance-api, auth-users, auth-gateway)
each build, push to ghcr.io, and rollout to k3s on push to main.
Deployment manifests updated from local image refs to ghcr.io with
imagePullSecrets referencing a ghcr-credentials k8s secret.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-13 14:03:05 +01:00
Gonçalo Rodrigues
13b7149614 First Commit 2026-06-13 11:25:23 +01:00