apiVersion: v1 kind: PersistentVolumeClaim metadata: name: funasr-cache labels: app.kubernetes.io/name: funasr-api app.kubernetes.io/component: cache spec: accessModes: - ReadWriteOnce resources: requests: storage: 20Gi --- apiVersion: v1 kind: ConfigMap metadata: name: funasr-api-config labels: app.kubernetes.io/name: funasr-api app.kubernetes.io/component: api data: FUNASR_PORT: "8000" FUNASR_DEVICE: "cpu" FUNASR_MODEL: "sensevoice" --- apiVersion: apps/v1 kind: Deployment metadata: name: funasr-api labels: app.kubernetes.io/name: funasr-api app.kubernetes.io/component: api spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app.kubernetes.io/name: funasr-api app.kubernetes.io/component: api template: metadata: labels: app.kubernetes.io/name: funasr-api app.kubernetes.io/component: api spec: containers: - name: funasr-api image: funasr-api:local imagePullPolicy: IfNotPresent envFrom: - configMapRef: name: funasr-api-config ports: - name: http containerPort: 8000 readinessProbe: httpGet: path: /health port: http periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 livenessProbe: httpGet: path: /health port: http periodSeconds: 30 timeoutSeconds: 5 failureThreshold: 3 startupProbe: httpGet: path: /health port: http periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 60 resources: requests: cpu: "2" memory: 8Gi limits: memory: 16Gi volumeMounts: - name: cache mountPath: /root/.cache - name: dshm mountPath: /dev/shm volumes: - name: cache persistentVolumeClaim: claimName: funasr-cache - name: dshm emptyDir: medium: Memory sizeLimit: 2Gi --- apiVersion: v1 kind: Service metadata: name: funasr-api labels: app.kubernetes.io/name: funasr-api app.kubernetes.io/component: api spec: type: ClusterIP selector: app.kubernetes.io/name: funasr-api app.kubernetes.io/component: api ports: - name: http port: 8000 targetPort: http