init commit

This commit is contained in:
2026-04-12 07:19:48 -03:00
commit 9dbf89da02
111 changed files with 14925 additions and 0 deletions

48
ctrl/k8s/base/api.yaml Normal file
View File

@@ -0,0 +1,48 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: api
namespace: unt
spec:
replicas: 1
selector:
matchLabels:
app: api
template:
metadata:
labels:
app: api
spec:
containers:
- name: api
image: unt-api
command: ["uv", "run", "uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
ports:
- containerPort: 8000
envFrom:
- configMapRef:
name: unt-config
readinessProbe:
httpGet:
path: /scenarios
port: 8000
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
memory: 512Mi
cpu: 500m
limits:
memory: 2Gi
---
apiVersion: v1
kind: Service
metadata:
name: api
namespace: unt
spec:
selector:
app: api
ports:
- port: 8000
targetPort: 8000

View File

@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: unt-config
namespace: unt
data:
DEFAULT_SCENARIO: "weather_disruption_ord"
USE_BEDROCK: "false"
LANGFUSE_HOST: "http://langfuse:3000"

View File

@@ -0,0 +1,12 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: unt
resources:
- namespace.yaml
- configmap.yaml
- postgres.yaml
- langfuse.yaml
- api.yaml
- ui.yaml

View File

@@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: langfuse
namespace: unt
spec:
replicas: 1
selector:
matchLabels:
app: langfuse
template:
metadata:
labels:
app: langfuse
spec:
containers:
- name: langfuse
image: langfuse/langfuse:2
ports:
- containerPort: 3000
env:
- name: DATABASE_URL
value: "postgresql://langfuse:langfuse@postgres:5432/langfuse"
- name: NEXTAUTH_SECRET
value: "unt-dev-secret"
- name: NEXTAUTH_URL
value: "http://localhost:3000"
- name: SALT
value: "unt-dev-salt-not-for-production-use"
readinessProbe:
httpGet:
path: /api/public/health
port: 3000
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 10
resources:
requests:
memory: 256Mi
cpu: 200m
limits:
memory: 1Gi
---
apiVersion: v1
kind: Service
metadata:
name: langfuse
namespace: unt
spec:
selector:
app: langfuse
ports:
- port: 3000
targetPort: 3000

View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: unt

View File

@@ -0,0 +1,50 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
namespace: unt
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:16-alpine
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: "langfuse"
- name: POSTGRES_PASSWORD
value: "langfuse"
- name: POSTGRES_DB
value: "langfuse"
readinessProbe:
exec:
command: ["pg_isready", "-U", "langfuse"]
initialDelaySeconds: 3
periodSeconds: 5
resources:
requests:
memory: 128Mi
cpu: 100m
limits:
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: postgres
namespace: unt
spec:
selector:
app: postgres
ports:
- port: 5432
targetPort: 5432

44
ctrl/k8s/base/ui.yaml Normal file
View File

@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ui
namespace: unt
spec:
replicas: 1
selector:
matchLabels:
app: ui
template:
metadata:
labels:
app: ui
spec:
containers:
- name: ui
image: unt-ui
ports:
- containerPort: 80
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 2
periodSeconds: 10
resources:
requests:
memory: 64Mi
cpu: 50m
limits:
memory: 128Mi
---
apiVersion: v1
kind: Service
metadata:
name: ui
namespace: unt
spec:
selector:
app: ui
ports:
- port: 80
targetPort: 80