[qdrant] Add Qdrant vector database application

Add Qdrant as a new managed application following the HelmRelease-based
vendoring pattern (same as nats, ingress, seaweedfs).

- packages/system/qdrant/ — vendored upstream Qdrant Helm chart
- packages/apps/qdrant/ — wrapper chart creating Flux HelmRelease CR
- packages/system/qdrant-rd/ — ApplicationDefinition CRD
- hack/e2e-apps/qdrant.bats — E2E test

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
Aleksei Sviridkin 2026-02-06 13:30:58 +03:00
parent 9ed889bd54
commit b71e4fe956
No known key found for this signature in database
GPG key ID: 7988329FDF395282
37 changed files with 1968 additions and 0 deletions

25
hack/e2e-apps/qdrant.bats Executable file
View file

@ -0,0 +1,25 @@
#!/usr/bin/env bats
@test "Create Qdrant" {
name='test'
kubectl apply -f- <<EOF
apiVersion: apps.cozystack.io/v1alpha1
kind: Qdrant
metadata:
name: $name
namespace: tenant-test
spec:
replicas: 1
size: 10Gi
storageClass: ""
resourcesPreset: "nano"
resources: {}
external: false
EOF
sleep 5
kubectl -n tenant-test wait hr qdrant-$name --timeout=60s --for=condition=ready
kubectl -n tenant-test wait hr qdrant-$name-system --timeout=120s --for=condition=ready
kubectl -n tenant-test wait sts qdrant-$name --timeout=90s --for=jsonpath='{.status.readyReplicas}'=1
kubectl -n tenant-test wait pvc qdrant-storage-qdrant-$name-0 --timeout=50s --for=jsonpath='{.status.phase}'=Bound
kubectl -n tenant-test delete qdrant.apps.cozystack.io $name
}

View file

@ -0,0 +1,4 @@
.helmignore
/logos
/Makefile
/hack

View file

@ -0,0 +1,11 @@
apiVersion: v2
name: qdrant
description: Managed Qdrant vector database service
icon: /logos/qdrant.svg
type: application
version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process
appVersion: "v1.16.3"
dependencies:
- name: cozy-lib
version: "*"
repository: "file://charts/cozy-lib"

View file

@ -0,0 +1,5 @@
include ../../../hack/package.mk
generate:
cozyvalues-gen -v values.yaml -s values.schema.json -r README.md
../../../hack/update-crd.sh

View file

@ -0,0 +1,52 @@
# Managed Qdrant Service
Qdrant is a high-performance vector database and similarity search engine designed for AI and machine learning applications. It provides efficient storage and retrieval of high-dimensional vectors with advanced filtering capabilities, making it ideal for recommendation systems, semantic search, and RAG (Retrieval-Augmented Generation) applications.
## Deployment Details
Service deploys Qdrant as a StatefulSet with automatic cluster mode when multiple replicas are configured.
- Docs: https://qdrant.tech/documentation/
- GitHub: https://github.com/qdrant/qdrant
## Parameters
### Common parameters
| Name | Description | Type | Value |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------- |
| `replicas` | Number of Qdrant replicas. Cluster mode is automatically enabled when replicas > 1. | `int` | `1` |
| `resources` | Explicit CPU and memory configuration for each Qdrant replica. When omitted, the preset defined in `resourcesPreset` is applied. | `object` | `{}` |
| `resources.cpu` | CPU available to each replica. | `quantity` | `""` |
| `resources.memory` | Memory (RAM) available to each replica. | `quantity` | `""` |
| `resourcesPreset` | Default sizing preset used when `resources` is omitted. | `string` | `small` |
| `size` | Persistent Volume Claim size available for vector data storage. | `quantity` | `10Gi` |
| `storageClass` | StorageClass used to store the data. | `string` | `""` |
| `external` | Enable external access from outside the cluster. | `bool` | `false` |
## Parameter examples and reference
### resources and resourcesPreset
`resources` sets explicit CPU and memory configurations for each replica.
When left empty, the preset defined in `resourcesPreset` is applied.
```yaml
resources:
cpu: 4000m
memory: 4Gi
```
`resourcesPreset` sets named CPU and memory configurations for each replica.
This setting is ignored if the corresponding `resources` value is set.
| Preset name | CPU | memory |
|-------------|--------|---------|
| `nano` | `250m` | `128Mi` |
| `micro` | `500m` | `256Mi` |
| `small` | `1` | `512Mi` |
| `medium` | `1` | `1Gi` |
| `large` | `2` | `2Gi` |
| `xlarge` | `4` | `4Gi` |
| `2xlarge` | `8` | `8Gi` |

View file

@ -0,0 +1 @@
../../../library/cozy-lib

View file

@ -0,0 +1,20 @@
<svg width="144" height="144" viewBox="0 0 144 144" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="144" height="144" rx="24" fill="url(#paint0_linear)"/>
<g transform="translate(22, 22) scale(0.58)">
<polygon fill="#dc244c" points="86.6 0 0 50 0 150 86.6 200 119.08 181.25 119.08 143.75 86.6 162.5 32.48 131.25 32.48 68.75 86.6 37.5 140.73 68.75 140.73 193.75 173.21 175 173.21 50 86.6 0"/>
<polygon fill="#dc244c" points="54.13 81.25 54.13 118.75 86.6 137.5 119.08 118.75 119.08 81.25 86.6 62.5 54.13 81.25"/>
<polygon fill="#9e0d38" points="119.08 143.75 119.08 181.25 86.6 200 86.6 162.5 119.08 143.75"/>
<polygon fill="#9e0d38" points="173.21 50 173.21 175 140.73 193.75 140.73 68.75 173.21 50"/>
<polygon fill="#ff516b" points="173.21 50 140.73 68.75 86.6 37.5 32.48 68.75 0 50 86.6 0 173.21 50"/>
<polygon fill="#dc244c" points="86.6 162.5 86.6 200 0 150 0 50 32.48 68.75 32.48 131.25 86.6 162.5"/>
<polygon fill="#ff516b" points="119.08 81.25 86.6 100 54.13 81.25 86.6 62.5 119.08 81.25"/>
<polygon fill="#dc244c" points="86.6 100 86.6 137.5 54.13 118.75 54.13 81.25 86.6 100"/>
<polygon fill="#9e0d38" points="119.08 81.25 119.08 118.75 86.6 137.5 86.6 100 119.08 81.25"/>
</g>
<defs>
<linearGradient id="paint0_linear" x1="189" y1="210.5" x2="0" y2="0" gradientUnits="userSpaceOnUse">
<stop stop-color="#5c0520"/>
<stop offset="1" stop-color="#ffd0d8"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,51 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}-dashboard-resources
rules:
- apiGroups:
- ""
resources:
- services
resourceNames:
- {{ .Release.Name }}
- {{ .Release.Name }}-headless
verbs: ["get", "list", "watch"]
- apiGroups:
- ""
resources:
- secrets
resourceNames:
- {{ .Release.Name }}-apikey
verbs: ["get", "list", "watch"]
- apiGroups:
- cozystack.io
resources:
- workloadmonitors
resourceNames:
- {{ .Release.Name }}
verbs: ["get", "list", "watch"]
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ .Release.Name }}-dashboard-resources
subjects:
{{ include "cozy-lib.rbac.subjectsForTenantAndAccessLevel" (list "use" .Release.Namespace) }}
roleRef:
kind: Role
name: {{ .Release.Name }}-dashboard-resources
apiGroup: rbac.authorization.k8s.io
---
apiVersion: cozystack.io/v1alpha1
kind: WorkloadMonitor
metadata:
name: {{ .Release.Name }}
spec:
minReplicas: 1
replicas: {{ .Values.replicas }}
kind: qdrant
type: qdrant
selector:
app.kubernetes.io/instance: {{ .Release.Name }}-system
version: {{ .Chart.Version }}

View file

@ -0,0 +1,43 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: {{ .Release.Name }}-system
labels:
sharding.fluxcd.io/key: tenants
spec:
chartRef:
kind: ExternalArtifact
name: cozystack-qdrant-application-default-qdrant-system
namespace: cozy-system
interval: 5m
timeout: 10m
install:
remediation:
retries: -1
upgrade:
force: true
remediation:
retries: -1
valuesFrom:
- kind: Secret
name: cozystack-values
values:
qdrant:
fullnameOverride: {{ .Release.Name }}
replicaCount: {{ .Values.replicas }}
resources: {{- include "cozy-lib.resources.defaultingSanitize" (list .Values.resourcesPreset .Values.resources $) | nindent 8 }}
apiKey: true
livenessProbe:
enabled: true
persistence:
size: {{ .Values.size }}
{{- with .Values.storageClass }}
storageClassName: {{ . }}
{{- end }}
metrics:
serviceMonitor:
enabled: true
{{- if .Values.external }}
service:
type: LoadBalancer
{{- end }}

View file

@ -0,0 +1,82 @@
{
"title": "Chart Values",
"type": "object",
"properties": {
"external": {
"description": "Enable external access from outside the cluster.",
"type": "boolean",
"default": false
},
"replicas": {
"description": "Number of Qdrant replicas. Cluster mode is automatically enabled when replicas \u003e 1.",
"type": "integer",
"default": 1
},
"resources": {
"description": "Explicit CPU and memory configuration for each Qdrant replica. When omitted, the preset defined in `resourcesPreset` is applied.",
"type": "object",
"default": {},
"properties": {
"cpu": {
"description": "CPU available to each replica.",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-kubernetes-int-or-string": true
},
"memory": {
"description": "Memory (RAM) available to each replica.",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-kubernetes-int-or-string": true
}
}
},
"resourcesPreset": {
"description": "Default sizing preset used when `resources` is omitted.",
"type": "string",
"default": "small",
"enum": [
"nano",
"micro",
"small",
"medium",
"large",
"xlarge",
"2xlarge"
]
},
"size": {
"description": "Persistent Volume Claim size available for vector data storage.",
"default": "10Gi",
"pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
],
"x-kubernetes-int-or-string": true
},
"storageClass": {
"description": "StorageClass used to store the data.",
"type": "string",
"default": ""
}
}
}

View file

@ -0,0 +1,34 @@
##
## @section Common parameters
##
## @typedef {struct} Resources - Explicit CPU and memory configuration for each Qdrant replica.
## @field {quantity} [cpu] - CPU available to each replica.
## @field {quantity} [memory] - Memory (RAM) available to each replica.
## @enum {string} ResourcesPreset - Default sizing preset.
## @value nano
## @value micro
## @value small
## @value medium
## @value large
## @value xlarge
## @value 2xlarge
## @param {int} replicas - Number of Qdrant replicas. Cluster mode is automatically enabled when replicas > 1.
replicas: 1
## @param {Resources} [resources] - Explicit CPU and memory configuration for each Qdrant replica. When omitted, the preset defined in `resourcesPreset` is applied.
resources: {}
## @param {ResourcesPreset} resourcesPreset="small" - Default sizing preset used when `resources` is omitted.
resourcesPreset: "small"
## @param {quantity} size - Persistent Volume Claim size available for vector data storage.
size: 10Gi
## @param {string} storageClass - StorageClass used to store the data.
storageClass: ""
## @param {bool} external - Enable external access from outside the cluster.
external: false

View file

@ -0,0 +1,3 @@
apiVersion: v2
name: qdrant-rd
version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process

View file

@ -0,0 +1,4 @@
export NAME=qdrant-rd
export NAMESPACE=cozy-system
include ../../../hack/package.mk

View file

@ -0,0 +1,41 @@
apiVersion: cozystack.io/v1alpha1
kind: ApplicationDefinition
metadata:
name: qdrant
spec:
application:
kind: Qdrant
plural: qdrants
singular: qdrant
openAPISchema: |-
{"title":"Chart Values","type":"object","properties":{"external":{"description":"Enable external access from outside the cluster.","type":"boolean","default":false},"replicas":{"description":"Number of Qdrant replicas. Cluster mode is automatically enabled when replicas > 1.","type":"integer","default":1},"resources":{"description":"Explicit CPU and memory configuration for each Qdrant replica. When omitted, the preset defined in `resourcesPreset` is applied.","type":"object","default":{},"properties":{"cpu":{"description":"CPU available to each replica.","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true},"memory":{"description":"Memory (RAM) available to each replica.","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true}}},"resourcesPreset":{"description":"Default sizing preset used when `resources` is omitted.","type":"string","default":"small","enum":["nano","micro","small","medium","large","xlarge","2xlarge"]},"size":{"description":"Persistent Volume Claim size available for vector data storage.","default":"10Gi","pattern":"^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$","anyOf":[{"type":"integer"},{"type":"string"}],"x-kubernetes-int-or-string":true},"storageClass":{"description":"StorageClass used to store the data.","type":"string","default":""}}}
release:
prefix: qdrant-
labels:
sharding.fluxcd.io/key: tenants
chartRef:
kind: ExternalArtifact
name: cozystack-qdrant-application-default-qdrant
namespace: cozy-system
dashboard:
description: Managed Qdrant vector database service
icon: PHN2ZyB3aWR0aD0iMTQ0IiBoZWlnaHQ9IjE0NCIgdmlld0JveD0iMCAwIDE0NCAxNDQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxNDQiIGhlaWdodD0iMTQ0IiByeD0iMjQiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcikiLz4KPGcgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjIsIDIyKSBzY2FsZSgwLjU4KSI+CiAgPHBvbHlnb24gZmlsbD0iI2RjMjQ0YyIgcG9pbnRzPSI4Ni42IDAgMCA1MCAwIDE1MCA4Ni42IDIwMCAxMTkuMDggMTgxLjI1IDExOS4wOCAxNDMuNzUgODYuNiAxNjIuNSAzMi40OCAxMzEuMjUgMzIuNDggNjguNzUgODYuNiAzNy41IDE0MC43MyA2OC43NSAxNDAuNzMgMTkzLjc1IDE3My4yMSAxNzUgMTczLjIxIDUwIDg2LjYgMCIvPgogIDxwb2x5Z29uIGZpbGw9IiNkYzI0NGMiIHBvaW50cz0iNTQuMTMgODEuMjUgNTQuMTMgMTE4Ljc1IDg2LjYgMTM3LjUgMTE5LjA4IDExOC43NSAxMTkuMDggODEuMjUgODYuNiA2Mi41IDU0LjEzIDgxLjI1Ii8+CiAgPHBvbHlnb24gZmlsbD0iIzllMGQzOCIgcG9pbnRzPSIxMTkuMDggMTQzLjc1IDExOS4wOCAxODEuMjUgODYuNiAyMDAgODYuNiAxNjIuNSAxMTkuMDggMTQzLjc1Ii8+CiAgPHBvbHlnb24gZmlsbD0iIzllMGQzOCIgcG9pbnRzPSIxNzMuMjEgNTAgMTczLjIxIDE3NSAxNDAuNzMgMTkzLjc1IDE0MC43MyA2OC43NSAxNzMuMjEgNTAiLz4KICA8cG9seWdvbiBmaWxsPSIjZmY1MTZiIiBwb2ludHM9IjE3My4yMSA1MCAxNDAuNzMgNjguNzUgODYuNiAzNy41IDMyLjQ4IDY4Ljc1IDAgNTAgODYuNiAwIDE3My4yMSA1MCIvPgogIDxwb2x5Z29uIGZpbGw9IiNkYzI0NGMiIHBvaW50cz0iODYuNiAxNjIuNSA4Ni42IDIwMCAwIDE1MCAwIDUwIDMyLjQ4IDY4Ljc1IDMyLjQ4IDEzMS4yNSA4Ni42IDE2Mi41Ii8+CiAgPHBvbHlnb24gZmlsbD0iI2ZmNTE2YiIgcG9pbnRzPSIxMTkuMDggODEuMjUgODYuNiAxMDAgNTQuMTMgODEuMjUgODYuNiA2Mi41IDExOS4wOCA4MS4yNSIvPgogIDxwb2x5Z29uIGZpbGw9IiNkYzI0NGMiIHBvaW50cz0iODYuNiAxMDAgODYuNiAxMzcuNSA1NC4xMyAxMTguNzUgNTQuMTMgODEuMjUgODYuNiAxMDAiLz4KICA8cG9seWdvbiBmaWxsPSIjOWUwZDM4IiBwb2ludHM9IjExOS4wOCA4MS4yNSAxMTkuMDggMTE4Ljc1IDg2LjYgMTM3LjUgODYuNiAxMDAgMTE5LjA4IDgxLjI1Ii8+CjwvZz4KPGRlZnM+CjxsaW5lYXJHcmFkaWVudCBpZD0icGFpbnQwX2xpbmVhciIgeDE9IjE4OSIgeTE9IjIxMC41IiB4Mj0iMCIgeTI9IjAiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iIzVjMDUyMCIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNmZmQwZDgiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K
category: PaaS
singular: Qdrant
plural: Qdrant
tags:
- vector-database
- ai
- ml
keysOrder: [["apiVersion"], ["appVersion"], ["kind"], ["metadata"], ["metadata", "name"], ["spec", "replicas"], ["spec", "resources"], ["spec", "resourcesPreset"], ["spec", "size"], ["spec", "storageClass"], ["spec", "external"]]
secrets:
exclude: []
include:
- resourceNames:
- qdrant-{{ .name }}-apikey
services:
exclude: []
include:
- resourceNames:
- qdrant-{{ .name }}
- qdrant-{{ .name }}-headless

View file

@ -0,0 +1,4 @@
{{- range $path, $_ := .Files.Glob "cozyrds/*" }}
---
{{ $.Files.Get $path }}
{{- end }}

View file

@ -0,0 +1 @@
{}

View file

@ -0,0 +1,3 @@
apiVersion: v2
name: cozy-qdrant
version: 0.0.0 # Placeholder, the actual version will be automatically set during the build process

View file

@ -0,0 +1,7 @@
include ../../../hack/package.mk
update:
rm -rf charts
helm repo add qdrant https://qdrant.github.io/qdrant-helm
helm repo update qdrant
helm pull qdrant/qdrant --untar --untardir charts

View file

@ -0,0 +1,2 @@
.git
.github

View file

@ -0,0 +1,8 @@
# Changelog
## [qdrant-1.16.3](https://github.com/qdrant/qdrant-helm/tree/qdrant-1.16.3) (2025-12-19)
- Update Qdrant to v1.16.3
- Add support for global additional labels [#424](https://github.com/qdrant/qdrant-helm/pull/424)
- Add support for setting persistent volume claim labels [#418](https://github.com/qdrant/qdrant-helm/pull/418)
- Add the ability to set minReadySecond [#417](https://github.com/qdrant/qdrant-helm/pull/417)

View file

@ -0,0 +1,37 @@
annotations:
artifacthub.io/category: database
artifacthub.io/changes: |
- kind: added
description: Update Qdrant to v1.16.3
- kind: added
description: Add support for global additional labels
links:
- name: GitHub Pull Request
url: https://github.com/qdrant/qdrant-helm/pull/424
- kind: added
description: Add support for setting persistent volume claim labels
links:
- name: GitHub Pull Request
url: https://github.com/qdrant/qdrant-helm/pull/418
- kind: fixed
description: Add the ability to set minReadySecond
links:
- name: GitHub Pull Request
url: https://github.com/qdrant/qdrant-helm/pull/417
apiVersion: v2
appVersion: v1.16.3
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.16.3

View file

@ -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.

View file

@ -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.

View file

@ -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 }}

View file

@ -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 -}}

View file

@ -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 }}

View file

@ -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 }}

View file

@ -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 }}

View file

@ -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 }}

View file

@ -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 }}

View file

@ -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 }}

View file

@ -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 }}

View file

@ -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 }}

View file

@ -0,0 +1,312 @@
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 }}
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 }}

View file

@ -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

View file

@ -0,0 +1,293 @@
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
additionalLabels: {}
# 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
# 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

View file

@ -0,0 +1 @@
qdrant: {}