Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

ragflow.yaml 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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. containers:
  29. - name: ragflow
  30. image: {{ .Values.env.RAGFLOW_IMAGE }}
  31. ports:
  32. - containerPort: 80
  33. name: http
  34. - containerPort: 9380
  35. name: http-api
  36. volumeMounts:
  37. - mountPath: /etc/nginx/conf.d/ragflow.conf
  38. subPath: ragflow.conf
  39. name: nginx-config-volume
  40. - mountPath: /etc/nginx/proxy.conf
  41. subPath: proxy.conf
  42. name: nginx-config-volume
  43. - mountPath: /etc/nginx/nginx.conf
  44. subPath: nginx.conf
  45. name: nginx-config-volume
  46. {{- with .Values.ragflow.service_conf }}
  47. - mountPath: /ragflow/conf/local.service_conf.yaml
  48. subPath: local.service_conf.yaml
  49. name: service-conf-volume
  50. {{- end }}
  51. {{- with .Values.ragflow.llm_factories }}
  52. - mountPath: /ragflow/conf/llm_factories.json
  53. subPath: llm_factories.json
  54. name: service-conf-volume
  55. {{- end }}
  56. envFrom:
  57. - secretRef:
  58. name: {{ include "ragflow.fullname" . }}-env-config
  59. {{- with .Values.ragflow.deployment.resources }}
  60. resources:
  61. {{- . | toYaml | nindent 10 }}
  62. {{- end }}
  63. volumes:
  64. - name: nginx-config-volume
  65. configMap:
  66. name: nginx-config
  67. - name: service-conf-volume
  68. configMap:
  69. name: ragflow-service-config
  70. ---
  71. apiVersion: v1
  72. kind: Service
  73. metadata:
  74. name: {{ include "ragflow.fullname" . }}
  75. labels:
  76. {{- include "ragflow.labels" . | nindent 4 }}
  77. app.kubernetes.io/component: ragflow
  78. spec:
  79. selector:
  80. {{- include "ragflow.selectorLabels" . | nindent 4 }}
  81. app.kubernetes.io/component: ragflow
  82. ports:
  83. - protocol: TCP
  84. port: 80
  85. targetPort: http
  86. name: http
  87. type: {{ .Values.ragflow.service.type }}
  88. ---
  89. {{- if .Values.ragflow.api.service.enabled }}
  90. apiVersion: v1
  91. kind: Service
  92. metadata:
  93. name: {{ .Release.Name }}-api
  94. labels:
  95. {{- include "ragflow.labels" . | nindent 4 }}
  96. app.kubernetes.io/component: ragflow
  97. spec:
  98. selector:
  99. {{- include "ragflow.selectorLabels" . | nindent 4 }}
  100. app.kubernetes.io/component: ragflow
  101. ports:
  102. - protocol: TCP
  103. port: 80
  104. targetPort: http-api
  105. name: http-api
  106. type: {{ .Values.ragflow.api.service.type }}
  107. {{- end }}