Files
infra-k8/deploy/k8s/10-ml.yaml
T

108 lines
2.6 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
containers:
- name: ml
image: git.noelsabia.dev/noelsabia/pulsecast-ml:gate1
imagePullPolicy: IfNotPresent
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
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