Skip to content

Commit 81962f4

Browse files
authored
Add monitoring to region status (#41)
* Add AlternativeMonitoringSource to QdrantCloudRegionStatus and update API documentation * Add alternativeMonitoringSource to QdrantCloudRegionStatus with cAdvisor and node monitoring source properties * Refactor QdrantCloudRegionStatus to replace AlternativeMonitoringSource with MonitoringStatus and update related documentation * Refactor MonitoringSource to MetricSource in QdrantCloudRegionStatus and update related documentation * Refactor QdrantCloudRegionStatus to change MonitoringStatus to Monitoring and update related deepcopy functions and documentation
1 parent 60e988a commit 81962f4

File tree

4 files changed

+76
-0
lines changed

4 files changed

+76
-0
lines changed

api/v1/region_types.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ const (
4949
FailedToSync RegionPhase = "FailedToSync"
5050
)
5151

52+
type MetricSource string
53+
54+
const (
55+
KubeletMetricSource MetricSource = "kubelet"
56+
ApiMetricSource MetricSource = "api"
57+
)
58+
5259
type QdrantCloudRegionStatus struct {
5360
// Phase specifies the current phase of the region
5461
// +optional
@@ -74,6 +81,18 @@ type QdrantCloudRegionStatus struct {
7481
// KubernetesDistribution specifies the distribution of the Kubernetes cluster
7582
// +optional
7683
KubernetesDistribution KubernetesDistribution `json:"k8sDistribution,omitempty"`
84+
// Monitoring specifies monitoring status
85+
// +optional
86+
Monitoring Monitoring `json:"monitoring,omitempty"`
87+
}
88+
89+
type Monitoring struct {
90+
// CAdvisorMetricSource specifies the cAdvisor metric source
91+
// +optional
92+
CAdvisorMetricSource MetricSource `json:"cAdvisorMetricSource,omitempty"`
93+
// NodeMetricSource specifies the node metric source
94+
// +optional
95+
NodeMetricSource MetricSource `json:"nodeMetricSource,omitempty"`
7796
}
7897

7998
type RegionCapabilities struct {

api/v1/zz_generated.deepcopy.go

Lines changed: 16 additions & 0 deletions
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_qdrantcloudregions.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1718,6 +1718,17 @@ spec:
17181718
description: Message specifies the info explaining the current phase
17191719
of the region
17201720
type: string
1721+
monitoring:
1722+
description: Monitoring specifies monitoring status
1723+
properties:
1724+
cAdvisorMetricSource:
1725+
description: CAdvisorMetricSource specifies the cAdvisor metric
1726+
source
1727+
type: string
1728+
nodeMetricSource:
1729+
description: NodeMetricSource specifies the node metric source
1730+
type: string
1731+
type: object
17211732
numberOfNodes:
17221733
description: NumberOfNodes specifies the number of nodes in the Kubernetes
17231734
cluster

docs/api.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,36 @@ _Appears in:_
194194
| `pods` _[KubernetesPod](#kubernetespod)_ | Pods specifies the configuration of the Pods of the Qdrant StatefulSet. | | |
195195

196196

197+
#### MetricSource
198+
199+
_Underlying type:_ _string_
200+
201+
202+
203+
204+
205+
_Appears in:_
206+
- [Monitoring](#monitoring)
207+
208+
209+
210+
#### Monitoring
211+
212+
213+
214+
215+
216+
217+
218+
_Appears in:_
219+
- [QdrantCloudRegionStatus](#qdrantcloudregionstatus)
220+
221+
| Field | Description | Default | Validation |
222+
| --- | --- | --- | --- |
223+
| `cAdvisorMetricSource` _[MetricSource](#metricsource)_ | CAdvisorMetricSource specifies the cAdvisor metric source | | |
224+
| `nodeMetricSource` _[MetricSource](#metricsource)_ | NodeMetricSource specifies the node metric source | | |
225+
226+
197227
#### NGINXConfig
198228

199229

0 commit comments

Comments
 (0)