qdrant
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
.git
|
||||||
|
.github
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## [qdrant-1.18.0](https://github.com/qdrant/qdrant-helm/tree/qdrant-1.18.0) (2026-05-11)
|
||||||
|
|
||||||
|
- Update Qdrant to v1.18.0
|
||||||
|
- Add support for setting `terminationGracePeriodSeconds` [#449](https://github.com/qdrant/qdrant-helm/pull/449)
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
annotations:
|
||||||
|
artifacthub.io/category: database
|
||||||
|
artifacthub.io/changes: |
|
||||||
|
- kind: added
|
||||||
|
description: Update Qdrant to v1.18.0
|
||||||
|
- kind: added
|
||||||
|
description: Add support for setting terminationGracePeriodSeconds
|
||||||
|
links:
|
||||||
|
- name: GitHub Pull Request
|
||||||
|
url: https://github.com/qdrant/qdrant-helm/pull/449
|
||||||
|
apiVersion: v2
|
||||||
|
appVersion: v1.18.0
|
||||||
|
description: Qdrant - Vector Database for the next generation of AI applications.
|
||||||
|
home: https://qdrant.tech
|
||||||
|
icon: https://qdrant.github.io/qdrant-helm/logo_with_text.svg
|
||||||
|
keywords:
|
||||||
|
- vector database
|
||||||
|
maintainers:
|
||||||
|
- email: info@qdrant.com
|
||||||
|
name: qdrant
|
||||||
|
url: https://github.com/qdrant
|
||||||
|
name: qdrant
|
||||||
|
sources:
|
||||||
|
- https://github.com/qdrant/qdrant
|
||||||
|
- https://github.com/qdrant/qdrant-helm
|
||||||
|
type: application
|
||||||
|
version: 1.18.0
|
||||||
+201
@@ -0,0 +1,201 @@
|
|||||||
|
Apache License
|
||||||
|
Version 2.0, January 2004
|
||||||
|
http://www.apache.org/licenses/
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||||
|
|
||||||
|
1. Definitions.
|
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction,
|
||||||
|
and distribution as defined by Sections 1 through 9 of this document.
|
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by
|
||||||
|
the copyright owner that is granting the License.
|
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all
|
||||||
|
other entities that control, are controlled by, or are under common
|
||||||
|
control with that entity. For the purposes of this definition,
|
||||||
|
"control" means (i) the power, direct or indirect, to cause the
|
||||||
|
direction or management of such entity, whether by contract or
|
||||||
|
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||||
|
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity
|
||||||
|
exercising permissions granted by this License.
|
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications,
|
||||||
|
including but not limited to software source code, documentation
|
||||||
|
source, and configuration files.
|
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical
|
||||||
|
transformation or translation of a Source form, including but
|
||||||
|
not limited to compiled object code, generated documentation,
|
||||||
|
and conversions to other media types.
|
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or
|
||||||
|
Object form, made available under the License, as indicated by a
|
||||||
|
copyright notice that is included in or attached to the work
|
||||||
|
(an example is provided in the Appendix below).
|
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object
|
||||||
|
form, that is based on (or derived from) the Work and for which the
|
||||||
|
editorial revisions, annotations, elaborations, or other modifications
|
||||||
|
represent, as a whole, an original work of authorship. For the purposes
|
||||||
|
of this License, Derivative Works shall not include works that remain
|
||||||
|
separable from, or merely link (or bind by name) to the interfaces of,
|
||||||
|
the Work and Derivative Works thereof.
|
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including
|
||||||
|
the original version of the Work and any modifications or additions
|
||||||
|
to that Work or Derivative Works thereof, that is intentionally
|
||||||
|
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||||
|
or by an individual or Legal Entity authorized to submit on behalf of
|
||||||
|
the copyright owner. For the purposes of this definition, "submitted"
|
||||||
|
means any form of electronic, verbal, or written communication sent
|
||||||
|
to the Licensor or its representatives, including but not limited to
|
||||||
|
communication on electronic mailing lists, source code control systems,
|
||||||
|
and issue tracking systems that are managed by, or on behalf of, the
|
||||||
|
Licensor for the purpose of discussing and improving the Work, but
|
||||||
|
excluding communication that is conspicuously marked or otherwise
|
||||||
|
designated in writing by the copyright owner as "Not a Contribution."
|
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||||
|
on behalf of whom a Contribution has been received by Licensor and
|
||||||
|
subsequently incorporated within the Work.
|
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
copyright license to reproduce, prepare Derivative Works of,
|
||||||
|
publicly display, publicly perform, sublicense, and distribute the
|
||||||
|
Work and such Derivative Works in Source or Object form.
|
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of
|
||||||
|
this License, each Contributor hereby grants to You a perpetual,
|
||||||
|
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||||
|
(except as stated in this section) patent license to make, have made,
|
||||||
|
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||||
|
where such license applies only to those patent claims licensable
|
||||||
|
by such Contributor that are necessarily infringed by their
|
||||||
|
Contribution(s) alone or by combination of their Contribution(s)
|
||||||
|
with the Work to which such Contribution(s) was submitted. If You
|
||||||
|
institute patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||||
|
or a Contribution incorporated within the Work constitutes direct
|
||||||
|
or contributory patent infringement, then any patent licenses
|
||||||
|
granted to You under this License for that Work shall terminate
|
||||||
|
as of the date such litigation is filed.
|
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the
|
||||||
|
Work or Derivative Works thereof in any medium, with or without
|
||||||
|
modifications, and in Source or Object form, provided that You
|
||||||
|
meet the following conditions:
|
||||||
|
|
||||||
|
(a) You must give any other recipients of the Work or
|
||||||
|
Derivative Works a copy of this License; and
|
||||||
|
|
||||||
|
(b) You must cause any modified files to carry prominent notices
|
||||||
|
stating that You changed the files; and
|
||||||
|
|
||||||
|
(c) You must retain, in the Source form of any Derivative Works
|
||||||
|
that You distribute, all copyright, patent, trademark, and
|
||||||
|
attribution notices from the Source form of the Work,
|
||||||
|
excluding those notices that do not pertain to any part of
|
||||||
|
the Derivative Works; and
|
||||||
|
|
||||||
|
(d) If the Work includes a "NOTICE" text file as part of its
|
||||||
|
distribution, then any Derivative Works that You distribute must
|
||||||
|
include a readable copy of the attribution notices contained
|
||||||
|
within such NOTICE file, excluding those notices that do not
|
||||||
|
pertain to any part of the Derivative Works, in at least one
|
||||||
|
of the following places: within a NOTICE text file distributed
|
||||||
|
as part of the Derivative Works; within the Source form or
|
||||||
|
documentation, if provided along with the Derivative Works; or,
|
||||||
|
within a display generated by the Derivative Works, if and
|
||||||
|
wherever such third-party notices normally appear. The contents
|
||||||
|
of the NOTICE file are for informational purposes only and
|
||||||
|
do not modify the License. You may add Your own attribution
|
||||||
|
notices within Derivative Works that You distribute, alongside
|
||||||
|
or as an addendum to the NOTICE text from the Work, provided
|
||||||
|
that such additional attribution notices cannot be construed
|
||||||
|
as modifying the License.
|
||||||
|
|
||||||
|
You may add Your own copyright statement to Your modifications and
|
||||||
|
may provide additional or different license terms and conditions
|
||||||
|
for use, reproduction, or distribution of Your modifications, or
|
||||||
|
for any such Derivative Works as a whole, provided Your use,
|
||||||
|
reproduction, and distribution of the Work otherwise complies with
|
||||||
|
the conditions stated in this License.
|
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||||
|
any Contribution intentionally submitted for inclusion in the Work
|
||||||
|
by You to the Licensor shall be under the terms and conditions of
|
||||||
|
this License, without any additional terms or conditions.
|
||||||
|
Notwithstanding the above, nothing herein shall supersede or modify
|
||||||
|
the terms of any separate license agreement you may have executed
|
||||||
|
with Licensor regarding such Contributions.
|
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade
|
||||||
|
names, trademarks, service marks, or product names of the Licensor,
|
||||||
|
except as required for reasonable and customary use in describing the
|
||||||
|
origin of the Work and reproducing the content of the NOTICE file.
|
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||||
|
agreed to in writing, Licensor provides the Work (and each
|
||||||
|
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||||
|
implied, including, without limitation, any warranties or conditions
|
||||||
|
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||||
|
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||||
|
appropriateness of using or redistributing the Work and assume any
|
||||||
|
risks associated with Your exercise of permissions under this License.
|
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory,
|
||||||
|
whether in tort (including negligence), contract, or otherwise,
|
||||||
|
unless required by applicable law (such as deliberate and grossly
|
||||||
|
negligent acts) or agreed to in writing, shall any Contributor be
|
||||||
|
liable to You for damages, including any direct, indirect, special,
|
||||||
|
incidental, or consequential damages of any character arising as a
|
||||||
|
result of this License or out of the use or inability to use the
|
||||||
|
Work (including but not limited to damages for loss of goodwill,
|
||||||
|
work stoppage, computer failure or malfunction, or any and all
|
||||||
|
other commercial damages or losses), even if such Contributor
|
||||||
|
has been advised of the possibility of such damages.
|
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing
|
||||||
|
the Work or Derivative Works thereof, You may choose to offer,
|
||||||
|
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||||
|
or other liability obligations and/or rights consistent with this
|
||||||
|
License. However, in accepting such obligations, You may act only
|
||||||
|
on Your own behalf and on Your sole responsibility, not on behalf
|
||||||
|
of any other Contributor, and only if You agree to indemnify,
|
||||||
|
defend, and hold each Contributor harmless for any liability
|
||||||
|
incurred by, or claims asserted against, such Contributor by reason
|
||||||
|
of your accepting any such warranty or additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
@@ -0,0 +1,157 @@
|
|||||||
|
# Qdrant helm chart
|
||||||
|
|
||||||
|
[Qdrant documentation](https://qdrant.tech/documentation/)
|
||||||
|
|
||||||
|
## TLDR
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm repo add qdrant https://qdrant.github.io/qdrant-helm
|
||||||
|
helm repo update
|
||||||
|
helm upgrade -i your-qdrant-installation-name qdrant/qdrant
|
||||||
|
```
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This chart installs and bootstraps a Qdrant instance.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- Kubernetes v1.24+ (as you need grpc probe)
|
||||||
|
- Helm
|
||||||
|
- PV provisioner (by the infrastructure)
|
||||||
|
|
||||||
|
## Installation & Setup
|
||||||
|
|
||||||
|
You can install the chart from source via:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm upgrade -i your-qdrant-installation-name charts/qdrant
|
||||||
|
```
|
||||||
|
|
||||||
|
Uninstall via:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm uninstall your-qdrant-installation-name
|
||||||
|
```
|
||||||
|
|
||||||
|
Delete the volume with
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl delete pvc -l app.kubernetes.io/instance=your-qdrant-installation-name
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
For documentation of the settings please refer to [Qdrant Configuration File](https://github.com/qdrant/qdrant/blob/master/config/config.yaml)
|
||||||
|
All of these configuration options could be overwritten under config in `values.yaml`.
|
||||||
|
A modification example is provided there.
|
||||||
|
|
||||||
|
### Overrides
|
||||||
|
|
||||||
|
You can override any value in the Qdrant configuration by setting the Helm values under the key `config`. Those settings get included verbatim in a file called `config/production.yml` which is explained further here [Qdrant Order and Priority](https://qdrant.tech/documentation/guides/configuration/#order-and-priority) as well as an [example](https://github.com/qdrant/qdrant-helm/blob/b0bb6fc6d3eb9c0813c79bb5a78dc21aebc2b81d/charts/qdrant/values.yaml#L140).
|
||||||
|
|
||||||
|
### Distributed setup
|
||||||
|
|
||||||
|
Running a distributed cluster just needs a few changes in your `values.yaml` file.
|
||||||
|
Increase the number of replicas to the desired number of nodes and set `config.cluster.enabled` to true.
|
||||||
|
|
||||||
|
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`.
|
||||||
|
|
||||||
|
## Updating StatefulSets
|
||||||
|
|
||||||
|
This Helm chart uses a Kubernetes [StatefulSet](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/) to manage your Qdrant cluster. StatefulSets have many fields that are immutable, meaning that you cannot change these fields without deleting and recreating the StatefulSet. If you try to change these fields, you will get an error like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
Error: UPGRADE FAILED: cannot patch "qdrant" with kind StatefulSet: StatefulSet.apps "qdrant" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden
|
||||||
|
```
|
||||||
|
|
||||||
|
If you need to change any immutable field, the process is described below, using the most common example of expanding a PVC volume.
|
||||||
|
|
||||||
|
1. Delete the StatefulSet while leaving the Pods running:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl delete statefulset --cascade=orphan qdrant
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Manually edit all PersistentVolumeClaims to increase their sizes:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# For each PersistentVolumeClaim:
|
||||||
|
kubectl edit pvc qdrant-storage-qdrant-0
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Update your Helm values to match the new PVC size.
|
||||||
|
4. Reinstall the Helm chart using your updated values:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
helm upgrade --install qdrant qdrant/qdrant -f my-values.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
Some storage providers allow resizing volumes in-place, but most require a pod restart before the new size will take effect:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
kubectl rollout restart statefulset qdrant
|
||||||
|
```
|
||||||
|
|
||||||
|
### Immutable Pod fields
|
||||||
|
|
||||||
|
In addition to immutable fields on StatefulSets, Pods also have some fields which are immutable, which means the above method may not work for some changes, such as setting `snapshotPersistence.enabled: true`. In that case, after following the above method, you'll see an error like this when you `kubectl describe` your StatefulSet:
|
||||||
|
|
||||||
|
```
|
||||||
|
pod updates may not change fields other than `spec.containers[*].image`,
|
||||||
|
`spec.initContainers[*].image`,`spec.activeDeadlineSeconds`,
|
||||||
|
`spec.tolerations` (only additions to existing tolerations),
|
||||||
|
`spec.terminationGracePeriodSeconds` (allow it to be set to 1 if it was previously negative)
|
||||||
|
```
|
||||||
|
|
||||||
|
To fix this, you must manually delete all of your Qdrant pods, starting with node-0. This will cause your cluster to go down, but will allow the StatefulSet to recreate your Pods with the correct configuration.
|
||||||
|
|
||||||
|
## Restoring from Snapshots
|
||||||
|
|
||||||
|
This helm chart allows you to restore a snapshot into your Qdrant cluster either from an internal or external PersistentVolumeClaim.
|
||||||
|
|
||||||
|
### Restoring from the built-in PVC
|
||||||
|
|
||||||
|
If you have set `snapshotPersistence.enabled: true` (recommended for production), this helm chart will create a separate PersistentVolume for snapshots, and any snapshots you create will be stored in that PersistentVolume.
|
||||||
|
|
||||||
|
To restore from one of these snapshots, set the following values:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
snapshotRestoration:
|
||||||
|
enabled: true
|
||||||
|
# Set blank to indicate we are not using an external PVC
|
||||||
|
pvcName: ""
|
||||||
|
snapshots:
|
||||||
|
- /qdrant/snapshots/<collection_name>/<filename>/:<collection_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
And run "helm upgrade". This will restart your cluster and restore the specified collection from the snapshot. Qdrant will refuse to overwrite an existing collection, so ensure the collection is deleted before restoring.
|
||||||
|
|
||||||
|
After the snapshot is restored, remove the above values and run "helm upgrade" again to trigger another rolling restart. Otherwise, the snapshot restore will be attempted again if your cluster ever restarts.
|
||||||
|
|
||||||
|
### Restoring from an external PVC
|
||||||
|
|
||||||
|
If you wish to restore from an externally-created snapshot, using the API is recommended: https://qdrant.github.io/qdrant/redoc/index.html#tag/collections/operation/recover_from_uploaded_snapshot
|
||||||
|
|
||||||
|
If the file is too large, you can separately create a PersistentVolumeClaim, store your data in there, and refer to this separate PersistentVolumeClaim in this helm chart.
|
||||||
|
|
||||||
|
Once you have created this PersistentVolumeClaim (must be in the same namespace as your Qdrant cluster), set the following values:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
snapshotRestoration:
|
||||||
|
enabled: true
|
||||||
|
pvcName: "<the name of your PVC>"
|
||||||
|
snapshots:
|
||||||
|
- /qdrant/snapshots/<collection_name>/<filename>/:<collection_name>
|
||||||
|
```
|
||||||
|
|
||||||
|
And run "helm upgrade". This will restart your cluster and restore the specified collection from the snapshot. Qdrant will refuse to overwrite an existing collection, so ensure the collection is deleted before restoring.
|
||||||
|
|
||||||
|
After the snapshot is restored, remove the above values and run "helm upgrade" again to trigger another rolling restart. Otherwise, the snapshot restore will be attempted again if your cluster ever restarts.
|
||||||
|
|
||||||
|
## Metrics endpoints
|
||||||
|
|
||||||
|
Metrics are available through rest api (default port set to 6333) at `/metrics`
|
||||||
|
|
||||||
|
Refer to [qdrant metrics configuration](https://qdrant.tech/documentation/telemetry/#metrics) for more information.
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
Qdrant {{ .Chart.AppVersion }} has been deployed successfully.
|
||||||
|
|
||||||
|
The full Qdrant documentation is available at https://qdrant.tech/documentation/.
|
||||||
|
|
||||||
|
To forward Qdrant's ports execute one of the following commands:
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ $.Release.Namespace }} -l "app.kubernetes.io/name={{ include "qdrant.name" . }},app.kubernetes.io/instance={{ $.Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
{{- range .Values.service.ports }}
|
||||||
|
|
||||||
|
If you want to use Qdrant via {{ .name }} execute the following commands
|
||||||
|
kubectl --namespace {{ $.Release.Namespace }} port-forward $POD_NAME {{ .targetPort }}:{{ .targetPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if .Values.ingress.enabled }}
|
||||||
|
|
||||||
|
If you want to access Qdrant through the ingress controller
|
||||||
|
{{- range $host := .Values.ingress.hosts }}
|
||||||
|
{{- range .paths }}
|
||||||
|
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "qdrant.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "qdrant.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride }}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains $name .Release.Name }}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "qdrant.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "qdrant.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "qdrant.chart" . }}
|
||||||
|
{{ include "qdrant.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "qdrant.selectorLabels" -}}
|
||||||
|
app: {{ include "qdrant.name" . }}
|
||||||
|
app.kubernetes.io/name: {{ include "qdrant.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Additional (global) labels
|
||||||
|
*/}}
|
||||||
|
{{- define "qdrant.additionalLabels" -}}
|
||||||
|
{{- with .Values.additionalLabels }}
|
||||||
|
{{- range $key, $value := . }}
|
||||||
|
{{ $key }}: {{ $value | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "qdrant.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
|
{{- default (include "qdrant.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else }}
|
||||||
|
{{- default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create secret
|
||||||
|
*/}}
|
||||||
|
{{- define "qdrant.secret" -}}
|
||||||
|
{{- $readOnlyApiKey := false }}
|
||||||
|
{{- $apiKey := false }}
|
||||||
|
{{- if kindIs "map" .Values.apiKey -}}
|
||||||
|
{{- if .Values.apiKey.valueFrom -}}
|
||||||
|
{{- /* Retrieve the value from the secret as specified in valueFrom */ -}}
|
||||||
|
{{- $secretName := .Values.apiKey.valueFrom.secretKeyRef.name -}}
|
||||||
|
{{- $secretKey := .Values.apiKey.valueFrom.secretKeyRef.key -}}
|
||||||
|
{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace $secretName) | default dict -}}
|
||||||
|
{{- $secretData := (get $secretObj "data") | default dict -}}
|
||||||
|
{{- $apiKey = (get $secretData $secretKey | b64dec) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else if .Values.apiKey | toJson | eq "true" -}}
|
||||||
|
{{- /* Retrieve existing randomly generated api key or create a new one */ -}}
|
||||||
|
{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace (printf "%s-apikey" (include "qdrant.fullname" . ))) | default dict -}}
|
||||||
|
{{- $secretData := (get $secretObj "data") | default dict -}}
|
||||||
|
{{- $apiKey = (get $secretData "api-key" | b64dec) | default (randAlphaNum 32) -}}
|
||||||
|
{{- else if .Values.apiKey -}}
|
||||||
|
{{- $apiKey = .Values.apiKey -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if kindIs "map" .Values.readOnlyApiKey -}}
|
||||||
|
{{- if .Values.readOnlyApiKey.valueFrom -}}
|
||||||
|
{{- /* Retrieve the value from the secret as specified in valueFrom */ -}}
|
||||||
|
{{- $secretName := .Values.readOnlyApiKey.valueFrom.secretKeyRef.name -}}
|
||||||
|
{{- $secretKey := .Values.readOnlyApiKey.valueFrom.secretKeyRef.key -}}
|
||||||
|
{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace $secretName) | default dict -}}
|
||||||
|
{{- $secretData := (get $secretObj "data") | default dict -}}
|
||||||
|
{{- $readOnlyApiKey = (get $secretData $secretKey | b64dec) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else if eq (.Values.readOnlyApiKey | toJson) "true" -}}
|
||||||
|
{{- /* retrieve existing randomly generated api key or create new one */ -}}
|
||||||
|
{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace (printf "%s-apikey" (include "qdrant.fullname" . ))) | default dict -}}
|
||||||
|
{{- $secretData := (get $secretObj "data") | default dict -}}
|
||||||
|
{{- $readOnlyApiKey = (get $secretData "read-only-api-key" | b64dec) | default (randAlphaNum 32) -}}
|
||||||
|
{{- else if .Values.readOnlyApiKey -}}
|
||||||
|
{{- $readOnlyApiKey = .Values.readOnlyApiKey -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if and $apiKey $readOnlyApiKey -}}
|
||||||
|
api-key: {{ $apiKey | b64enc }}
|
||||||
|
read-only-api-key: {{ $readOnlyApiKey | b64enc }}
|
||||||
|
local.yaml: {{ printf "service:\n api_key: %s\n read_only_api_key: %s" $apiKey $readOnlyApiKey | b64enc }}
|
||||||
|
{{- else if $apiKey -}}
|
||||||
|
api-key: {{ $apiKey | b64enc }}
|
||||||
|
local.yaml: {{ printf "service:\n api_key: %s" $apiKey | b64enc }}
|
||||||
|
{{- else if $readOnlyApiKey -}}
|
||||||
|
read-only-api-key: {{ $readOnlyApiKey | b64enc }}
|
||||||
|
local.yaml: {{ printf "service:\n read_only_api_key: %s" $readOnlyApiKey | b64enc }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Protocol to use for inter cluster communication
|
||||||
|
*/}}
|
||||||
|
{{- define "qdrant.p2p.protocol" -}}
|
||||||
|
{{ if eq (.Values.config.cluster.p2p.enable_tls | toJson) "true" -}}
|
||||||
|
https
|
||||||
|
{{- else -}}
|
||||||
|
http
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Port to use for inter cluster communication
|
||||||
|
*/}}
|
||||||
|
{{- define "qdrant.p2p.port" -}}
|
||||||
|
{{- default 6335 .Values.config.cluster.p2p.port -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ include "qdrant.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
data:
|
||||||
|
initialize.sh: |
|
||||||
|
#!/bin/sh
|
||||||
|
echo "Soft limits"
|
||||||
|
ulimit -a -S
|
||||||
|
echo "Hard limits"
|
||||||
|
ulimit -a -H
|
||||||
|
ulimit -n $(ulimit -Hn)
|
||||||
|
SET_INDEX=${HOSTNAME##*-}
|
||||||
|
{{- if and (.Values.snapshotRestoration.enabled) (eq (.Values.replicaCount | quote) (1 | quote)) }}
|
||||||
|
echo "Starting initializing for pod $SET_INDEX and snapshots restoration"
|
||||||
|
exec ./entrypoint.sh --uri '{{ include "qdrant.p2p.protocol" . }}://{{ include "qdrant.fullname" . }}-0.{{ include "qdrant.fullname" . }}-headless:{{ include "qdrant.p2p.port" . }}' {{ range .Values.snapshotRestoration.snapshots }} --snapshot {{ . }} {{ end }}
|
||||||
|
{{- else }}
|
||||||
|
echo "Starting initializing for pod $SET_INDEX"
|
||||||
|
if [ "$SET_INDEX" = "0" ]; then
|
||||||
|
exec ./entrypoint.sh --uri '{{ include "qdrant.p2p.protocol" . }}://{{ include "qdrant.fullname" . }}-0.{{ include "qdrant.fullname" . }}-headless:{{ include "qdrant.p2p.port" . }}'
|
||||||
|
else
|
||||||
|
exec ./entrypoint.sh --bootstrap '{{ include "qdrant.p2p.protocol" . }}://{{ include "qdrant.fullname" . }}-0.{{ include "qdrant.fullname" . }}-headless:{{ include "qdrant.p2p.port" . }}' --uri '{{ include "qdrant.p2p.protocol" . }}://{{ include "qdrant.fullname" . }}-'"$SET_INDEX"'.{{ include "qdrant.fullname" . }}-headless:{{ include "qdrant.p2p.port" . }}'
|
||||||
|
fi
|
||||||
|
{{ end }}
|
||||||
|
production.yaml: |
|
||||||
|
{{- tpl (toYaml .Values.config) . | nindent 4 }}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
{{- if .Values.ingress.enabled -}}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: {{ include "qdrant.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
|
{{- with .Values.ingress.additionalLabels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.ingress.annotations .Values.additionalAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- if .Values.ingress.ingressClassName }}
|
||||||
|
ingressClassName: {{ .Values.ingress.ingressClassName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.ingress.hosts }}
|
||||||
|
rules:
|
||||||
|
{{- range . }}
|
||||||
|
- host: {{ .host | quote }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
{{- range .paths }}
|
||||||
|
- path: {{ .path | quote }}
|
||||||
|
pathType: {{ .pathType | default "Prefix" | quote }}
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: {{ default .serviceName (include "qdrant.fullname" $) }}
|
||||||
|
port:
|
||||||
|
number: {{ .servicePort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.ingress.tls }}
|
||||||
|
tls:
|
||||||
|
{{- range .Values.ingress.tls}}
|
||||||
|
- hosts:
|
||||||
|
{{- range .hosts }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
secretName: {{ .secretName | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
{{- if .Values.podDisruptionBudget.enabled }}
|
||||||
|
apiVersion: policy/v1
|
||||||
|
kind: PodDisruptionBudget
|
||||||
|
metadata:
|
||||||
|
name: {{ include "qdrant.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.podDisruptionBudget.maxUnavailable}}
|
||||||
|
maxUnavailable: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podDisruptionBudget.minAvailable }}
|
||||||
|
minAvailable: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }}
|
||||||
|
unhealthyPodEvictionPolicy: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "qdrant.selectorLabels" . | nindent 6 }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
{{- if or .Values.apiKey .Values.readOnlyApiKey }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ include "qdrant.fullname" . }}-apikey
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
data:
|
||||||
|
{{ include "qdrant.secret" . | indent 2}}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "qdrant.fullname" . }}-headless
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
|
app.kubernetes.io/component: cluster-discovery
|
||||||
|
{{- with .Values.service.additionalLabels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.service.annotations .Values.additionalAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.service.annotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
clusterIP: None
|
||||||
|
publishNotReadyAddresses: true
|
||||||
|
ports:
|
||||||
|
{{- range .Values.service.ports }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
port: {{ .port }}
|
||||||
|
targetPort: {{ .targetPort }}
|
||||||
|
protocol: {{ .protocol | default "TCP" }}
|
||||||
|
{{- if .appProtocol }}
|
||||||
|
appProtocol: {{ .appProtocol }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
{{- include "qdrant.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "qdrant.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
|
{{- with .Values.service.additionalLabels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if or .Values.service.annotations .Values.additionalAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.service.annotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type | default "ClusterIP" }}
|
||||||
|
{{- if .Values.service.loadBalancerIP }}
|
||||||
|
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
{{- range .Values.service.ports }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
port: {{ .port }}
|
||||||
|
targetPort: {{ .targetPort }}
|
||||||
|
{{- if and (or (eq $.Values.service.type "NodePort") (eq $.Values.service.type "LoadBalancer")) (not (empty .nodePort)) }}
|
||||||
|
nodePort: {{ .nodePort }}
|
||||||
|
{{- end }}
|
||||||
|
protocol: {{ .protocol | default "TCP" }}
|
||||||
|
{{- if .appProtocol }}
|
||||||
|
appProtocol: {{ .appProtocol }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
{{- include "qdrant.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ include "qdrant.fullname" . }}
|
||||||
|
{{- if or .Values.serviceAccount.annotations .Values.additionalAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.serviceAccount.annotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
{{- if .Values.metrics.serviceMonitor.enabled }}
|
||||||
|
kind: ServiceMonitor
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
|
{{- with .Values.metrics.serviceMonitor.additionalLabels }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
name: {{ include "qdrant.fullname" . }}
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
endpoints:
|
||||||
|
- honorLabels: true
|
||||||
|
interval: {{ .Values.metrics.serviceMonitor.scrapeInterval }}
|
||||||
|
path: {{ .Values.metrics.serviceMonitor.targetPath }}
|
||||||
|
port: {{ .Values.metrics.serviceMonitor.targetPort }}
|
||||||
|
scheme: http
|
||||||
|
scrapeTimeout: {{ .Values.metrics.serviceMonitor.scrapeTimeout }}
|
||||||
|
{{- if .Values.metrics.serviceMonitor.metricRelabelings }}
|
||||||
|
metricRelabelings:
|
||||||
|
{{ tpl (toYaml .Values.metrics.serviceMonitor.metricRelabelings | indent 8) . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.metrics.serviceMonitor.relabelings }}
|
||||||
|
relabelings:
|
||||||
|
{{ tpl (toYaml .Values.metrics.serviceMonitor.relabelings | indent 8) . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.metrics.serviceMonitor.authorization }}
|
||||||
|
authorization:
|
||||||
|
{{ tpl (toYaml .Values.metrics.serviceMonitor.authorization | indent 8) . }}
|
||||||
|
{{- else if .Values.readOnlyApiKey }}
|
||||||
|
authorization:
|
||||||
|
type: Bearer
|
||||||
|
credentials:
|
||||||
|
name: {{ include "qdrant.fullname" . }}-apikey
|
||||||
|
key: read-only-api-key
|
||||||
|
{{- else if .Values.apiKey }}
|
||||||
|
authorization:
|
||||||
|
type: Bearer
|
||||||
|
credentials:
|
||||||
|
name: {{ include "qdrant.fullname" . }}-apikey
|
||||||
|
key: api-key
|
||||||
|
{{- end }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 6 }}
|
||||||
|
app.kubernetes.io/component: cluster-discovery
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,315 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ include "qdrant.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
podManagementPolicy: {{ .Values.podManagementPolicy }}
|
||||||
|
{{- if .Values.minReadySeconds }}
|
||||||
|
minReadySeconds: {{ .Values.minReadySeconds }}
|
||||||
|
{{- end }}
|
||||||
|
updateStrategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
partition: 0
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "qdrant.selectorLabels" . | nindent 6 }}
|
||||||
|
serviceName: {{ include "qdrant.fullname" . }}-headless
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
|
||||||
|
{{- if or .Values.apiKey .Values.readOnlyApiKey }}
|
||||||
|
checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.selectorLabels" . | nindent 8 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 8 }}
|
||||||
|
{{- with .Values.podLabels }}
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.priorityClassName }}
|
||||||
|
priorityClassName: "{{ .Values.priorityClassName }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.shareProcessNamespace }}
|
||||||
|
shareProcessNamespace: {{ .Values.shareProcessNamespace }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if hasKey .Values "terminationGracePeriodSeconds" }}
|
||||||
|
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||||
|
{{- end }}
|
||||||
|
initContainers:
|
||||||
|
{{- if and .Values.updateVolumeFsOwnership (not .Values.image.useUnprivilegedImage) }}
|
||||||
|
{{- if and .Values.containerSecurityContext .Values.containerSecurityContext.runAsUser }}
|
||||||
|
- name: ensure-dir-ownership
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
|
command:
|
||||||
|
- chown
|
||||||
|
- -R
|
||||||
|
- {{ int64 .Values.containerSecurityContext.runAsUser }}:{{ int64 .Values.podSecurityContext.fsGroup }}
|
||||||
|
- /qdrant/storage
|
||||||
|
- /qdrant/snapshots
|
||||||
|
{{- if and .Values.snapshotRestoration.enabled .Values.snapshotRestoration.pvcName }}
|
||||||
|
- {{ .Values.snapshotRestoration.mountPath }}
|
||||||
|
{{- end }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: {{ .Values.persistence.storageVolumeName | default "qdrant-storage" }}
|
||||||
|
mountPath: /qdrant/storage
|
||||||
|
{{- if .Values.persistence.storageSubPath }}
|
||||||
|
subPath: "{{ .Values.persistence.storageSubPath }}"
|
||||||
|
{{- end }}
|
||||||
|
- name: {{ .Values.snapshotPersistence.snapshotsVolumeName | default "qdrant-snapshots" }}
|
||||||
|
mountPath: /qdrant/snapshots
|
||||||
|
{{- if .Values.snapshotPersistence.snapshotsSubPath }}
|
||||||
|
subPath: "{{ .Values.snapshotPersistence.snapshotsSubPath }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.snapshotRestoration.enabled .Values.snapshotRestoration.pvcName }}
|
||||||
|
- name: qdrant-snapshot-restoration
|
||||||
|
mountPath: {{ .Values.snapshotRestoration.mountPath }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
{{- if .Values.sidecarContainers -}}
|
||||||
|
{{- toYaml .Values.sidecarContainers | trim | nindent 8 }}
|
||||||
|
{{- end}}
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}{{ .Values.image.useUnprivilegedImage | ternary "-unprivileged" "" }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
env:
|
||||||
|
- name: QDRANT_INIT_FILE_PATH
|
||||||
|
value: /qdrant/init/.qdrant-initialized
|
||||||
|
{{- range .Values.env }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
{{- if .valueFrom }}
|
||||||
|
valueFrom: {{- toYaml .valueFrom | nindent 16 }}
|
||||||
|
{{- else }}
|
||||||
|
value: {{ .value | quote }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
command: ["/bin/bash", "-c"]
|
||||||
|
{{- with .Values.args }}
|
||||||
|
args:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
{{- range .Values.service.ports }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
containerPort: {{ .targetPort }}
|
||||||
|
protocol: {{ .protocol }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- $values := .Values -}}
|
||||||
|
{{- range .Values.service.ports }}
|
||||||
|
{{- if and $values.livenessProbe.enabled .checksEnabled }}
|
||||||
|
livenessProbe:
|
||||||
|
{{- if eq .name "grpc"}}
|
||||||
|
grpc:
|
||||||
|
port: {{ .targetPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .name "http"}}
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: {{ .targetPort }}
|
||||||
|
{{- if and $values.config.service $values.config.service.enable_tls }}
|
||||||
|
scheme: HTTPS
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
initialDelaySeconds: {{ $values.livenessProbe.initialDelaySeconds }}
|
||||||
|
timeoutSeconds: {{ $values.livenessProbe.timeoutSeconds }}
|
||||||
|
periodSeconds: {{ $values.livenessProbe.periodSeconds }}
|
||||||
|
successThreshold: {{ $values.livenessProbe.successThreshold }}
|
||||||
|
failureThreshold: {{ $values.livenessProbe.failureThreshold }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and $values.readinessProbe.enabled .checksEnabled }}
|
||||||
|
readinessProbe:
|
||||||
|
{{- if eq .name "grpc"}}
|
||||||
|
grpc:
|
||||||
|
port: {{ .targetPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .name "http"}}
|
||||||
|
httpGet:
|
||||||
|
path: "{{- if semverCompare ">=1.7.3" ($.Values.image.tag | default $.Chart.AppVersion) -}}/readyz{{else}}/{{end}}"
|
||||||
|
port: {{ .targetPort }}
|
||||||
|
{{- if and $values.config.service $values.config.service.enable_tls }}
|
||||||
|
scheme: HTTPS
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
initialDelaySeconds: {{ $values.readinessProbe.initialDelaySeconds }}
|
||||||
|
timeoutSeconds: {{ $values.readinessProbe.timeoutSeconds }}
|
||||||
|
periodSeconds: {{ $values.readinessProbe.periodSeconds }}
|
||||||
|
successThreshold: {{ $values.readinessProbe.successThreshold }}
|
||||||
|
failureThreshold: {{ $values.readinessProbe.failureThreshold }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if and $values.startupProbe.enabled .checksEnabled }}
|
||||||
|
startupProbe:
|
||||||
|
{{- if eq .name "grpc"}}
|
||||||
|
grpc:
|
||||||
|
port: {{ .targetPort }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .name "http"}}
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: {{ .targetPort }}
|
||||||
|
{{- if and $values.config.service $values.config.service.enable_tls }}
|
||||||
|
scheme: HTTPS
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
initialDelaySeconds: {{ $values.startupProbe.initialDelaySeconds }}
|
||||||
|
timeoutSeconds: {{ $values.startupProbe.timeoutSeconds }}
|
||||||
|
periodSeconds: {{ $values.startupProbe.periodSeconds }}
|
||||||
|
successThreshold: {{ $values.startupProbe.successThreshold }}
|
||||||
|
failureThreshold: {{ $values.startupProbe.failureThreshold }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
{{- with .Values.containerSecurityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.lifecycle }}
|
||||||
|
lifecycle:
|
||||||
|
{{- toYaml . | nindent 12 }}
|
||||||
|
{{- end }}
|
||||||
|
volumeMounts:
|
||||||
|
- name: {{ .Values.persistence.storageVolumeName | default "qdrant-storage" }}
|
||||||
|
mountPath: /qdrant/storage
|
||||||
|
{{- if .Values.persistence.storageSubPath }}
|
||||||
|
subPath: "{{ .Values.persistence.storageSubPath }}"
|
||||||
|
{{- end }}
|
||||||
|
- name: qdrant-config
|
||||||
|
mountPath: /qdrant/config/initialize.sh
|
||||||
|
subPath: initialize.sh
|
||||||
|
- name: qdrant-config
|
||||||
|
mountPath: /qdrant/config/production.yaml
|
||||||
|
subPath: production.yaml
|
||||||
|
{{- if or .Values.apiKey .Values.readOnlyApiKey }}
|
||||||
|
- name: qdrant-secret
|
||||||
|
mountPath: /qdrant/config/local.yaml
|
||||||
|
subPath: local.yaml
|
||||||
|
{{- end }}
|
||||||
|
{{- if and .Values.snapshotRestoration.enabled .Values.snapshotRestoration.pvcName }}
|
||||||
|
- name: qdrant-snapshot-restoration
|
||||||
|
mountPath: {{ .Values.snapshotRestoration.mountPath }}
|
||||||
|
{{- end }}
|
||||||
|
- name: {{ .Values.snapshotPersistence.snapshotsVolumeName | default "qdrant-snapshots" }}
|
||||||
|
mountPath: /qdrant/snapshots
|
||||||
|
{{- if .Values.snapshotPersistence.snapshotsSubPath }}
|
||||||
|
subPath: "{{ .Values.snapshotPersistence.snapshotsSubPath }}"
|
||||||
|
{{- end }}
|
||||||
|
- name: qdrant-init
|
||||||
|
mountPath: /qdrant/init
|
||||||
|
{{- if .Values.additionalVolumeMounts }}
|
||||||
|
{{- toYaml .Values.additionalVolumeMounts | default "" | nindent 10 }}
|
||||||
|
{{- end}}
|
||||||
|
{{- with .Values.podSecurityContext }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- tpl (toYaml .) $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.topologySpreadConstraints}}
|
||||||
|
topologySpreadConstraints:
|
||||||
|
{{- tpl (toYaml .) $ | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: {{ include "qdrant.fullname" . }}
|
||||||
|
volumes:
|
||||||
|
- name: qdrant-config
|
||||||
|
configMap:
|
||||||
|
name: {{ include "qdrant.fullname" . }}
|
||||||
|
defaultMode: 0755
|
||||||
|
{{- if and .Values.snapshotRestoration.enabled .Values.snapshotRestoration.pvcName }}
|
||||||
|
- name: qdrant-snapshot-restoration
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.snapshotRestoration.pvcName }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if not .Values.snapshotPersistence.enabled }}
|
||||||
|
- name: {{ .Values.snapshotPersistence.snapshotsVolumeName | default "qdrant-snapshots" }}
|
||||||
|
emptyDir: {}
|
||||||
|
{{- end }}
|
||||||
|
- name: qdrant-init
|
||||||
|
emptyDir: {}
|
||||||
|
{{- if or .Values.apiKey .Values.readOnlyApiKey }}
|
||||||
|
- name: qdrant-secret
|
||||||
|
secret:
|
||||||
|
secretName: {{ include "qdrant.fullname" . }}-apikey
|
||||||
|
defaultMode: 0600
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Values.additionalVolumes }}
|
||||||
|
{{- toYaml .Values.additionalVolumes | default "" | nindent 8 }}
|
||||||
|
{{- end}}
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: {{ .Values.persistence.storageVolumeName | default "qdrant-storage" }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "qdrant.name" . }}
|
||||||
|
{{- with .Values.persistence.additionalLabels }}
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.persistence.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
storageClassName: {{ .Values.persistence.storageClassName }}
|
||||||
|
{{- if .Values.persistence.volumeAttributesClassName }}
|
||||||
|
volumeAttributesClassName: {{ .Values.persistence.volumeAttributesClassName }}
|
||||||
|
{{- end }}
|
||||||
|
accessModes:
|
||||||
|
{{- range .Values.persistence.accessModes }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.size | quote }}
|
||||||
|
{{- if .Values.snapshotPersistence.enabled }}
|
||||||
|
- metadata:
|
||||||
|
name: {{ .Values.snapshotPersistence.snapshotsVolumeName | default "qdrant-snapshots" }}
|
||||||
|
labels:
|
||||||
|
app: {{ template "qdrant.name" . }}
|
||||||
|
{{- with .Values.snapshotPersistence.additionalLabels }}
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.snapshotPersistence.annotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 10 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
storageClassName: {{ .Values.snapshotPersistence.storageClassName }}
|
||||||
|
{{- if .Values.snapshotPersistence.volumeAttributesClassName }}
|
||||||
|
volumeAttributesClassName: {{ .Values.snapshotPersistence.volumeAttributesClassName }}
|
||||||
|
{{- end }}
|
||||||
|
accessModes:
|
||||||
|
{{- range .Values.snapshotPersistence.accessModes }}
|
||||||
|
- {{ . | quote }}
|
||||||
|
{{- end }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.snapshotPersistence.size | quote }}
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
{{- $root := . }}
|
||||||
|
{{- $namespace := .Release.Namespace }}
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: "{{ include "qdrant.fullname" . }}-test-db-interaction"
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: test-script
|
||||||
|
image: {{ .Values.chartTests.dbInteraction.image | quote }}
|
||||||
|
args: ['bash', '/app/entrypoint.sh']
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /app
|
||||||
|
name: test-script
|
||||||
|
{{- if .Values.additionalVolumeMounts }}
|
||||||
|
{{- toYaml .Values.additionalVolumeMounts | default "" | nindent 8 }}
|
||||||
|
{{- end}}
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.chartTests.dbInteraction.resources | nindent 8 }}
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
volumes:
|
||||||
|
- name: test-script
|
||||||
|
configMap:
|
||||||
|
name: "{{ include "qdrant.fullname" . }}-test-db-interaction"
|
||||||
|
{{- if .Values.additionalVolumes }}
|
||||||
|
{{- toYaml .Values.additionalVolumes | default "" | nindent 4 }}
|
||||||
|
{{- end}}
|
||||||
|
restartPolicy: Never
|
||||||
|
serviceAccountName: {{ include "qdrant.fullname" . }}
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: "{{ include "qdrant.fullname" . }}-test-db-interaction"
|
||||||
|
labels:
|
||||||
|
{{- include "qdrant.labels" . | nindent 4 }}
|
||||||
|
{{- include "qdrant.additionalLabels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
"helm.sh/hook": test
|
||||||
|
{{- with .Values.additionalAnnotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
data:
|
||||||
|
entrypoint.sh: |
|
||||||
|
#!/bin/bash
|
||||||
|
set -xe
|
||||||
|
# Kind's networking is very flaky
|
||||||
|
echo 'connect-timeout = 5' > $HOME/.curlrc
|
||||||
|
echo 'retry = 60' >> $HOME/.curlrc
|
||||||
|
echo 'retry-delay = 5' >> $HOME/.curlrc
|
||||||
|
echo 'retry-all-errors' >> $HOME/.curlrc
|
||||||
|
# Don't clutter the logs with progress bars
|
||||||
|
echo 'no-progress-meter' >> $HOME/.curlrc
|
||||||
|
# Ensure errors cause the script to fail, but show the response body
|
||||||
|
echo 'fail-with-body' >> $HOME/.curlrc
|
||||||
|
|
||||||
|
if [ -d /mnt/secrets/certs ]; then
|
||||||
|
cp /mnt/secrets/certs/ca.pem /usr/share/pki/trust/anchors/private-ca.pem
|
||||||
|
update-ca-certificates
|
||||||
|
fi
|
||||||
|
|
||||||
|
QDRANT_COLLECTION="test_collection"
|
||||||
|
{{- range .Values.service.ports }}
|
||||||
|
{{- if eq .name "http" }}
|
||||||
|
echo "Connecting to {{ include "qdrant.fullname" $root }}.{{ $namespace }}:{{ .port }}"
|
||||||
|
QDRANT_URL="http://{{ include "qdrant.fullname" $root }}.{{ $namespace }}:{{ .port }}"
|
||||||
|
{{- if and $root.Values.config.service $root.Values.config.service.enable_tls }}
|
||||||
|
echo "Using https"
|
||||||
|
QDRANT_URL="https://{{ include "qdrant.fullname" $root }}.{{ $namespace }}:{{ .port }}"
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
API_KEY_HEADER=""
|
||||||
|
{{- if .Values.apiKey }}
|
||||||
|
API_KEY_HEADER="Api-key: {{ .Values.apiKey }}"
|
||||||
|
{{- else if .Values.readOnlyApiKey }}
|
||||||
|
API_KEY_HEADER="Api-key: {{ .Values.readOnlyApiKey }}"
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
# Delete collection if exists
|
||||||
|
curl -X DELETE -H "${API_KEY_HEADER}" $QDRANT_URL/collections/${QDRANT_COLLECTION}
|
||||||
|
|
||||||
|
# Create collection
|
||||||
|
curl -X PUT \
|
||||||
|
-H 'Content-Type: application-json' \
|
||||||
|
-d '{"vectors":{"size":4,"distance":"Dot"}}' \
|
||||||
|
-H "${API_KEY_HEADER}" \
|
||||||
|
$QDRANT_URL/collections/${QDRANT_COLLECTION}
|
||||||
|
|
||||||
|
# Insert points
|
||||||
|
curl -X PUT \
|
||||||
|
-H 'Content-Type: application-json' \
|
||||||
|
-d '{"points":[
|
||||||
|
{"id":1,"vector":[0.05, 0.61, 0.76, 0.74],"payload":{"city":"Berlin"}},
|
||||||
|
{"id":2,"vector":[0.19, 0.81, 0.75, 0.11],"payload":{"city":"London"}},
|
||||||
|
{"id":3,"vector":[0.36, 0.55, 0.47, 0.94],"payload":{"city":"Moscow"}},
|
||||||
|
{"id":4,"vector":[0.18, 0.01, 0.85, 0.80],"payload":{"city":"New York"}},
|
||||||
|
{"id":5,"vector":[0.24, 0.18, 0.22, 0.44],"payload":{"city":"Beijing"}},
|
||||||
|
{"id":6,"vector":[0.35, 0.08, 0.11, 0.44],"payload":{"city":"Mumbai"}}
|
||||||
|
]}' \
|
||||||
|
-H "${API_KEY_HEADER}" \
|
||||||
|
$QDRANT_URL/collections/${QDRANT_COLLECTION}/points
|
||||||
|
|
||||||
|
# Run query
|
||||||
|
curl -X POST \
|
||||||
|
-H 'Content-Type: application-json' \
|
||||||
|
-d '{"vector":[0.2, 0.1, 0.9, 0.7],"limit":3}' \
|
||||||
|
-H "${API_KEY_HEADER}" \
|
||||||
|
$QDRANT_URL/collections/${QDRANT_COLLECTION}/points/search
|
||||||
@@ -0,0 +1,294 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: docker.io/qdrant/qdrant
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
tag: ""
|
||||||
|
useUnprivilegedImage: false
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
args: ["./config/initialize.sh"]
|
||||||
|
env: []
|
||||||
|
# - name: QDRANT_ALLOW_RECOVERY_MODE
|
||||||
|
# value: true
|
||||||
|
|
||||||
|
# checks - Readiness and liveness checks can only be enabled for either http (REST) or grpc (multiple checks not supported)
|
||||||
|
# grpc checks are only available from k8s 1.24+ so as of per default we check http
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
additionalLabels: {}
|
||||||
|
annotations: {}
|
||||||
|
loadBalancerIP: ""
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 6333
|
||||||
|
targetPort: 6333
|
||||||
|
protocol: TCP
|
||||||
|
checksEnabled: true
|
||||||
|
# appProtocol: http
|
||||||
|
- name: grpc
|
||||||
|
port: 6334
|
||||||
|
targetPort: 6334
|
||||||
|
protocol: TCP
|
||||||
|
checksEnabled: false
|
||||||
|
# appProtocol: http2
|
||||||
|
- name: p2p
|
||||||
|
port: 6335
|
||||||
|
targetPort: 6335
|
||||||
|
protocol: TCP
|
||||||
|
checksEnabled: false
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: false
|
||||||
|
ingressClassName: ""
|
||||||
|
additionalLabels: {}
|
||||||
|
annotations: {}
|
||||||
|
# kubernetes.io/ingress.class: alb
|
||||||
|
hosts:
|
||||||
|
- host: example-domain.com
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
servicePort: 6333
|
||||||
|
tls: []
|
||||||
|
# - hosts:
|
||||||
|
# - example-domain.com
|
||||||
|
# secretName: tls-secret-name
|
||||||
|
|
||||||
|
livenessProbe:
|
||||||
|
enabled: false
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 1
|
||||||
|
failureThreshold: 6
|
||||||
|
successThreshold: 1
|
||||||
|
|
||||||
|
readinessProbe:
|
||||||
|
enabled: true
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 1
|
||||||
|
failureThreshold: 6
|
||||||
|
successThreshold: 1
|
||||||
|
|
||||||
|
startupProbe:
|
||||||
|
enabled: false
|
||||||
|
initialDelaySeconds: 10
|
||||||
|
periodSeconds: 5
|
||||||
|
timeoutSeconds: 1
|
||||||
|
failureThreshold: 30
|
||||||
|
successThreshold: 1
|
||||||
|
|
||||||
|
additionalLabels: {}
|
||||||
|
# additionalAnnotations will be added to all top-level resources (StatefulSet, Service, ConfigMap, etc.)
|
||||||
|
additionalAnnotations: {}
|
||||||
|
podAnnotations: {}
|
||||||
|
podLabels: {}
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
containerSecurityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 2000
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
privileged: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
fsGroup: 3000
|
||||||
|
fsGroupChangePolicy: Always
|
||||||
|
|
||||||
|
lifecycle:
|
||||||
|
preStop:
|
||||||
|
exec:
|
||||||
|
# Sleeping before shutdown allows Qdrant to process requests that were
|
||||||
|
# in-flight before the node is removed from load-balancing.
|
||||||
|
# If using an external load balancer, you may need to increase this
|
||||||
|
# duration to be greater than the LB's health check interval.
|
||||||
|
command: ["sleep", "3"]
|
||||||
|
|
||||||
|
# Unless .Values.image.useUnprivilegedImage is set to true, ensures that the pre-existing
|
||||||
|
# files on the storage and snapshot volume are owned by the container's user and fsGroup.
|
||||||
|
updateVolumeFsOwnership: true
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
|
# podAntiAffinity:
|
||||||
|
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
# - labelSelector:
|
||||||
|
# matchExpressions:
|
||||||
|
# - key: app.kubernetes.io/name
|
||||||
|
# operator: In
|
||||||
|
# values:
|
||||||
|
# - '{{ include "qdrant.name" . }}'
|
||||||
|
# - key: app.kubernetes.io/instance
|
||||||
|
# operator: In
|
||||||
|
# values:
|
||||||
|
# - '{{ .Release.Name }}'
|
||||||
|
# topologyKey: "kubernetes.io/hostname"
|
||||||
|
|
||||||
|
topologySpreadConstraints: []
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
size: 10Gi
|
||||||
|
annotations: {}
|
||||||
|
additionalLabels: {}
|
||||||
|
# storageVolumeName: qdrant-storage
|
||||||
|
# storageSubPath: ""
|
||||||
|
# storageClassName: local-path
|
||||||
|
# volumeAttributesClassName: ""
|
||||||
|
|
||||||
|
# If you use snapshots or the snapshot shard transfer mechanism, we recommend
|
||||||
|
# creating a separate volume of the same size as your main volume so that your
|
||||||
|
# cluster won't crash if the snapshot is too big.
|
||||||
|
snapshotPersistence:
|
||||||
|
enabled: false
|
||||||
|
accessModes: ["ReadWriteOnce"]
|
||||||
|
size: 10Gi
|
||||||
|
annotations: {}
|
||||||
|
additionalLabels: {}
|
||||||
|
# snapshotsVolumeName: qdrant-snapshots
|
||||||
|
# snapshotsSubPath: ""
|
||||||
|
# You can change the storageClassName to ensure snapshots are saved to cold storage.
|
||||||
|
# storageClassName: local-path
|
||||||
|
# volumeAttributesClassName: ""
|
||||||
|
|
||||||
|
snapshotRestoration:
|
||||||
|
enabled: false
|
||||||
|
# Set pvcName if you want to restore from a separately-created PVC. Only supported for single-node clusters unless the PVC is ReadWriteMany.
|
||||||
|
# If you set snapshotPersistence.enabled and want to restore a snapshot from there, you can leave this blank to skip mounting an external volume.
|
||||||
|
pvcName: snapshots-pvc
|
||||||
|
# Must not conflict with /qdrant/snapshots or /qdrant/storage
|
||||||
|
mountPath: /qdrant/snapshot-restoration
|
||||||
|
snapshots:
|
||||||
|
# - /qdrant/snapshot-restoration/test_collection/test_collection-2022-10-24-13-56-50.snapshot:test_collection
|
||||||
|
|
||||||
|
# modification example for configuration to overwrite defaults
|
||||||
|
config:
|
||||||
|
cluster:
|
||||||
|
enabled: true
|
||||||
|
p2p:
|
||||||
|
port: 6335
|
||||||
|
enable_tls: false
|
||||||
|
consensus:
|
||||||
|
tick_period_ms: 100
|
||||||
|
service:
|
||||||
|
enable_tls: false
|
||||||
|
|
||||||
|
sidecarContainers: []
|
||||||
|
# sidecarContainers:
|
||||||
|
# - name: my-sidecar
|
||||||
|
# image: qdrant/my-sidecar-image
|
||||||
|
# imagePullPolicy: Always
|
||||||
|
# ports:
|
||||||
|
# - name: my-port
|
||||||
|
# containerPort: 5000
|
||||||
|
# protocol: TCP
|
||||||
|
# resources:
|
||||||
|
# requests:
|
||||||
|
# memory: 10Mi
|
||||||
|
# cpu: 10m
|
||||||
|
# limits:
|
||||||
|
# memory: 100Mi
|
||||||
|
# cpu: 100m
|
||||||
|
|
||||||
|
metrics:
|
||||||
|
serviceMonitor:
|
||||||
|
enabled: false
|
||||||
|
additionalLabels: {}
|
||||||
|
scrapeInterval: 30s
|
||||||
|
scrapeTimeout: 10s
|
||||||
|
targetPort: http
|
||||||
|
targetPath: "/metrics"
|
||||||
|
## MetricRelabelConfigs to apply to samples after scraping, but before ingestion.
|
||||||
|
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig
|
||||||
|
##
|
||||||
|
metricRelabelings: []
|
||||||
|
## RelabelConfigs to apply to samples before scraping
|
||||||
|
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#relabelconfig
|
||||||
|
##
|
||||||
|
relabelings: []
|
||||||
|
## Authorization to apply to the metrics endpoint for the cases when the API key(s) are configured externally
|
||||||
|
## ref: https://prometheus-operator.dev/docs/api-reference/api/#monitoring.coreos.com/v1.SafeAuthorization
|
||||||
|
##
|
||||||
|
authorization: {}
|
||||||
|
# authorization:
|
||||||
|
# type: Bearer
|
||||||
|
# credentials:
|
||||||
|
# name: external-secret-with-api-key
|
||||||
|
# key: api-key
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
annotations: {}
|
||||||
|
|
||||||
|
priorityClassName: ""
|
||||||
|
|
||||||
|
shareProcessNamespace: false
|
||||||
|
|
||||||
|
# terminationGracePeriodSeconds: 30
|
||||||
|
|
||||||
|
# We discourage changing this setting. Using the "OrderedReady" policy in a
|
||||||
|
# multi-node cluster will cause a deadlock where nodes refuse to become
|
||||||
|
# "Ready" until all nodes are running.
|
||||||
|
podManagementPolicy: Parallel
|
||||||
|
|
||||||
|
podDisruptionBudget:
|
||||||
|
enabled: false
|
||||||
|
maxUnavailable: 1
|
||||||
|
# do not enable if you are using not in 1.27
|
||||||
|
unhealthyPodEvictionPolicy: ""
|
||||||
|
# minAvailable: 1
|
||||||
|
|
||||||
|
# api key for authentication at qdrant
|
||||||
|
# false: no api key will be configured
|
||||||
|
# true: an api key will be auto-generated
|
||||||
|
# string: the given string will be set as an apikey
|
||||||
|
# Also supports reading in from an external secret using
|
||||||
|
# valueFrom:
|
||||||
|
# secretKeyRef:
|
||||||
|
# name:
|
||||||
|
# key:
|
||||||
|
# apiKey: false
|
||||||
|
|
||||||
|
# read-only api key for authentication at qdrant
|
||||||
|
# false: no read-only api key will be configured
|
||||||
|
# true: an read-only api key will be auto-generated
|
||||||
|
# string: the given string will be set as a read-only apikey
|
||||||
|
# Also supports reading in from an external secret using
|
||||||
|
# valueFrom:
|
||||||
|
# secretKeyRef:
|
||||||
|
# name:
|
||||||
|
# key:
|
||||||
|
# readOnlyApiKey: false
|
||||||
|
|
||||||
|
additionalVolumes: []
|
||||||
|
# - name: volumeName
|
||||||
|
# emptyDir: {}
|
||||||
|
|
||||||
|
additionalVolumeMounts: []
|
||||||
|
# - name: volumeName
|
||||||
|
# mountPath: "/mount/path"
|
||||||
|
|
||||||
|
chartTests:
|
||||||
|
dbInteraction:
|
||||||
|
image: registry.suse.com/bci/bci-base:latest
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 200Mi
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 200Mi
|
||||||
Reference in New Issue
Block a user