From 33e14c342b08d45d310ea0a78e0ebca1c0c05698 Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Fri, 11 Apr 2025 14:38:40 +0200 Subject: [PATCH] add pvc for vector --- .../supabase/templates/vector/deployment.yaml | 7 ++++++ charts/supabase/templates/vector/volume.yaml | 23 +++++++++++++++++++ charts/supabase/values.yaml | 7 ++++++ 3 files changed, 37 insertions(+) create mode 100644 charts/supabase/templates/vector/volume.yaml diff --git a/charts/supabase/templates/vector/deployment.yaml b/charts/supabase/templates/vector/deployment.yaml index 911ff08..5f10f8f 100644 --- a/charts/supabase/templates/vector/deployment.yaml +++ b/charts/supabase/templates/vector/deployment.yaml @@ -81,6 +81,10 @@ spec: - mountPath: /etc/vector/secret.sh name: vector-config subPath: secret.sh + - mountPath: /var/log/pods + name: vector-volume + subPath: pods + {{- with .Values.vector.resources }} resources: {{- toYaml . | nindent 12 }} @@ -93,6 +97,9 @@ spec: configMap: name: {{ include "supabase.vector.fullname" . }}-config defaultMode: 0777 + - name: vector-volume + persistentVolumeClaim: + claimName: {{ include "supabase.vector.fullname" . }}-pvc {{- with .Values.vector.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/supabase/templates/vector/volume.yaml b/charts/supabase/templates/vector/volume.yaml new file mode 100644 index 0000000..543e7a2 --- /dev/null +++ b/charts/supabase/templates/vector/volume.yaml @@ -0,0 +1,23 @@ +{{- if .Values.vector.enabled -}} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "supabase.vector.fullname" . }}-pvc + labels: + {{- include "supabase.labels" . | nindent 4 }} + {{- with .Values.db.persistence.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if .Values.vector.persistence.storageClassName }} + storageClassName: {{ .Values.vector.persistence.storageClassName }} + {{- end }} + accessModes: + {{- range .Values.vector.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + resources: + requests: + storage: {{ .Values.vector.persistence.size | quote }} +{{- end }} \ No newline at end of file diff --git a/charts/supabase/values.yaml b/charts/supabase/values.yaml index 42c4103..3825a94 100644 --- a/charts/supabase/values.yaml +++ b/charts/supabase/values.yaml @@ -978,6 +978,13 @@ vector: # readOnlyRootFilesystem: true # runAsNonRoot: true runAsUser: 65534 + persistence: + storageClassName: "ceph-block" + annotations: {} + size: 2Gi + accessModes: + - ReadWriteOnce + service: type: ClusterIP port: 9001 -- GitLab