diff --git a/api/v1/region_types.go b/api/v1/region_types.go index 2bb4e89..933cfd4 100644 --- a/api/v1/region_types.go +++ b/api/v1/region_types.go @@ -49,6 +49,13 @@ const ( FailedToSync RegionPhase = "FailedToSync" ) +type MetricSource string + +const ( + KubeletMetricSource MetricSource = "kubelet" + ApiMetricSource MetricSource = "api" +) + type QdrantCloudRegionStatus struct { // Phase specifies the current phase of the region // +optional @@ -74,6 +81,18 @@ type QdrantCloudRegionStatus struct { // KubernetesDistribution specifies the distribution of the Kubernetes cluster // +optional KubernetesDistribution KubernetesDistribution `json:"k8sDistribution,omitempty"` + // Monitoring specifies monitoring status + // +optional + Monitoring Monitoring `json:"monitoring,omitempty"` +} + +type Monitoring struct { + // CAdvisorMetricSource specifies the cAdvisor metric source + // +optional + CAdvisorMetricSource MetricSource `json:"cAdvisorMetricSource,omitempty"` + // NodeMetricSource specifies the node metric source + // +optional + NodeMetricSource MetricSource `json:"nodeMetricSource,omitempty"` } type RegionCapabilities struct { diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index 0758b5a..7d11b32 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -210,6 +210,21 @@ func (in *KubernetesStatefulSet) DeepCopy() *KubernetesStatefulSet { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Monitoring) DeepCopyInto(out *Monitoring) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Monitoring. +func (in *Monitoring) DeepCopy() *Monitoring { + if in == nil { + return nil + } + out := new(Monitoring) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NGINXConfig) DeepCopyInto(out *NGINXConfig) { *out = *in @@ -413,6 +428,7 @@ func (in *QdrantCloudRegionStatus) DeepCopyInto(out *QdrantCloudRegionStatus) { *out = make([]ComponentStatus, len(*in)) copy(*out, *in) } + out.Monitoring = in.Monitoring } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QdrantCloudRegionStatus. diff --git a/charts/qdrant-kubernetes-api/templates/region-crds/qdrant.io_qdrantcloudregions.yaml b/charts/qdrant-kubernetes-api/templates/region-crds/qdrant.io_qdrantcloudregions.yaml index 3e52d75..ff769b5 100644 --- a/charts/qdrant-kubernetes-api/templates/region-crds/qdrant.io_qdrantcloudregions.yaml +++ b/charts/qdrant-kubernetes-api/templates/region-crds/qdrant.io_qdrantcloudregions.yaml @@ -1718,6 +1718,17 @@ spec: description: Message specifies the info explaining the current phase of the region type: string + monitoring: + description: Monitoring specifies monitoring status + properties: + cAdvisorMetricSource: + description: CAdvisorMetricSource specifies the cAdvisor metric + source + type: string + nodeMetricSource: + description: NodeMetricSource specifies the node metric source + type: string + type: object numberOfNodes: description: NumberOfNodes specifies the number of nodes in the Kubernetes cluster diff --git a/docs/api.md b/docs/api.md index 0ac9629..5761662 100644 --- a/docs/api.md +++ b/docs/api.md @@ -194,6 +194,36 @@ _Appears in:_ | `pods` _[KubernetesPod](#kubernetespod)_ | Pods specifies the configuration of the Pods of the Qdrant StatefulSet. | | | +#### MetricSource + +_Underlying type:_ _string_ + + + + + +_Appears in:_ +- [Monitoring](#monitoring) + + + +#### Monitoring + + + + + + + +_Appears in:_ +- [QdrantCloudRegionStatus](#qdrantcloudregionstatus) + +| Field | Description | Default | Validation | +| --- | --- | --- | --- | +| `cAdvisorMetricSource` _[MetricSource](#metricsource)_ | CAdvisorMetricSource specifies the cAdvisor metric source | | | +| `nodeMetricSource` _[MetricSource](#metricsource)_ | NodeMetricSource specifies the node metric source | | | + + #### NGINXConfig