Skip to content

Commit eef842c

Browse files
authored
Add Components field and deprecate HelmReleases and HelmRepositories fields in Region type (#70)
1 parent 195ffb0 commit eef842c

File tree

5 files changed

+120
-10
lines changed

5 files changed

+120
-10
lines changed

api/v1/region_types.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,30 @@ const (
1515
type QdrantCloudRegionSpec struct {
1616
// Id specifies the unique identifier of the region
1717
Id string `json:"id,omitempty"`
18+
// Components specifies the list of components to be installed in the region
19+
// +optional
20+
Components []ComponentReference `json:"components,omitempty"`
1821
// HelmRepositories specifies the list of helm repositories to be created to the region
22+
// Deprecated: Use "Components" instead
1923
// +optional
2024
HelmRepositories []HelmRepository `json:"helmRepositories,omitempty"`
2125
// HelmReleases specifies the list of helm releases to be created to the region
26+
// Deprecated: Use "Components" instead
2227
// +optional
2328
HelmReleases []HelmRelease `json:"helmReleases,omitempty"`
2429
}
2530

31+
type ComponentReference struct {
32+
// APIVersion is the group and version of the component being referenced.
33+
APIVersion string `json:"apiVersion"`
34+
// Kind is the type of component being referenced
35+
Kind string `json:"kind"`
36+
// Name is the name of component being referenced
37+
Name string `json:"name"`
38+
// Namespace is the namespace of component being referenced.
39+
Namespace string `json:"namespace"`
40+
}
41+
2642
type HelmRepository struct {
2743
// MarkedForDeletionAt specifies the time when the helm repository was marked for deletion
2844
// +optional

api/v1/zz_generated.deepcopy.go

Lines changed: 20 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: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,35 @@ spec:
5353
spec:
5454
description: QdrantCloudRegionSpec defines the desired state of QdrantCloudRegion
5555
properties:
56+
components:
57+
description: Components specifies the list of components to be installed
58+
in the region
59+
items:
60+
properties:
61+
apiVersion:
62+
description: APIVersion is the group and version of the component
63+
being referenced.
64+
type: string
65+
kind:
66+
description: Kind is the type of component being referenced
67+
type: string
68+
name:
69+
description: Name is the name of component being referenced
70+
type: string
71+
namespace:
72+
description: Namespace is the namespace of component being referenced.
73+
type: string
74+
required:
75+
- apiVersion
76+
- kind
77+
- name
78+
- namespace
79+
type: object
80+
type: array
5681
helmReleases:
57-
description: HelmReleases specifies the list of helm releases to be
58-
created to the region
82+
description: |-
83+
HelmReleases specifies the list of helm releases to be created to the region
84+
Deprecated: Use "Components" instead
5985
items:
6086
properties:
6187
markedForDeletionAt:
@@ -1338,8 +1364,9 @@ spec:
13381364
type: object
13391365
type: array
13401366
helmRepositories:
1341-
description: HelmRepositories specifies the list of helm repositories
1342-
to be created to the region
1367+
description: |-
1368+
HelmRepositories specifies the list of helm repositories to be created to the region
1369+
Deprecated: Use "Components" instead
13431370
items:
13441371
properties:
13451372
markedForDeletionAt:

crds/qdrant.io_qdrantcloudregions.yaml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,35 @@ spec:
5252
spec:
5353
description: QdrantCloudRegionSpec defines the desired state of QdrantCloudRegion
5454
properties:
55+
components:
56+
description: Components specifies the list of components to be installed
57+
in the region
58+
items:
59+
properties:
60+
apiVersion:
61+
description: APIVersion is the group and version of the component
62+
being referenced.
63+
type: string
64+
kind:
65+
description: Kind is the type of component being referenced
66+
type: string
67+
name:
68+
description: Name is the name of component being referenced
69+
type: string
70+
namespace:
71+
description: Namespace is the namespace of component being referenced.
72+
type: string
73+
required:
74+
- apiVersion
75+
- kind
76+
- name
77+
- namespace
78+
type: object
79+
type: array
5580
helmReleases:
56-
description: HelmReleases specifies the list of helm releases to be
57-
created to the region
81+
description: |-
82+
HelmReleases specifies the list of helm releases to be created to the region
83+
Deprecated: Use "Components" instead
5884
items:
5985
properties:
6086
markedForDeletionAt:
@@ -1337,8 +1363,9 @@ spec:
13371363
type: object
13381364
type: array
13391365
helmRepositories:
1340-
description: HelmRepositories specifies the list of helm repositories
1341-
to be created to the region
1366+
description: |-
1367+
HelmRepositories specifies the list of helm repositories to be created to the region
1368+
Deprecated: Use "Components" instead
13421369
items:
13431370
properties:
13441371
markedForDeletionAt:

docs/api.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,25 @@ _Appears in:_
5252

5353

5454

55+
#### ComponentReference
56+
57+
58+
59+
60+
61+
62+
63+
_Appears in:_
64+
- [QdrantCloudRegionSpec](#qdrantcloudregionspec)
65+
66+
| Field | Description | Default | Validation |
67+
| --- | --- | --- | --- |
68+
| `apiVersion` _string_ | APIVersion is the group and version of the component being referenced. | | |
69+
| `kind` _string_ | Kind is the type of component being referenced | | |
70+
| `name` _string_ | Name is the name of component being referenced | | |
71+
| `namespace` _string_ | Namespace is the namespace of component being referenced. | | |
72+
73+
5574
#### ComponentStatus
5675

5776

@@ -397,8 +416,9 @@ _Appears in:_
397416
| Field | Description | Default | Validation |
398417
| --- | --- | --- | --- |
399418
| `id` _string_ | Id specifies the unique identifier of the region | | |
400-
| `helmRepositories` _[HelmRepository](#helmrepository) array_ | HelmRepositories specifies the list of helm repositories to be created to the region | | |
401-
| `helmReleases` _[HelmRelease](#helmrelease) array_ | HelmReleases specifies the list of helm releases to be created to the region | | |
419+
| `components` _[ComponentReference](#componentreference) array_ | Components specifies the list of components to be installed in the region | | |
420+
| `helmRepositories` _[HelmRepository](#helmrepository) array_ | HelmRepositories specifies the list of helm repositories to be created to the region<br />Deprecated: Use "Components" instead | | |
421+
| `helmReleases` _[HelmRelease](#helmrelease) array_ | HelmReleases specifies the list of helm releases to be created to the region<br />Deprecated: Use "Components" instead | | |
402422

403423

404424

0 commit comments

Comments
 (0)