openshift.yaml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. apiVersion: image.openshift.io/v1
  2. kind: ImageStream
  3. metadata:
  4. name: kokoro-tts
  5. namespace: localai
  6. ---
  7. apiVersion: build.openshift.io/v1
  8. kind: BuildConfig
  9. metadata:
  10. name: kokoro-tts
  11. namespace: localai
  12. spec:
  13. runPolicy: Serial
  14. source:
  15. type: Binary
  16. binary: {}
  17. strategy:
  18. type: Docker
  19. dockerStrategy: {}
  20. output:
  21. to:
  22. kind: ImageStreamTag
  23. name: kokoro-tts:cpu
  24. resources:
  25. requests:
  26. cpu: '1'
  27. memory: 2Gi
  28. limits:
  29. cpu: '4'
  30. memory: 6Gi
  31. ---
  32. apiVersion: apps/v1
  33. kind: Deployment
  34. metadata:
  35. name: kokoro-tts
  36. namespace: localai
  37. spec:
  38. replicas: 1
  39. strategy:
  40. type: Recreate
  41. selector:
  42. matchLabels:
  43. app: kokoro-tts
  44. template:
  45. metadata:
  46. labels:
  47. app: kokoro-tts
  48. spec:
  49. nodeSelector:
  50. kubernetes.io/hostname: bureau.local.pentou.ovh
  51. automountServiceAccountToken: false
  52. containers:
  53. - name: tts
  54. image: image-registry.openshift-image-registry.svc:5000/localai/kokoro-tts:cpu
  55. ports:
  56. - containerPort: 8000
  57. resources:
  58. requests:
  59. cpu: '2'
  60. memory: 2Gi
  61. limits:
  62. cpu: '4'
  63. memory: 4Gi
  64. securityContext:
  65. allowPrivilegeEscalation: false
  66. capabilities:
  67. drop: [ALL]
  68. runAsNonRoot: true
  69. seccompProfile:
  70. type: RuntimeDefault
  71. startupProbe:
  72. httpGet:
  73. path: /healthz
  74. port: 8000
  75. periodSeconds: 5
  76. failureThreshold: 60
  77. readinessProbe:
  78. httpGet:
  79. path: /healthz
  80. port: 8000
  81. periodSeconds: 5
  82. livenessProbe:
  83. httpGet:
  84. path: /healthz
  85. port: 8000
  86. periodSeconds: 20
  87. timeoutSeconds: 5
  88. ---
  89. apiVersion: v1
  90. kind: Service
  91. metadata:
  92. name: kokoro-tts
  93. namespace: localai
  94. spec:
  95. selector:
  96. app: kokoro-tts
  97. ports:
  98. - port: 8000
  99. targetPort: 8000
  100. ---
  101. apiVersion: networking.k8s.io/v1
  102. kind: NetworkPolicy
  103. metadata:
  104. name: kokoro-tts-ingress
  105. namespace: localai
  106. spec:
  107. podSelector:
  108. matchLabels:
  109. app: kokoro-tts
  110. policyTypes: [Ingress]
  111. ingress:
  112. - from:
  113. - podSelector:
  114. matchLabels:
  115. app: satoko-chatbot
  116. ports:
  117. - protocol: TCP
  118. port: 8000