mirror of
https://github.com/outbackdingo/qdrant-helm.git
synced 2026-01-27 10:20:18 +00:00
support single node snapshots restoration
This commit is contained in:
@@ -61,3 +61,9 @@ Increase the number of replicas to the desired number of nodes and set `config.c
|
||||
|
||||
Depending on your environment or cloud provider you might need to change the service in the `values.yaml` as well.
|
||||
For example on AWS EKS you would need to change the `cluster.type` to `NodePort`.
|
||||
|
||||
### Snapshot Restoration
|
||||
|
||||
Disclaimer: Snapshot restoration is only supported for single qdrant node setups
|
||||
|
||||
To restore a snapshot create a Persistent Volume and a Persistent Volume Claim using a storage class according to your setup, copy the snapshots to the PV, enable snapshot restoration along with the snapshot file names and pvc name in values.yaml file and run the helm install command.
|
||||
|
||||
@@ -6,11 +6,16 @@ data:
|
||||
initialize.sh: |
|
||||
#!/bin/sh
|
||||
SET_INDEX=${HOSTNAME##*-}
|
||||
{{- if and (.Values.snapshotRestoration.enabled) (eq (.Values.replicaCount | quote) (1 | quote)) }}
|
||||
echo "Starting initializing for pod $SET_INDEX and snapshots restoration"
|
||||
./qdrant {{ range .Values.snapshotRestoration.snapshots }} --snapshot {{ . }} {{ end }}
|
||||
{{- else }}
|
||||
echo "Starting initializing for pod $SET_INDEX"
|
||||
if [ "$SET_INDEX" = "0" ]; then
|
||||
./qdrant --uri 'http://{{ include "qdrant.fullname" . }}-0.{{ include "qdrant.fullname" . }}-headless:6335'
|
||||
else
|
||||
./qdrant --bootstrap 'http://{{ include "qdrant.fullname" . }}-0.{{ include "qdrant.fullname" . }}-headless:6335' --uri 'http://{{ include "qdrant.fullname" . }}-'"$SET_INDEX"'.{{ include "qdrant.fullname" . }}-headless:6335'
|
||||
fi
|
||||
{{ end }}
|
||||
production.yaml: |
|
||||
{{- toYaml .Values.config | nindent 4 }}
|
||||
|
||||
@@ -84,6 +84,8 @@ spec:
|
||||
- name: qdrant-config
|
||||
mountPath: /qdrant/config/production.yaml
|
||||
subPath: production.yaml
|
||||
- name: qdrant-snapshots
|
||||
mountPath: /qdrant/snapshots
|
||||
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
@@ -102,6 +104,9 @@ spec:
|
||||
configMap:
|
||||
name: {{ include "qdrant.fullname" . }}
|
||||
defaultMode: 0755
|
||||
- name: qdrant-snapshots
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.snapshotRestoration.pvcName }}
|
||||
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
|
||||
@@ -68,6 +68,13 @@ persistence:
|
||||
size: 1Gi
|
||||
#storageClassName: local-path
|
||||
|
||||
#only supported for single node qdrant clusters.
|
||||
snapshotRestoration:
|
||||
enabled: true
|
||||
pvcName: snapshots-pvc
|
||||
snapshots:
|
||||
- /qdrant/snapshots/test_collection/test_collection-2022-10-24-13-56-50.snapshot:test_collection
|
||||
|
||||
#modification example for configuration to overwrite defaults
|
||||
config:
|
||||
cluster:
|
||||
|
||||
Reference in New Issue
Block a user