Files
infra-k8/deploy/k8s/10-ml.yaml
T
Noel Sabia 339309cea6 fix: use Gitea owner noel for Gate 1 images
The live hello push proved the Gitea namespace is noel, not noelsabia.
- retag manifests and Makefile defaults to git.noelsabia.dev/noel/...
- record the verified hello pull in the runbook
- keep gate1-check defaults in sync
2026-11-14 06:18:08 +01:00

121 lines
3.1 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: ml
namespace: fch26-onemanarmy
labels:
app.kubernetes.io/name: ml
app.kubernetes.io/component: ml
app.kubernetes.io/part-of: pulsecast
spec:
replicas: 1
revisionHistoryLimit: 2
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: ml
template:
metadata:
labels:
app.kubernetes.io/name: ml
app.kubernetes.io/component: ml
app.kubernetes.io/part-of: pulsecast
spec:
automountServiceAccountToken: false
imagePullSecrets:
- name: gitea-regcred
securityContext:
seccompProfile:
type: RuntimeDefault
# Numeric UID is required: a non-numeric image user breaks runAsNonRoot
# (verified on SKE with curlimages/curl, 2026-11-14).
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001
containers:
- name: ml
image: git.noelsabia.dev/noel/pulsecast-ml:gate1
# Gate 1 reuses the `gate1` tag while iterating; Always makes a re-push visible.
# Switch to an immutable tag + IfNotPresent at deploy freeze.
imagePullPolicy: Always
ports:
- name: http
containerPort: 8000
protocol: TCP
envFrom:
- configMapRef:
name: ml-config
- configMapRef:
name: pulsecast-shared
env:
- name: HOME
value: /tmp
- name: MPLCONFIGDIR
value: /tmp
# Required by FastAPI /train; returns 503 when it is unset.
- name: CONTROL_TOKEN
valueFrom:
secretKeyRef:
name: control-auth
key: CONTROL_TOKEN
resources:
requests:
cpu: 200m
memory: 512Mi
limits:
cpu: "1"
memory: 1Gi
securityContext:
runAsNonRoot: true
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
volumeMounts:
- name: tmp
mountPath: /tmp
startupProbe:
httpGet:
path: /healthz
port: http
periodSeconds: 2
failureThreshold: 60
livenessProbe:
httpGet:
path: /healthz
port: http
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
readinessProbe:
httpGet:
path: /readyz
port: http
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 2
terminationGracePeriodSeconds: 30
volumes:
- name: tmp
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: ml
namespace: fch26-onemanarmy
labels:
app.kubernetes.io/name: ml
app.kubernetes.io/part-of: pulsecast
spec:
type: ClusterIP
selector:
app.kubernetes.io/name: ml
ports:
- name: http
port: 8000
targetPort: http
protocol: TCP