diff --git a/k8s-deploy/lightrag/templates/_helpers.tpl b/k8s-deploy/lightrag/templates/_helpers.tpl index 2b2c23ae..63b8ef7c 100644 --- a/k8s-deploy/lightrag/templates/_helpers.tpl +++ b/k8s-deploy/lightrag/templates/_helpers.tpl @@ -40,3 +40,14 @@ app.kubernetes.io/instance: {{ .Release.Name }} {{ $key }}={{ $val }} {{- end -}} {{- end -}} + +{{/* +Pod-specific labels +*/}} +{{- define "lightrag.apoloPodLabels" -}} +{{- if .Values.podLabels -}} +{{- range $key, $value := .Values.podLabels }} +{{ $key }}: {{ $value }} +{{- end }} +{{- end -}} +{{- end -}} diff --git a/k8s-deploy/lightrag/templates/deployment.yaml b/k8s-deploy/lightrag/templates/deployment.yaml index d804b79c..961c441e 100644 --- a/k8s-deploy/lightrag/templates/deployment.yaml +++ b/k8s-deploy/lightrag/templates/deployment.yaml @@ -15,7 +15,20 @@ spec: checksum/config: {{ include "lightrag.envContent" . | sha256sum }} labels: {{- include "lightrag.selectorLabels" . | nindent 8 }} + {{- include "lightrag.apoloPodLabels" . | nindent 8 }} spec: + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" diff --git a/k8s-deploy/lightrag/values.yaml b/k8s-deploy/lightrag/values.yaml index b982e4b8..b1c74a11 100644 --- a/k8s-deploy/lightrag/values.yaml +++ b/k8s-deploy/lightrag/values.yaml @@ -72,3 +72,13 @@ env: # Replace with your Qdrant credentials QDRANT_URL: http://qdrant-cluster-qdrant-qdrant:6333 # REDIS_URI: redis://default:${REDIS_PASSWORD}@redis-cluster-redis-redis:6379 + + +tolerations: + - key: platform.neuromation.io/job + operator: Exists + effect: NoSchedule + +affinity: {} + +nodeSelector: {} \ No newline at end of file