Files
TtsSpeaker/server/deploy.yaml

102 lines
2.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: tts-server
namespace: youlai
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: tts-server
template:
metadata:
labels:
app: tts-server
spec:
securityContext:
runAsNonRoot: true
runAsUser: 65534
fsGroup: 65534
containers:
- name: tts-server
image: docker.io/library/tts-server:admin-20261123-1
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
env:
- name: TTS_ADMIN_TOKEN
valueFrom:
secretKeyRef:
name: tts-server-admin
key: token
- name: TTS_REQUIRE_AUTH
value: "1"
- name: TTS_API_TOKEN
valueFrom:
secretKeyRef:
name: tts-server-auth
key: token
- name: TTS_VOICES
value: /voices
- name: TTS_CACHE
value: /cache
- name: TTS_THREADS
value: "2"
- name: TTS_QUEUE
value: "2"
- name: TTS_MAX_TEXT
value: "300"
- name: GOMEMLIMIT
value: 64MiB
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 1500m
memory: 512Mi
readinessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 12
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
failureThreshold: 3
volumeMounts:
- name: voices
mountPath: /voices
readOnly: false
- name: cache
mountPath: /cache
volumes:
- name: voices
hostPath:
path: /opt/tts/voices
type: Directory
- name: cache
emptyDir:
sizeLimit: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: tts-server
namespace: youlai
spec:
type: NodePort
selector:
app: tts-server
ports:
- name: http
port: 8080
targetPort: 8080
nodePort: 30810