You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

infinity.yaml 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {{- if eq .Values.env.DOC_ENGINE "infinity" -}}
  2. apiVersion: v1
  3. kind: PersistentVolumeClaim
  4. metadata:
  5. name: {{ include "ragflow.fullname" . }}-infinity
  6. annotations:
  7. "helm.sh/resource-policy": keep
  8. labels:
  9. {{- include "ragflow.labels" . | nindent 4 }}
  10. app.kubernetes.io/component: infinity
  11. spec:
  12. {{- with .Values.infinity.storage.className }}
  13. storageClassName: {{ . }}
  14. {{- end }}
  15. accessModes:
  16. - ReadWriteOnce
  17. resources:
  18. requests:
  19. storage: {{ .Values.infinity.storage.capacity }}
  20. ---
  21. apiVersion: apps/v1
  22. kind: Deployment
  23. metadata:
  24. name: {{ include "ragflow.fullname" . }}-infinity
  25. labels:
  26. {{- include "ragflow.labels" . | nindent 4 }}
  27. app.kubernetes.io/component: infinity
  28. spec:
  29. replicas: 1
  30. selector:
  31. matchLabels:
  32. {{- include "ragflow.selectorLabels" . | nindent 6 }}
  33. app.kubernetes.io/component: infinity
  34. {{- with .Values.infinity.deployment.strategy }}
  35. strategy:
  36. {{- . | toYaml | nindent 4 }}
  37. {{- end }}
  38. template:
  39. metadata:
  40. labels:
  41. {{- include "ragflow.labels" . | nindent 8 }}
  42. app.kubernetes.io/component: infinity
  43. annotations:
  44. checksum/config: {{ include (print $.Template.BasePath "/env.yaml") . | sha256sum }}
  45. spec:
  46. containers:
  47. - name: infinity
  48. image: {{ .Values.infinity.image.repository }}:{{ .Values.infinity.image.tag }}
  49. envFrom:
  50. - secretRef:
  51. name: {{ include "ragflow.fullname" . }}-env-config
  52. ports:
  53. - containerPort: 23817
  54. name: thrift
  55. - containerPort: 23820
  56. name: http
  57. - containerPort: 5432
  58. name: psql
  59. volumeMounts:
  60. - mountPath: /var/infinity
  61. name: infinity-data
  62. {{- with .Values.infinity.deployment.resources }}
  63. resources:
  64. {{- . | toYaml | nindent 10 }}
  65. {{- end }}
  66. securityContext:
  67. capabilities:
  68. add:
  69. - "NET_BIND_SERVICE"
  70. seccompProfile:
  71. type: RuntimeDefault
  72. livenessProbe:
  73. httpGet:
  74. path: /admin/node/current
  75. port: 23820
  76. initialDelaySeconds: 60
  77. periodSeconds: 10
  78. timeoutSeconds: 10
  79. failureThreshold: 120
  80. volumes:
  81. - name: infinity-data
  82. persistentVolumeClaim:
  83. claimName: {{ include "ragflow.fullname" . }}-infinity
  84. ---
  85. apiVersion: v1
  86. kind: Service
  87. metadata:
  88. name: {{ include "ragflow.fullname" . }}-infinity
  89. labels:
  90. {{- include "ragflow.labels" . | nindent 4 }}
  91. app.kubernetes.io/component: infinity
  92. spec:
  93. selector:
  94. {{- include "ragflow.selectorLabels" . | nindent 6 }}
  95. app.kubernetes.io/component: infinity
  96. ports:
  97. - protocol: TCP
  98. port: 23817
  99. targetPort: thrift
  100. name: thrift
  101. - protocol: TCP
  102. port: 23820
  103. targetPort: http
  104. name: http
  105. - protocol: TCP
  106. port: 5432
  107. targetPort: psql
  108. name: psql
  109. type: {{ .Values.infinity.service.type }}
  110. {{- end -}}