Skip to content

Commit

Permalink
Enhance the ClusterManager default (#11)
Browse files Browse the repository at this point in the history
* Enhance the ClusterManager default

This way we can configure the default if the Cluster-manager will be used in the operator without changing all QC objects.

* run `make gen`
  • Loading branch information
Robert-Stam authored Sep 4, 2024
1 parent 499d4ea commit 8311a82
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
6 changes: 3 additions & 3 deletions api/v1/qdrantcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func GetQdrantClusterCrdForHash(qc QdrantCluster) QdrantCluster {
}
// Remove all fields (aka set a fixed value) which shouldn't restart the pod
// The list is sorted alphabetically, for easier maintainability
cloned.ClusterManager = false
cloned.ClusterManager = nil
cloned.Distributed = false
cloned.Ingress = nil
cloned.OperatorVersion = nil
Expand Down Expand Up @@ -94,9 +94,9 @@ type QdrantClusterSpec struct {
// ClusterManager specifies whether to use the cluster manager for this cluster.
// The Python-operator will deploy a dedicated cluster manager instance.
// The Go-operator will use a shared instance.
// +kubebuilder:default=false
// If not set, the default will be taken from the operator config.
// +optional
ClusterManager bool `json:"clusterManager,omitempty"`
ClusterManager *bool `json:"clusterManager,omitempty"`
// Suspend specifies whether to suspend the cluster.
// If enabled, the cluster will be suspended and all related resources will be removed except the PVCs.
// +kubebuilder:default=false
Expand Down
5 changes: 5 additions & 0 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ spec:
description: QdrantClusterSpec defines the desired state of QdrantCluster
properties:
clusterManager:
default: false
description: |-
ClusterManager specifies whether to use the cluster manager for this cluster.
The Python-operator will deploy a dedicated cluster manager instance.
The Go-operator will use a shared instance.
If not set, the default will be taken from the operator config.
type: boolean
config:
description: Config specifies the Qdrant configuration setttings for
Expand Down
2 changes: 1 addition & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ _Appears in:_
| `version` _string_ | Version specifies the version of Qdrant to deploy | | |
| `size` _integer_ | Size specifies the desired number of Qdrant nodes in the cluster | | Maximum: 30 <br />Minimum: 1 <br /> |
| `servicePerNode` _boolean_ | ServicePerNode specifies whether the cluster should start a dedicated service for each node. | true | |
| `clusterManager` _boolean_ | ClusterManager specifies whether to use the cluster manager for this cluster.<br />The Python-operator will deploy a dedicated cluster manager instance.<br />The Go-operator will use a shared instance. | false | |
| `clusterManager` _boolean_ | ClusterManager specifies whether to use the cluster manager for this cluster.<br />The Python-operator will deploy a dedicated cluster manager instance.<br />The Go-operator will use a shared instance.<br />If not set, the default will be taken from the operator config. | | |
| `suspend` _boolean_ | Suspend specifies whether to suspend the cluster.<br />If enabled, the cluster will be suspended and all related resources will be removed except the PVCs. | false | |
| `pauses` _[Pause](#pause) array_ | Pauses specifies a list of pause request by developer for manual maintenance.<br />Operator will skip handling any changes in the CR if any pause request is present. | | |
| `distributed` _boolean_ | Deprecated | | |
Expand Down

0 comments on commit 8311a82

Please sign in to comment.