Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ragflow.yaml 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. ---
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: {{ include "ragflow.fullname" . }}
  6. labels:
  7. {{- include "ragflow.labels" . | nindent 4 }}
  8. app.kubernetes.io/component: ragflow
  9. spec:
  10. replicas: 1
  11. selector:
  12. matchLabels:
  13. {{- include "ragflow.selectorLabels" . | nindent 6 }}
  14. app.kubernetes.io/component: ragflow
  15. {{- with .Values.ragflow.deployment.strategy }}
  16. strategy:
  17. {{- . | toYaml | nindent 4 }}
  18. {{- end }}
  19. template:
  20. metadata:
  21. labels:
  22. {{- include "ragflow.labels" . | nindent 8 }}
  23. app.kubernetes.io/component: ragflow
  24. annotations:
  25. checksum/config-env: {{ include (print $.Template.BasePath "/env.yaml") . | sha256sum }}
  26. checksum/config-ragflow: {{ include (print $.Template.BasePath "/ragflow_config.yaml") . | sha256sum }}
  27. spec:
  28. {{- if or .Values.imagePullSecrets .Values.ragflow.image.pullSecrets }}
  29. imagePullSecrets:
  30. {{- with .Values.imagePullSecrets }}
  31. {{- toYaml . | nindent 8 }}
  32. {{- end }}
  33. {{- with .Values.ragflow.image.pullSecrets }}
  34. {{- toYaml . | nindent 8 }}
  35. {{- end }}
  36. {{- end }}
  37. containers:
  38. - name: ragflow
  39. image: {{ .Values.ragflow.image.repository }}:{{ .Values.ragflow.image.tag }}
  40. {{- with .Values.ragflow.image.pullPolicy }}
  41. imagePullPolicy: {{ . }}
  42. {{- end }}
  43. ports:
  44. - containerPort: 80
  45. name: http
  46. - containerPort: 9380
  47. name: http-api
  48. volumeMounts:
  49. - mountPath: /etc/nginx/conf.d/ragflow.conf
  50. subPath: ragflow.conf
  51. name: nginx-config-volume
  52. - mountPath: /etc/nginx/proxy.conf
  53. subPath: proxy.conf
  54. name: nginx-config-volume
  55. - mountPath: /etc/nginx/nginx.conf
  56. subPath: nginx.conf
  57. name: nginx-config-volume
  58. {{- with .Values.ragflow.service_conf }}
  59. - mountPath: /ragflow/conf/local.service_conf.yaml
  60. subPath: local.service_conf.yaml
  61. name: service-conf-volume
  62. {{- end }}
  63. {{- with .Values.ragflow.llm_factories }}
  64. - mountPath: /ragflow/conf/llm_factories.json
  65. subPath: llm_factories.json
  66. name: service-conf-volume
  67. {{- end }}
  68. envFrom:
  69. - secretRef:
  70. name: {{ include "ragflow.fullname" . }}-env-config
  71. {{- with .Values.ragflow.deployment.resources }}
  72. resources:
  73. {{- . | toYaml | nindent 10 }}
  74. {{- end }}
  75. volumes:
  76. - name: nginx-config-volume
  77. configMap:
  78. name: nginx-config
  79. - name: service-conf-volume
  80. configMap:
  81. name: ragflow-service-config
  82. ---
  83. apiVersion: v1
  84. kind: Service
  85. metadata:
  86. name: {{ include "ragflow.fullname" . }}
  87. labels:
  88. {{- include "ragflow.labels" . | nindent 4 }}
  89. app.kubernetes.io/component: ragflow
  90. spec:
  91. selector:
  92. {{- include "ragflow.selectorLabels" . | nindent 4 }}
  93. app.kubernetes.io/component: ragflow
  94. ports:
  95. - protocol: TCP
  96. port: 80
  97. targetPort: http
  98. name: http
  99. type: {{ .Values.ragflow.service.type }}
  100. ---
  101. {{- if .Values.ragflow.api.service.enabled }}
  102. apiVersion: v1
  103. kind: Service
  104. metadata:
  105. name: {{ .Release.Name }}-api
  106. labels:
  107. {{- include "ragflow.labels" . | nindent 4 }}
  108. app.kubernetes.io/component: ragflow
  109. spec:
  110. selector:
  111. {{- include "ragflow.selectorLabels" . | nindent 4 }}
  112. app.kubernetes.io/component: ragflow
  113. ports:
  114. - protocol: TCP
  115. port: 80
  116. targetPort: http-api
  117. name: http-api
  118. type: {{ .Values.ragflow.api.service.type }}
  119. {{- end }}