phase 10
This commit is contained in:
@@ -28,7 +28,10 @@ GRPC_PORT=50051
|
||||
GRPC_MAX_WORKERS=10
|
||||
|
||||
# S3 Storage (MinIO locally, real S3 on AWS)
|
||||
S3_ENDPOINT_URL=http://minio:9000
|
||||
# In k8s/docker: http://minio:9000
|
||||
# On dev machine (port-forward): http://localhost:9000
|
||||
# On AWS: omit S3_ENDPOINT_URL entirely
|
||||
S3_ENDPOINT_URL=http://localhost:9000
|
||||
S3_BUCKET_IN=mpr-media-in
|
||||
S3_BUCKET_OUT=mpr-media-out
|
||||
AWS_REGION=us-east-1
|
||||
@@ -44,7 +47,7 @@ CLOUD_LLM_PROVIDER=groq
|
||||
|
||||
# Groq (default, free tier)
|
||||
GROQ_API_KEY=
|
||||
GROQ_MODEL=llama-3.2-90b-vision-preview
|
||||
GROQ_MODEL=meta-llama/llama-4-scout-17b-16e-instruct
|
||||
|
||||
# Gemini
|
||||
#GEMINI_API_KEY=
|
||||
|
||||
@@ -35,7 +35,15 @@ docker_build(
|
||||
# --- Resources ---
|
||||
|
||||
k8s_resource('redis')
|
||||
k8s_resource('fastapi', resource_deps=['redis'])
|
||||
k8s_resource('minio', port_forwards=['9000:9000', '9001:9001'])
|
||||
k8s_resource('fastapi', resource_deps=['redis', 'minio'])
|
||||
k8s_resource('detection-ui')
|
||||
k8s_resource('gateway', resource_deps=['fastapi', 'detection-ui'],
|
||||
port_forwards=['8080:8080'])
|
||||
|
||||
# Group uncategorized resources (configmaps, namespace) under infra
|
||||
k8s_resource(
|
||||
objects=['mpr:namespace', 'mpr-config:configmap', 'minio-config:configmap',
|
||||
'envoy-gateway-config:configmap'],
|
||||
new_name='infra',
|
||||
)
|
||||
|
||||
@@ -22,6 +22,8 @@ spec:
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: mpr-config
|
||||
- configMapRef:
|
||||
name: minio-config
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
|
||||
@@ -7,6 +7,7 @@ resources:
|
||||
- namespace.yaml
|
||||
- configmap.yaml
|
||||
- redis.yaml
|
||||
- minio.yaml
|
||||
- fastapi.yaml
|
||||
- detection-ui.yaml
|
||||
- gateway.yaml
|
||||
|
||||
87
ctrl/k8s/base/minio.yaml
Normal file
87
ctrl/k8s/base/minio.yaml
Normal file
@@ -0,0 +1,87 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: minio-config
|
||||
namespace: mpr
|
||||
data:
|
||||
S3_ENDPOINT_URL: http://minio:9000
|
||||
S3_BUCKET_IN: mpr-media-in
|
||||
S3_BUCKET_OUT: mpr-media-out
|
||||
AWS_ACCESS_KEY_ID: minioadmin
|
||||
AWS_SECRET_ACCESS_KEY: minioadmin
|
||||
AWS_REGION: us-east-1
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: minio
|
||||
namespace: mpr
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: minio
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: minio
|
||||
spec:
|
||||
containers:
|
||||
- name: minio
|
||||
image: minio/minio:latest
|
||||
args: ["server", "/data", "--console-address", ":9001"]
|
||||
ports:
|
||||
- containerPort: 9000
|
||||
name: api
|
||||
- containerPort: 9001
|
||||
name: console
|
||||
env:
|
||||
- name: MINIO_ROOT_USER
|
||||
value: minioadmin
|
||||
- name: MINIO_ROOT_PASSWORD
|
||||
value: minioadmin
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /minio/health/ready
|
||||
port: 9000
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
lifecycle:
|
||||
postStart:
|
||||
exec:
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
sleep 3
|
||||
for bucket in mpr-media-in mpr-media-out; do
|
||||
mkdir -p /data/$bucket
|
||||
done
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
cpu: 100m
|
||||
limits:
|
||||
memory: 512Mi
|
||||
volumes:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minio
|
||||
namespace: mpr
|
||||
spec:
|
||||
selector:
|
||||
app: minio
|
||||
ports:
|
||||
- port: 9000
|
||||
targetPort: 9000
|
||||
name: api
|
||||
- port: 9001
|
||||
targetPort: 9001
|
||||
name: console
|
||||
Reference in New Issue
Block a user