Skip to content

Commit

Permalink
Store individual node indexes (as preparation of allowing 'missing' n…
Browse files Browse the repository at this point in the history
…odes) (#15)

The operator need to fill the fields automatically with 0...n-1 if it detects the field was not set previously.
  • Loading branch information
Robert-Stam committed Sep 12, 2024
1 parent 3de2486 commit 0daca45
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 2 deletions.
4 changes: 4 additions & 0 deletions api/v1/qdrantcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,10 @@ type QdrantClusterStatus struct {
// AvailableNodes specifies the number of available nodes in the cluster
// +optional
AvailableNodes int `json:"availableNodes,omitempty"`
// AvailableNodeIndexes specifies the indexes of the individual nodes in the cluster
// The number of indexes should be equal with the AvailableNodes field.
// +optional
AvailableNodeIndexes []int `json:"availableNodeIndexes,omitempty"`
// BootstrapNode specifies the node in the cluster which will be used for bootstrapping a new node.
// Should be 0...n-1 (default = 0)
// +optional
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.

65 changes: 63 additions & 2 deletions charts/qdrant-operator-crds/crds/qdrant.io_qdrantcloudregions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ spec:
maxLength: 2048
minLength: 1
type: string
ignoreMissingValuesFiles:
description: IgnoreMissingValuesFiles controls
whether to silently ignore missing values
files rather than failing.
type: boolean
interval:
description: |-
Interval at which to check the v1.Source for updates. Defaults to
Expand Down Expand Up @@ -198,6 +203,7 @@ spec:
used to sign the OCI Helm chart.
enum:
- cosign
- notation
type: string
secretRef:
description: |-
Expand Down Expand Up @@ -226,6 +232,39 @@ spec:
required:
- spec
type: object
chartRef:
description: |-
ChartRef holds a reference to a source controller resource containing the
Helm chart artifact.
Note: this field is provisional to the v2 API, and not actively used
by v2beta2 HelmReleases.
properties:
apiVersion:
description: APIVersion of the referent.
type: string
kind:
description: Kind of the referent.
enum:
- OCIRepository
- HelmChart
type: string
name:
description: Name of the referent.
maxLength: 253
minLength: 1
type: string
namespace:
description: |-
Namespace of the referent, defaults to the namespace of the Kubernetes
resource object that contains the reference.
maxLength: 63
minLength: 1
type: string
required:
- kind
- name
type: object
dependsOn:
description: |-
DependsOn may contain a meta.NamespacedObjectReference slice with
Expand Down Expand Up @@ -1007,9 +1046,12 @@ spec:
type: object
type: array
required:
- chart
- interval
type: object
x-kubernetes-validations:
- message: either chart or chartRef must be set
rule: (has(self.chart) && !has(self.chartRef)) || (!has(self.chart)
&& has(self.chartRef))
status:
default:
observedGeneration: -1
Expand Down Expand Up @@ -1102,6 +1144,10 @@ spec:
Provisional: when the calculation method of the Digest field is changed,
this field will be used to distinguish between the old and new methods.
type: string
appVersion:
description: AppVersion is the chart app version
of the release object in storage.
type: string
chartName:
description: ChartName is the chart name of the
release object in storage.
Expand Down Expand Up @@ -1143,6 +1189,10 @@ spec:
description: Namespace is the namespace the release
is deployed to.
type: string
ociDigest:
description: OCIDigest is the digest of the OCI
artifact associated with the release.
type: string
status:
description: Status is the current state of the
release.
Expand Down Expand Up @@ -1223,7 +1273,13 @@ spec:
lastAttemptedRevision:
description: |-
LastAttemptedRevision is the Source revision of the last reconciliation
attempt.
attempt. For OCIRepository sources, the 12 first characters of the digest are
appended to the chart version e.g. "1.2.3+1234567890ab".
type: string
lastAttemptedRevisionDigest:
description: |-
LastAttemptedRevisionDigest is the digest of the last reconciliation attempt.
This is only set for OCIRepository sources.
type: string
lastAttemptedValuesChecksum:
description: |-
Expand Down Expand Up @@ -1257,6 +1313,11 @@ spec:
generation.
format: int64
type: integer
observedPostRenderersDigest:
description: |-
ObservedPostRenderersDigest is the digest for the post-renderers of
the last successful reconciliation attempt.
type: string
storageNamespace:
description: |-
StorageNamespace is the namespace of the Helm release storage for the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,13 @@ spec:
status:
description: QdrantClusterStatus defines the observed state of QdrantCluster
properties:
availableNodeIndexes:
description: |-
AvailableNodeIndexes specifies the indexes of the individual nodes in the cluster
The number of indexes should be equal with the AvailableNodes field.
items:
type: integer
type: array
availableNodes:
description: AvailableNodes specifies the number of available nodes
in the cluster
Expand Down

0 comments on commit 0daca45

Please sign in to comment.