Skip to content

Commit c57aef6

Browse files
Adding integration tests and updating the API spec to adjust CEL budgets. Currently the budgets may be on the conservative side. We may need to adjust accordingly as we go.
1 parent 4ba9e0a commit c57aef6

19 files changed

+336
-85
lines changed

api/v1alpha1/cell_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ type CellSpec struct {
5757

5858
// TopoServer defines the local topology config.
5959
// +optional
60-
TopoServer LocalTopoServerSpec `json:"topoServer,omitempty"`
60+
TopoServer *LocalTopoServerSpec `json:"topoServer,omitempty"`
6161

6262
// AllCells list for discovery.
6363
// +optional
64-
// +kubebuilder:validation:MaxItems=100
64+
// +kubebuilder:validation:MaxItems=50
6565
AllCells []CellName `json:"allCells,omitempty"`
6666

6767
// TopologyReconciliation flags.

api/v1alpha1/common_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ type StatelessSpec struct {
4545

4646
// PodAnnotations are annotations to add to the pods.
4747
// +optional
48-
// +kubebuilder:validation:MaxProperties=64
48+
// +kubebuilder:validation:MaxProperties=48
4949
// +kubebuilder:validation:XValidation:rule="self.all(k, size(k) < 64 && size(self[k]) < 256)",message="annotation keys must be <64 chars and values <256 chars"
5050
PodAnnotations map[string]string `json:"podAnnotations,omitempty"`
5151

5252
// PodLabels are additional labels to add to the pods.
5353
// +optional
54-
// +kubebuilder:validation:MaxProperties=64
54+
// +kubebuilder:validation:MaxProperties=48
5555
// +kubebuilder:validation:XValidation:rule="self.all(k, size(k) < 64 && size(self[k]) < 64)",message="label keys and values must be <64 chars"
5656
PodLabels map[string]string `json:"podLabels,omitempty"`
5757
}

api/v1alpha1/multigrescluster_types.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ type MultigresClusterSpec struct {
4848
// +optional
4949
// +listType=map
5050
// +listMapKey=name
51-
// +kubebuilder:validation:MaxItems=100
51+
// +kubebuilder:validation:MaxItems=50
5252
Cells []CellConfig `json:"cells,omitempty"`
5353

5454
// Databases defines the logical databases, table groups, and sharding.
5555
// +optional
5656
// +listType=map
5757
// +listMapKey=name
5858
// +kubebuilder:validation:XValidation:rule="self.filter(x, has(x.default) && x.default).size() <= 1",message="only one database can be marked as default"
59-
// +kubebuilder:validation:MaxItems=500
59+
// +kubebuilder:validation:MaxItems=50
6060
Databases []DatabaseConfig `json:"databases,omitempty"`
6161
}
6262

@@ -218,7 +218,7 @@ type DatabaseConfig struct {
218218
// +listType=map
219219
// +listMapKey=name
220220
// +kubebuilder:validation:XValidation:rule="self.filter(x, has(x.default) && x.default).size() <= 1",message="only one tablegroup can be marked as default"
221-
// +kubebuilder:validation:MaxItems=100
221+
// +kubebuilder:validation:MaxItems=20
222222
TableGroups []TableGroupConfig `json:"tablegroups,omitempty"`
223223
}
224224

@@ -237,7 +237,7 @@ type TableGroupConfig struct {
237237
// +optional
238238
// +listType=map
239239
// +listMapKey=name
240-
// +kubebuilder:validation:MaxItems=128
240+
// +kubebuilder:validation:MaxItems=32
241241
Shards []ShardConfig `json:"shards,omitempty"`
242242
}
243243

@@ -272,7 +272,7 @@ type ShardOverrides struct {
272272

273273
// Pools overrides. Keyed by pool name.
274274
// +optional
275-
// +kubebuilder:validation:MaxProperties=32
275+
// +kubebuilder:validation:MaxProperties=8
276276
// +kubebuilder:validation:XValidation:rule="self.all(key, size(key) < 63)",message="pool names must be < 63 chars"
277277
Pools map[string]PoolSpec `json:"pools,omitempty"`
278278
}
@@ -285,7 +285,7 @@ type ShardInlineSpec struct {
285285

286286
// Pools configuration. Keyed by pool name.
287287
// +optional
288-
// +kubebuilder:validation:MaxProperties=32
288+
// +kubebuilder:validation:MaxProperties=8
289289
// +kubebuilder:validation:XValidation:rule="self.all(key, size(key) < 63)",message="pool names must be < 63 chars"
290290
Pools map[string]PoolSpec `json:"pools,omitempty"`
291291
}
@@ -305,13 +305,13 @@ type MultigresClusterStatus struct {
305305
Conditions []metav1.Condition `json:"conditions,omitempty"`
306306
// Cells status summary.
307307
// +optional
308-
// +kubebuilder:validation:MaxProperties=100
308+
// +kubebuilder:validation:MaxProperties=50
309309
// +kubebuilder:validation:XValidation:rule="self.all(key, size(key) < 63)",message="cell names must be < 63 chars"
310310
Cells map[string]CellStatusSummary `json:"cells,omitempty"`
311311

312312
// Databases status summary.
313313
// +optional
314-
// +kubebuilder:validation:MaxProperties=500
314+
// +kubebuilder:validation:MaxProperties=50
315315
// +kubebuilder:validation:XValidation:rule="self.all(key, size(key) < 63)",message="database names must be < 63 chars"
316316
Databases map[string]DatabaseStatusSummary `json:"databases,omitempty"`
317317
}

api/v1alpha1/shard_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type MultiOrchSpec struct {
3636
// Cells defines the list of cells where this MultiOrch should be deployed.
3737
// If empty, it defaults to all cells where pools are defined.
3838
// +optional
39-
// +kubebuilder:validation:MaxItems=100
39+
// +kubebuilder:validation:MaxItems=50
4040
Cells []CellName `json:"cells,omitempty"`
4141
}
4242

@@ -49,7 +49,7 @@ type PoolSpec struct {
4949

5050
// Cells defines the list of cells where this Pool should be deployed.
5151
// +optional
52-
// +kubebuilder:validation:MaxItems=100
52+
// +kubebuilder:validation:MaxItems=50
5353
Cells []CellName `json:"cells,omitempty"`
5454

5555
// ReplicasPerCell is the desired number of pods PER CELL in this pool.
@@ -105,7 +105,7 @@ type ShardSpec struct {
105105
MultiOrch MultiOrchSpec `json:"multiorch"`
106106

107107
// Pools is the map of fully resolved data pool configurations.
108-
// +kubebuilder:validation:MaxProperties=32
108+
// +kubebuilder:validation:MaxProperties=8
109109
// +kubebuilder:validation:XValidation:rule="self.all(key, size(key) < 63)",message="pool names must be < 63 chars"
110110
Pools map[string]PoolSpec `json:"pools"`
111111
}
@@ -137,7 +137,7 @@ type ShardStatus struct {
137137

138138
// Cells is a list of cells this shard is currently deployed to.
139139
// +optional
140-
// +kubebuilder:validation:MaxItems=100
140+
// +kubebuilder:validation:MaxItems=50
141141
Cells []CellName `json:"cells,omitempty"`
142142

143143
// OrchReady indicates if the MultiOrch component is ready.

api/v1alpha1/shardtemplate_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type ShardTemplateSpec struct {
3131
MultiOrch *MultiOrchSpec `json:"multiorch,omitempty"`
3232

3333
// +optional
34-
// +kubebuilder:validation:MaxProperties=32
34+
// +kubebuilder:validation:MaxProperties=8
3535
// +kubebuilder:validation:XValidation:rule="self.all(key, size(key) < 63)",message="pool names must be < 63 chars"
3636
Pools map[string]PoolSpec `json:"pools,omitempty"`
3737
}

api/v1alpha1/tablegroup_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type TableGroupSpec struct {
4848
GlobalTopoServer GlobalTopoServerRef `json:"globalTopoServer"`
4949

5050
// Shards is the list of FULLY RESOLVED shard specifications.
51-
// +kubebuilder:validation:MaxItems=128
51+
// +kubebuilder:validation:MaxItems=32
5252
Shards []ShardResolvedSpec `json:"shards"`
5353
}
5454

@@ -63,7 +63,7 @@ type ShardResolvedSpec struct {
6363
MultiOrch MultiOrchSpec `json:"multiorch"`
6464

6565
// Pools is the map of fully resolved data pool configurations.
66-
// +kubebuilder:validation:MaxProperties=32
66+
// +kubebuilder:validation:MaxProperties=8
6767
// +kubebuilder:validation:XValidation:rule="self.all(key, size(key) < 63)",message="pool names must be < 63 chars"
6868
Pools map[string]PoolSpec `json:"pools"`
6969
}

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/multigres.com_cells.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,24 @@ spec:
5454
maxLength: 63
5555
minLength: 1
5656
type: string
57-
maxItems: 100
57+
maxItems: 50
5858
type: array
5959
globalTopoServer:
6060
description: GlobalTopoServer reference (always populated).
6161
properties:
6262
address:
63+
description: Address is the DNS address of the topology server.
6364
maxLength: 512
6465
minLength: 1
6566
type: string
6667
implementation:
68+
description: Implementation defines the client implementation
69+
(e.g. "etcd").
6770
maxLength: 63
6871
minLength: 1
6972
type: string
7073
rootPath:
74+
description: RootPath is the etcd prefix for this cluster.
7175
maxLength: 512
7276
minLength: 1
7377
type: string
@@ -1002,7 +1006,7 @@ spec:
10021006
additionalProperties:
10031007
type: string
10041008
description: PodAnnotations are annotations to add to the pods.
1005-
maxProperties: 64
1009+
maxProperties: 48
10061010
type: object
10071011
x-kubernetes-validations:
10081012
- message: annotation keys must be <64 chars and values <256 chars
@@ -1011,7 +1015,7 @@ spec:
10111015
additionalProperties:
10121016
type: string
10131017
description: PodLabels are additional labels to add to the pods.
1014-
maxProperties: 64
1018+
maxProperties: 48
10151019
type: object
10161020
x-kubernetes-validations:
10171021
- message: label keys and values must be <64 chars
@@ -1225,8 +1229,12 @@ spec:
12251229
description: TopologyReconciliation flags.
12261230
properties:
12271231
prunePoolers:
1232+
description: PrunePoolers indicates if unused poolers should be
1233+
removed.
12281234
type: boolean
12291235
registerCell:
1236+
description: RegisterCell indicates if the cell should register
1237+
itself in the topology.
12301238
type: boolean
12311239
required:
12321240
- prunePoolers
@@ -1306,12 +1314,16 @@ spec:
13061314
type: object
13071315
type: array
13081316
gatewayReadyReplicas:
1317+
description: GatewayReadyReplicas is the number of gateway pods that
1318+
are ready.
13091319
format: int32
13101320
type: integer
13111321
gatewayReplicas:
1322+
description: GatewayReplicas is the total number of gateway pods.
13121323
format: int32
13131324
type: integer
13141325
gatewayServiceName:
1326+
description: GatewayServiceName is the DNS name of the gateway service.
13151327
maxLength: 253
13161328
type: string
13171329
required:

config/crd/bases/multigres.com_celltemplates.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ spec:
10931093
additionalProperties:
10941094
type: string
10951095
description: PodAnnotations are annotations to add to the pods.
1096-
maxProperties: 64
1096+
maxProperties: 48
10971097
type: object
10981098
x-kubernetes-validations:
10991099
- message: annotation keys must be <64 chars and values <256 chars
@@ -1102,7 +1102,7 @@ spec:
11021102
additionalProperties:
11031103
type: string
11041104
description: PodLabels are additional labels to add to the pods.
1105-
maxProperties: 64
1105+
maxProperties: 48
11061106
type: object
11071107
x-kubernetes-validations:
11081108
- message: label keys and values must be <64 chars

config/crd/bases/multigres.com_coretemplates.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ spec:
10621062
additionalProperties:
10631063
type: string
10641064
description: PodAnnotations are annotations to add to the pods.
1065-
maxProperties: 64
1065+
maxProperties: 48
10661066
type: object
10671067
x-kubernetes-validations:
10681068
- message: annotation keys must be <64 chars and values <256 chars
@@ -1071,7 +1071,7 @@ spec:
10711071
additionalProperties:
10721072
type: string
10731073
description: PodLabels are additional labels to add to the pods.
1074-
maxProperties: 64
1074+
maxProperties: 48
10751075
type: object
10761076
x-kubernetes-validations:
10771077
- message: label keys and values must be <64 chars

0 commit comments

Comments
 (0)