- Remove all HTTPS/TLS from MinIO (plain HTTP for internal cluster traffic) - Fix sccache 0% cache hit rate (rustls rejected self-signed MinIO cert) - Remove hardcoded URLs from k8s_dispatcher.rs (S3_ENDPOINT, TRAINING_RUNTIME_IMAGE, CALLBACK_ENDPOINT now required env vars) - Update GitLab registry S3 credentials to HTTP endpoint - Fix PVC manifest (20Gi → 100Gi to match cluster) - Fix nodeSelector: infra/foxhunt → platform (match actual node pool) - Fix rclone trailing backslash causing chmod to be parsed as rclone args - Remove minio-ca-cert ConfigMap references from all manifests - Update trading-service GPU overlay to l40s pool 20 files changed, -118 lines net Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
180 lines
5.3 KiB
YAML
180 lines
5.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: broker-gateway
|
|
namespace: foxhunt
|
|
labels:
|
|
app.kubernetes.io/name: broker-gateway
|
|
app.kubernetes.io/part-of: foxhunt
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 0
|
|
maxUnavailable: 1
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: broker-gateway
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
gitlab.com/prometheus_scrape: "true"
|
|
gitlab.com/prometheus_port: "9096"
|
|
gitlab.com/prometheus_path: "/metrics"
|
|
labels:
|
|
app.kubernetes.io/name: broker-gateway
|
|
app.kubernetes.io/part-of: foxhunt
|
|
spec:
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1000
|
|
runAsGroup: 1000
|
|
fsGroup: 1000
|
|
seccompProfile:
|
|
type: RuntimeDefault
|
|
imagePullSecrets:
|
|
- name: gitlab-registry
|
|
nodeSelector:
|
|
k8s.scaleway.com/pool-name: platform
|
|
initContainers:
|
|
- name: fetch-binary
|
|
image: gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/foxhunt-runtime:latest
|
|
command: ["/bin/sh", "-c"]
|
|
args:
|
|
- |
|
|
set -e
|
|
rclone copyto \
|
|
":s3:foxhunt-binaries/services/broker-gateway" \
|
|
"/binaries/broker-gateway" \
|
|
--s3-provider=Minio \
|
|
--s3-endpoint=http://minio.foxhunt.svc.cluster.local:9000 \
|
|
--s3-access-key-id="${MINIO_ACCESS_KEY}" \
|
|
--s3-secret-access-key="${MINIO_SECRET_KEY}" \
|
|
--s3-no-check-bucket
|
|
chmod +x /binaries/broker-gateway
|
|
echo "Fetched broker-gateway ($(stat -c%s /binaries/broker-gateway) bytes)"
|
|
env:
|
|
- name: MINIO_ACCESS_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: minio-credentials
|
|
key: access-key
|
|
- name: MINIO_SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: minio-credentials
|
|
key: secret-key
|
|
volumeMounts:
|
|
- name: binaries
|
|
mountPath: /binaries
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 64Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 128Mi
|
|
containers:
|
|
- name: broker-gateway
|
|
image: gitlab-registry.foxhunt.svc.cluster.local:5000/root/foxhunt/foxhunt-runtime:latest
|
|
securityContext:
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: true
|
|
capabilities:
|
|
drop: ["ALL"]
|
|
command: ["/binaries/broker-gateway"]
|
|
ports:
|
|
- containerPort: 50056
|
|
name: grpc
|
|
- containerPort: 9096
|
|
name: metrics
|
|
env:
|
|
- name: DATABASE_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: db-credentials
|
|
key: password
|
|
- name: DATABASE_URL
|
|
value: "postgresql://foxhunt:$(DATABASE_PASSWORD)@postgres:5432/foxhunt"
|
|
- name: REDIS_URL
|
|
value: "redis://redis:6379"
|
|
- name: JWT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: jwt-secret
|
|
key: secret
|
|
- name: JWT_ISSUER
|
|
value: foxhunt-api
|
|
- name: JWT_AUDIENCE
|
|
value: foxhunt-services
|
|
- name: IBKR_HOST
|
|
value: "ib-gateway"
|
|
- name: IBKR_PORT
|
|
value: "4002"
|
|
- name: IBKR_CLIENT_ID
|
|
value: "2"
|
|
- name: IBKR_ACCOUNT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: ibkr-credentials
|
|
key: account-id
|
|
- name: RUST_LOG
|
|
value: "info,opentelemetry=warn,h2=warn,tonic=warn,hyper=warn"
|
|
- name: OTEL_EXPORTER_OTLP_ENDPOINT
|
|
value: "http://tempo.foxhunt.svc.cluster.local:4317"
|
|
volumeMounts:
|
|
- name: binaries
|
|
mountPath: /binaries
|
|
readOnly: true
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- grpc_health_probe
|
|
- -addr=localhost:50056
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- grpc_health_probe
|
|
- -addr=localhost:50056
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 15
|
|
failureThreshold: 5
|
|
resources:
|
|
requests:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
volumes:
|
|
- name: binaries
|
|
emptyDir:
|
|
sizeLimit: 200Mi
|
|
- name: tmp
|
|
emptyDir:
|
|
sizeLimit: 50Mi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: broker-gateway
|
|
namespace: foxhunt
|
|
labels:
|
|
app.kubernetes.io/name: broker-gateway
|
|
app.kubernetes.io/part-of: foxhunt
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/name: broker-gateway
|
|
ports:
|
|
- port: 50056
|
|
targetPort: 50056
|
|
name: grpc
|
|
- port: 9096
|
|
targetPort: 9096
|
|
name: metrics
|