phase 0+1: project scaffold, k8s manifests, CI pipeline, steering, hooks, tests

- Repository structure for all services, infra, lakehouse, dashboards
- K8s manifests targeting stonks-oracle namespace with GHCR images
- Ingress via Traefik with ca-issuer TLS for internal services
- ConfigMap wired to existing cluster services (pg, redis, minio, ollama)
- GitHub Actions workflow for lint, test, multi-service container builds
- Dockerfile with build-arg CMD per service
- Makefile for local build/push/deploy
- Steering rules for TDD workflow, K8s conventions, project context
- Agent hooks for lint-on-save, test-on-save, k8s-validate, phase-commit
- Ruff linter config, all lint issues fixed
- 14 passing tests for schemas, config, redis keys
- PostgreSQL migrations, Trino catalogs, Superset config, MinIO lifecycle
This commit is contained in:
Celes Renata
2026-04-11 03:25:08 -07:00
parent 8cfc4f423b
commit ebea70573b
90 changed files with 3590 additions and 19 deletions
+47
View File
@@ -0,0 +1,47 @@
REPO_OWNER := celesrenata
REPO_NAME := stonks-oracle
GHCR := ghcr.io/$(REPO_OWNER)/$(REPO_NAME)
SHA := $(shell git rev-parse --short HEAD 2>/dev/null || echo "dev")
SERVICES := scheduler symbol-registry ingestion parser extractor aggregation recommendation risk broker-adapter lake-publisher query-api
.PHONY: help lint test build push deploy clean
help:
@echo "Targets:"
@echo " lint - Run ruff linter"
@echo " test - Run pytest"
@echo " build - Build all service images locally"
@echo " push - Push all images to GHCR"
@echo " deploy - Apply K8s manifests"
@echo " clean - Remove local images"
lint:
ruff check services/
test:
pytest tests/ -x --tb=short -q
build:
@for svc in $(SERVICES); do \
echo "Building $$svc..."; \
docker build -t $(GHCR)/$$svc:$(SHA) -t $(GHCR)/$$svc:latest -f docker/Dockerfile .; \
done
push:
@for svc in $(SERVICES); do \
echo "Pushing $$svc..."; \
docker push $(GHCR)/$$svc:$(SHA); \
docker push $(GHCR)/$$svc:latest; \
done
deploy:
kubectl apply -f infra/k8s/namespace.yaml
kubectl apply -f infra/k8s/configmap.yaml
kubectl apply -f infra/k8s/secrets.yaml
kubectl apply -f infra/k8s/
clean:
@for svc in $(SERVICES); do \
docker rmi $(GHCR)/$$svc:$(SHA) $(GHCR)/$$svc:latest 2>/dev/null || true; \
done