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.

ragflow.yaml 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. envFrom:
  47. - secretRef:
  48. name: {{ include "ragflow.fullname" . }}-env-config
  49. {{- with .Values.ragflow.deployment.resources }}
  50. resources:
  51. {{- . | toYaml | nindent 10 }}
  52. {{- end }}
  53. volumes:
  54. - name: nginx-config-volume
  55. configMap:
  56. name: nginx-config
  57. ---
  58. apiVersion: v1
  59. kind: Service
  60. metadata:
  61. name: {{ include "ragflow.fullname" . }}
  62. labels:
  63. {{- include "ragflow.labels" . | nindent 4 }}
  64. app.kubernetes.io/component: ragflow
  65. spec:
  66. selector:
  67. {{- include "ragflow.selectorLabels" . | nindent 4 }}
  68. app.kubernetes.io/component: ragflow
  69. ports:
  70. - protocol: TCP
  71. port: 80
  72. targetPort: http
  73. name: http
  74. type: {{ .Values.ragflow.service.type }}
  75. ---
  76. {{- if .Values.ragflow.api.service.enabled }}
  77. apiVersion: v1
  78. kind: Service
  79. metadata:
  80. name: {{ .Release.Name }}-api
  81. labels:
  82. {{- include "ragflow.labels" . | nindent 4 }}
  83. app.kubernetes.io/component: ragflow
  84. spec:
  85. selector:
  86. {{- include "ragflow.selectorLabels" . | nindent 4 }}
  87. app.kubernetes.io/component: ragflow
  88. ports:
  89. - protocol: TCP
  90. port: 80
  91. targetPort: http-api
  92. name: http-api
  93. type: {{ .Values.ragflow.api.service.type }}
  94. {{- end }}