Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

infinity.yaml 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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: StatefulSet
  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. {{- if or .Values.imagePullSecrets .Values.infinity.image.pullSecrets }}
  47. imagePullSecrets:
  48. {{- with .Values.imagePullSecrets }}
  49. {{- toYaml . | nindent 8 }}
  50. {{- end }}
  51. {{- with .Values.infinity.image.pullSecrets }}
  52. {{- toYaml . | nindent 8 }}
  53. {{- end }}
  54. {{- end }}
  55. containers:
  56. - name: infinity
  57. image: {{ .Values.infinity.image.repository }}:{{ .Values.infinity.image.tag }}
  58. {{- with .Values.infinity.image.pullPolicy }}
  59. imagePullPolicy: {{ . }}
  60. {{- end }}
  61. envFrom:
  62. - secretRef:
  63. name: {{ include "ragflow.fullname" . }}-env-config
  64. ports:
  65. - containerPort: 23817
  66. name: thrift
  67. - containerPort: 23820
  68. name: http
  69. - containerPort: 5432
  70. name: psql
  71. volumeMounts:
  72. - mountPath: /var/infinity
  73. name: infinity-data
  74. {{- with .Values.infinity.deployment.resources }}
  75. resources:
  76. {{- . | toYaml | nindent 10 }}
  77. {{- end }}
  78. securityContext:
  79. capabilities:
  80. add:
  81. - "NET_BIND_SERVICE"
  82. seccompProfile:
  83. type: RuntimeDefault
  84. livenessProbe:
  85. httpGet:
  86. path: /admin/node/current
  87. port: 23820
  88. initialDelaySeconds: 60
  89. periodSeconds: 10
  90. timeoutSeconds: 10
  91. failureThreshold: 120
  92. volumes:
  93. - name: infinity-data
  94. persistentVolumeClaim:
  95. claimName: {{ include "ragflow.fullname" . }}-infinity
  96. ---
  97. apiVersion: v1
  98. kind: Service
  99. metadata:
  100. name: {{ include "ragflow.fullname" . }}-infinity
  101. labels:
  102. {{- include "ragflow.labels" . | nindent 4 }}
  103. app.kubernetes.io/component: infinity
  104. spec:
  105. selector:
  106. {{- include "ragflow.selectorLabels" . | nindent 6 }}
  107. app.kubernetes.io/component: infinity
  108. ports:
  109. - protocol: TCP
  110. port: 23817
  111. targetPort: thrift
  112. name: thrift
  113. - protocol: TCP
  114. port: 23820
  115. targetPort: http
  116. name: http
  117. - protocol: TCP
  118. port: 5432
  119. targetPort: psql
  120. name: psql
  121. type: {{ .Values.infinity.service.type }}
  122. {{- end -}}