Skip to content

Commit e4c2677

Browse files
authored
Improve hybrid cloud env status (#81)
* Improve hybrid cloud env status This adds information about StorageClasses, VolumeSnapshotClasses and Nodes to the hybrid cloud env status. We can then use these to improve the hybrid cloud UX' * Rename field
1 parent 90308e3 commit e4c2677

File tree

5 files changed

+489
-0
lines changed

5 files changed

+489
-0
lines changed

api/v1/region_types.go

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,70 @@ type QdrantCloudRegionStatus struct {
103103
// Monitoring specifies monitoring status
104104
// +optional
105105
Monitoring Monitoring `json:"monitoring,omitempty"`
106+
// StorageClasses contains the availble StorageClasses in the Kubernetes cluster
107+
// +optional
108+
StorageClasses []StorageClass `json:"storageClasses,omitempty"`
109+
// VolumeSnapshotClasses contains the available VolumeSnapshotClasses in the Kubernetes cluster
110+
// +optional
111+
VolumeSnapshotClasses []VolumeSnapshotClass `json:"volumeSnapshotClasses,omitempty"`
112+
// NodeInfos contains the information about the nodes in the Kubernetes cluster
113+
// +optional
114+
NodeInfos []NodeInfo `json:"nodeInfos,omitempty"`
115+
}
116+
117+
type StorageClass struct {
118+
// Name specifies the name of the storage class
119+
Name string `json:"name"`
120+
// Default specifies whether the storage class is the default storage class
121+
Default bool `json:"default"`
122+
// Provisioner specifies the provisioner of the storage class
123+
Provisioner string `json:"provisioner"`
124+
// AllowVolumeExpansion specifies whether the storage class allows volume expansion
125+
AllowVolumeExpansion bool `json:"allowVolumeExpansion"`
126+
// ReclaimPolicy specifies the reclaim policy of the storage class
127+
ReclaimPolicy string `json:"reclaimPolicy"`
128+
// Parameters specifies the parameters of the storage class
129+
// +optional
130+
Parameters map[string]string `json:"parameters"`
131+
}
132+
133+
type VolumeSnapshotClass struct {
134+
// Name specifies the name of the volume snapshot class
135+
Name string `json:"name"`
136+
// Driver specifies the driver of the volume snapshot class
137+
Driver string `json:"driver"`
138+
}
139+
140+
type NodeInfo struct {
141+
// Name specifies the name of the node
142+
Name string `json:"name"`
143+
// Region specifies the region of the node
144+
// +optional
145+
Region string `json:"region,omitempty"`
146+
// Zone specifies the zone of the node
147+
// +optional
148+
Zone string `json:"zone,omitempty"`
149+
// InstanceType specifies the instance type of the node
150+
// +optional
151+
InstanceType string `json:"instanceType,omitempty"`
152+
// Arch specifies the CPU architecture of the node
153+
// +optional
154+
Arch string `json:"arch,omitempty"`
155+
// Capacity specifies the capacity of the node
156+
Capacity NodeResourceInfo `json:"capacity"`
157+
// Allocatable specifies the allocatable resources of the node
158+
Allocatable NodeResourceInfo `json:"allocatable"`
159+
}
160+
161+
type NodeResourceInfo struct {
162+
// CPU specifies the CPU resources of the node
163+
CPU string `json:"cpu"`
164+
// Memory specifies the memory resources of the node
165+
Memory string `json:"memory"`
166+
// Pods specifies the pods resources of the node
167+
Pods string `json:"pods"`
168+
// EphemeralStorage specifies the ephemeral storage resources of the node
169+
EphemeralStorage string `json:"ephemeralStorage"`
106170
}
107171

108172
type Monitoring struct {

api/v1/zz_generated.deepcopy.go

Lines changed: 86 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: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,13 +1760,143 @@ spec:
17601760
description: NodeMetricSource specifies the node metric source
17611761
type: string
17621762
type: object
1763+
nodeInfos:
1764+
description: NodeInfos contains the information about the nodes in
1765+
the Kubernetes cluster
1766+
items:
1767+
properties:
1768+
allocatable:
1769+
description: Allocatable specifies the allocatable resources
1770+
of the node
1771+
properties:
1772+
cpu:
1773+
description: CPU specifies the CPU resources of the node
1774+
type: string
1775+
ephemeralStorage:
1776+
description: EphemeralStorage specifies the ephemeral storage
1777+
resources of the node
1778+
type: string
1779+
memory:
1780+
description: Memory specifies the memory resources of the
1781+
node
1782+
type: string
1783+
pods:
1784+
description: Pods specifies the pods resources of the node
1785+
type: string
1786+
required:
1787+
- cpu
1788+
- ephemeralStorage
1789+
- memory
1790+
- pods
1791+
type: object
1792+
arch:
1793+
description: Arch specifies the CPU architecture of the node
1794+
type: string
1795+
capacity:
1796+
description: Capacity specifies the capacity of the node
1797+
properties:
1798+
cpu:
1799+
description: CPU specifies the CPU resources of the node
1800+
type: string
1801+
ephemeralStorage:
1802+
description: EphemeralStorage specifies the ephemeral storage
1803+
resources of the node
1804+
type: string
1805+
memory:
1806+
description: Memory specifies the memory resources of the
1807+
node
1808+
type: string
1809+
pods:
1810+
description: Pods specifies the pods resources of the node
1811+
type: string
1812+
required:
1813+
- cpu
1814+
- ephemeralStorage
1815+
- memory
1816+
- pods
1817+
type: object
1818+
instanceType:
1819+
description: InstanceType specifies the instance type of the
1820+
node
1821+
type: string
1822+
name:
1823+
description: Name specifies the name of the node
1824+
type: string
1825+
region:
1826+
description: Region specifies the region of the node
1827+
type: string
1828+
zone:
1829+
description: Zone specifies the zone of the node
1830+
type: string
1831+
required:
1832+
- allocatable
1833+
- capacity
1834+
- name
1835+
type: object
1836+
type: array
17631837
numberOfNodes:
17641838
description: NumberOfNodes specifies the number of nodes in the Kubernetes
17651839
cluster
17661840
type: integer
17671841
phase:
17681842
description: Phase specifies the current phase of the region
17691843
type: string
1844+
storageClasses:
1845+
description: StorageClasses contains the availble StorageClasses in
1846+
the Kubernetes cluster
1847+
items:
1848+
properties:
1849+
allowVolumeExpansion:
1850+
description: AllowVolumeExpansion specifies whether the storage
1851+
class allows volume expansion
1852+
type: boolean
1853+
default:
1854+
description: Default specifies whether the storage class is
1855+
the default storage class
1856+
type: boolean
1857+
name:
1858+
description: Name specifies the name of the storage class
1859+
type: string
1860+
parameters:
1861+
additionalProperties:
1862+
type: string
1863+
description: Parameters specifies the parameters of the storage
1864+
class
1865+
type: object
1866+
provisioner:
1867+
description: Provisioner specifies the provisioner of the storage
1868+
class
1869+
type: string
1870+
reclaimPolicy:
1871+
description: ReclaimPolicy specifies the reclaim policy of the
1872+
storage class
1873+
type: string
1874+
required:
1875+
- allowVolumeExpansion
1876+
- default
1877+
- name
1878+
- provisioner
1879+
- reclaimPolicy
1880+
type: object
1881+
type: array
1882+
volumeSnapshotClasses:
1883+
description: VolumeSnapshotClasses contains the available VolumeSnapshotClasses
1884+
in the Kubernetes cluster
1885+
items:
1886+
properties:
1887+
driver:
1888+
description: Driver specifies the driver of the volume snapshot
1889+
class
1890+
type: string
1891+
name:
1892+
description: Name specifies the name of the volume snapshot
1893+
class
1894+
type: string
1895+
required:
1896+
- driver
1897+
- name
1898+
type: object
1899+
type: array
17701900
type: object
17711901
type: object
17721902
x-kubernetes-preserve-unknown-fields: true

0 commit comments

Comments
 (0)