Skip to content

Commit 260a49e

Browse files
authored
Make inference config optional and replace token with enabled boolean (#86)
* Make inference config optional and replace token with enabled boolean The token will be automatically set with the clusterId by the operator. * make gen * Update docs
1 parent 78841be commit 260a49e

File tree

5 files changed

+29
-22
lines changed

5 files changed

+29
-22
lines changed

api/v1/qdrantcluster_types.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,15 +424,15 @@ type QdrantConfiguration struct {
424424
// Storage specifies the storage configuration for Qdrant.
425425
// +optional
426426
Storage *StorageConfig `json:"storage,omitempty"`
427-
// Inference configuration
427+
// Inference configuration. This is used in Qdrant Managed Cloud only. If not set Inference is not available to this cluster.
428428
// +optional
429-
Inference InferenceConfig `json:"inference,omitempty"`
429+
Inference *InferenceConfig `json:"inference,omitempty"`
430430
}
431431

432432
type InferenceConfig struct {
433-
// Token passed to inference endpoint
434-
// +kubebuilder:validation:MinLength:=1
435-
Token string `json:"token"`
433+
// Enabled specifies whether to enable inference for the cluster or not.
434+
// +optional
435+
Enabled *bool `json:"enabled,omitempty"`
436436
}
437437

438438
type StorageConfig struct {

api/v1/zz_generated.deepcopy.go

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/qdrant-kubernetes-api/templates/region-crds/qdrant.io_qdrantclusters.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,13 @@ spec:
9292
type: integer
9393
type: object
9494
inference:
95-
description: Inference configuration
95+
description: Inference configuration. This is used in Qdrant Managed
96+
Cloud only. If not set Inference is not available to this cluster.
9697
properties:
97-
token:
98-
description: Token passed to inference endpoint
99-
minLength: 1
100-
type: string
101-
required:
102-
- token
98+
enabled:
99+
description: Enabled specifies whether to enable inference
100+
for the cluster or not.
101+
type: boolean
103102
type: object
104103
log_level:
105104
description: LogLevel specifies the log level for Qdrant.

crds/qdrant.io_qdrantclusters.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,13 @@ spec:
9191
type: integer
9292
type: object
9393
inference:
94-
description: Inference configuration
94+
description: Inference configuration. This is used in Qdrant Managed
95+
Cloud only. If not set Inference is not available to this cluster.
9596
properties:
96-
token:
97-
description: Token passed to inference endpoint
98-
minLength: 1
99-
type: string
100-
required:
101-
- token
97+
enabled:
98+
description: Enabled specifies whether to enable inference
99+
for the cluster or not.
100+
type: boolean
102101
type: object
103102
log_level:
104103
description: LogLevel specifies the log level for Qdrant.

docs/api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ _Appears in:_
168168

169169
| Field | Description | Default | Validation |
170170
| --- | --- | --- | --- |
171-
| `token` _string_ | Token passed to inference endpoint | | MinLength: 1 <br /> |
171+
| `enabled` _boolean_ | Enabled specifies whether to enable inference for the cluster or not. | | |
172172

173173

174174
#### Ingress
@@ -721,7 +721,7 @@ _Appears in:_
721721
| `service` _[QdrantConfigurationService](#qdrantconfigurationservice)_ | Service specifies the service level configuration for Qdrant. | | |
722722
| `tls` _[QdrantConfigurationTLS](#qdrantconfigurationtls)_ | TLS specifies the TLS configuration for Qdrant. | | |
723723
| `storage` _[StorageConfig](#storageconfig)_ | Storage specifies the storage configuration for Qdrant. | | |
724-
| `inference` _[InferenceConfig](#inferenceconfig)_ | Inference configuration | | |
724+
| `inference` _[InferenceConfig](#inferenceconfig)_ | Inference configuration. This is used in Qdrant Managed Cloud only. If not set Inference is not available to this cluster. | | |
725725

726726

727727
#### QdrantConfigurationCollection

0 commit comments

Comments
 (0)