Skip to content

Commit e52b4dc

Browse files
authored
Merge pull request #63 from numtide/multi-cell-deployment-for-multiorch
Update MultiOrch to know about multiple Cells
2 parents fe414ef + bd74e7a commit e52b4dc

File tree

6 files changed

+1670
-46
lines changed

6 files changed

+1670
-46
lines changed

api/v1alpha1/multiorch_types.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
// the fields to be serialized.
2626

2727
// MultiOrchSpec defines the desired state of MultiOrch.
28-
type MultiOrchSpec struct {
28+
type MultiOrchSpec_X struct {
2929
// CellName is the name of the cell this MultiOrch belongs to.
3030
// +kubebuilder:validation:MinLength=1
3131
// +optional
@@ -106,7 +106,7 @@ type MultiOrchSpec struct {
106106
}
107107

108108
// MultiOrchStatus defines the observed state of MultiOrch.
109-
type MultiOrchStatus struct {
109+
type MultiOrchStatus_X struct {
110110
// Ready indicates whether the MultiOrch is healthy and available.
111111
Ready bool `json:"ready"`
112112

@@ -134,7 +134,7 @@ type MultiOrchStatus struct {
134134
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
135135

136136
// MultiOrch is the Schema for the multiorches API
137-
type MultiOrch struct {
137+
type MultiOrch_X struct {
138138
metav1.TypeMeta `json:",inline"`
139139

140140
// metadata is a standard object metadata
@@ -143,22 +143,22 @@ type MultiOrch struct {
143143

144144
// spec defines the desired state of MultiOrch
145145
// +required
146-
Spec MultiOrchSpec `json:"spec"`
146+
Spec MultiOrchSpec_X `json:"spec"`
147147

148148
// status defines the observed state of MultiOrch
149149
// +optional
150-
Status MultiOrchStatus `json:"status,omitempty,omitzero"`
150+
Status MultiOrchStatus_X `json:"status,omitempty,omitzero"`
151151
}
152152

153153
// +kubebuilder:object:root=true
154154

155155
// MultiOrchList contains a list of MultiOrch
156-
type MultiOrchList struct {
157-
metav1.TypeMeta ` json:",inline"`
158-
metav1.ListMeta ` json:"metadata,omitempty"`
159-
Items []MultiOrch `json:"items"`
156+
type MultiOrchList_X struct {
157+
metav1.TypeMeta ` json:",inline"`
158+
metav1.ListMeta ` json:"metadata,omitempty"`
159+
Items []MultiOrch_X `json:"items"`
160160
}
161161

162162
func init() {
163-
SchemeBuilder.Register(&MultiOrch{}, &MultiOrchList{})
163+
SchemeBuilder.Register(&MultiOrch_X{}, &MultiOrchList_X{})
164164
}

api/v1alpha1/shard_types.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ type ShardPoolSpec struct {
6262
// +kubebuilder:validation:Pattern:="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
6363
Cell string `json:"cell,omitempty"`
6464

65+
Database string `json:"database,omitempty"`
66+
TableGroup string `json:"tableGroup,omitempty"`
67+
6568
// Replicas is the desired number of pods in this pool.
6669
// +kubebuilder:validation:Minimum=1
6770
// +optional
@@ -83,6 +86,9 @@ type ShardPoolSpec struct {
8386
// MultiPooler defines the configuration for the MultiPooler container.
8487
// +optional
8588
MultiPooler MultiPoolerSpec `json:"multipooler,omitempty"`
89+
90+
// MultiOrch defines the desired state of MultiOrch.
91+
MultiOrch MultiOrchSpec `json:"multiOrch,omitempty"`
8692
}
8793

8894
// PostgresSpec defines the configuration for the Postgres container.
@@ -99,6 +105,21 @@ type MultiPoolerSpec struct {
99105
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
100106
}
101107

108+
// MultiOrchSpec defines the configuration for the MultiPooler container.
109+
type MultiOrchSpec struct {
110+
// Cells is the name of the cells MultiOrch needs to be deployed to.
111+
Cells []string `json:"cells,omitempty"`
112+
113+
// Image is the MultiOrch container image to use.
114+
// +kubebuilder:validation:MinLength=1
115+
// +optional
116+
Image string `json:"image,omitempty"`
117+
118+
// Resources defines the compute resource requirements for the MultiPooler container.
119+
// +optional
120+
Resources corev1.ResourceRequirements `json:"resources,omitempty"`
121+
}
122+
102123
// ============================================================================
103124
// CR Controller Status Specs
104125
// ============================================================================

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 58 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)