93 lines
2.0 KiB
YAML
93 lines
2.0 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: server
|
|
labels:
|
|
app.kubernetes.io/component: server
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/component: server
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/component: server
|
|
spec:
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
# Image only supports amd64
|
|
- key: kubernetes.io/arch
|
|
operator: In
|
|
values:
|
|
- amd64
|
|
containers:
|
|
- name: openedai-speech
|
|
image: ghcr.io/matatonic/openedai-speech
|
|
ports:
|
|
- name: http
|
|
containerPort: 8000
|
|
resources:
|
|
requests:
|
|
cpu: 500m
|
|
memory: 1Gi
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 1Gi
|
|
volumeMounts:
|
|
- name: server-voices-pv
|
|
mountPath: /app/voices
|
|
- name: server-config-pv
|
|
mountPath: /app/config
|
|
volumes:
|
|
- name: server-voices-pv
|
|
persistentVolumeClaim:
|
|
claimName: server-voices-pvc
|
|
- name: server-config-pv
|
|
persistentVolumeClaim:
|
|
claimName: server-config-pvc
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: server-voices-pvc
|
|
labels:
|
|
app.kubernetes.io/name: server
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 5Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: server-config-pvc
|
|
labels:
|
|
app.kubernetes.io/name: server
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 1Gi
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: server
|
|
labels:
|
|
app.kubernetes.io/component: server
|
|
spec:
|
|
selector:
|
|
app.kubernetes.io/component: server
|
|
ports:
|
|
- name: http
|
|
port: 8000
|
|
targetPort: http |