ebea70573b
- 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
106 lines
2.6 KiB
YAML
106 lines
2.6 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: superset
|
|
namespace: stonks-oracle
|
|
labels:
|
|
app: superset
|
|
app.kubernetes.io/part-of: stonks-oracle
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: superset
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: superset
|
|
spec:
|
|
containers:
|
|
- name: superset
|
|
image: apache/superset:latest
|
|
ports:
|
|
- containerPort: 8088
|
|
env:
|
|
- name: SUPERSET_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: stonks-secrets
|
|
key: SUPERSET_SECRET_KEY
|
|
- name: ADMIN_USERNAME
|
|
value: admin
|
|
- name: ADMIN_PASSWORD
|
|
value: admin
|
|
- name: ADMIN_EMAIL
|
|
value: admin@stonks.local
|
|
volumeMounts:
|
|
- name: superset-home
|
|
mountPath: /app/superset_home
|
|
- name: superset-config
|
|
mountPath: /app/pythonpath/superset_config.py
|
|
subPath: superset_config.py
|
|
resources:
|
|
requests:
|
|
cpu: 200m
|
|
memory: 512Mi
|
|
limits:
|
|
cpu: "1"
|
|
memory: 2Gi
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8088
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 15
|
|
volumes:
|
|
- name: superset-home
|
|
persistentVolumeClaim:
|
|
claimName: superset-data
|
|
- name: superset-config
|
|
configMap:
|
|
name: superset-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: superset
|
|
namespace: stonks-oracle
|
|
spec:
|
|
selector:
|
|
app: superset
|
|
ports:
|
|
- port: 8088
|
|
targetPort: 8088
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: superset-data
|
|
namespace: stonks-oracle
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 2Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: superset-config
|
|
namespace: stonks-oracle
|
|
data:
|
|
superset_config.py: |
|
|
import os
|
|
SECRET_KEY = os.getenv("SUPERSET_SECRET_KEY", "stonks-dev-secret-key-change-me")
|
|
SQLALCHEMY_DATABASE_URI = "trino://trino@trino.stonks-oracle.svc.cluster.local:8080/lakehouse/stonks"
|
|
FEATURE_FLAGS = {"ENABLE_TEMPLATE_PROCESSING": True}
|
|
CACHE_CONFIG = {
|
|
"CACHE_TYPE": "RedisCache",
|
|
"CACHE_DEFAULT_TIMEOUT": 300,
|
|
"CACHE_KEY_PREFIX": "superset_",
|
|
"CACHE_REDIS_HOST": os.getenv("REDIS_HOST", "redis.redis-service.svc.cluster.local"),
|
|
"CACHE_REDIS_PORT": int(os.getenv("REDIS_PORT", "6379")),
|
|
"CACHE_REDIS_DB": 1,
|
|
}
|