Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/v1alpha1/multigrescluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ type MultiAdminConfig struct {

// CellConfig defines a cell in the cluster.
// +kubebuilder:validation:XValidation:rule="!(has(self.spec) && has(self.cellTemplate))",message="cannot specify both 'spec' and 'cellTemplate'"
// +kubebuilder:validation:XValidation:rule="!(has(self.spec) && has(self.overrides))",message="cannot specify both 'spec' and 'overrides'"
// +kubebuilder:validation:XValidation:rule="has(self.zone) != has(self.region)",message="must specify either 'zone' or 'region', but not both"
type CellConfig struct {
// Name is the logical name of the cell.
Expand Down Expand Up @@ -262,6 +263,7 @@ type TableGroupConfig struct {

// ShardConfig defines a specific shard.
// +kubebuilder:validation:XValidation:rule="!(has(self.spec) && has(self.shardTemplate))",message="cannot specify both 'spec' and 'shardTemplate'"
// +kubebuilder:validation:XValidation:rule="!(has(self.spec) && has(self.overrides))",message="cannot specify both 'spec' and 'overrides'"
type ShardConfig struct {
// Name is the identifier of the shard (e.g., "0", "1").
// +kubebuilder:validation:MinLength=1
Expand Down
4 changes: 4 additions & 0 deletions config/crd/bases/multigres.com_multigresclusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2293,6 +2293,8 @@ spec:
x-kubernetes-validations:
- message: cannot specify both 'spec' and 'cellTemplate'
rule: '!(has(self.spec) && has(self.cellTemplate))'
- message: cannot specify both 'spec' and 'overrides'
rule: '!(has(self.spec) && has(self.overrides))'
- message: must specify either 'zone' or 'region', but not both
rule: has(self.zone) != has(self.region)
maxItems: 50
Expand Down Expand Up @@ -6941,6 +6943,8 @@ spec:
x-kubernetes-validations:
- message: cannot specify both 'spec' and 'shardTemplate'
rule: '!(has(self.spec) && has(self.shardTemplate))'
- message: cannot specify both 'spec' and 'overrides'
rule: '!(has(self.spec) && has(self.overrides))'
maxItems: 32
type: array
x-kubernetes-list-map-keys:
Expand Down
Loading