Skip to content

Commit 4d8b69e

Browse files
authored
Merge pull request #68 from numtide/fix-pools-to-be-map
Update pool slice to map to match with spec
2 parents 201167d + 62f5941 commit 4d8b69e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

api/v1alpha1/shard_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ type ShardSpec struct {
3737
MultiOrch MultiOrchSpec `json:"multiOrch,omitempty"`
3838

3939
// Pools defines the different pools of pods for this shard (e.g., replicas, read-only).
40-
// This is a direct copy from the parent MultiTableGroup's shardTemplate.
40+
// This is a direct copy from the parent TableGroup's Pools definition.
4141
// +optional
42-
Pools []ShardPoolSpec `json:"pools,omitempty"`
42+
Pools map[string]ShardPoolSpec `json:"pools,omitempty"`
4343
}
4444

4545
// ShardImagesSpec defines the images required for a Shard.

api/v1alpha1/zz_generated.deepcopy.go

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

config/crd/bases/multigres.com_shards.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,7 @@ spec:
144144
type: object
145145
type: object
146146
pools:
147-
description: |-
148-
Pools defines the different pools of pods for this shard (e.g., replicas, read-only).
149-
This is a direct copy from the parent MultiTableGroup's shardTemplate.
150-
items:
147+
additionalProperties:
151148
description: |-
152149
ShardPoolSpec defines the desired state of a pool of shard replicas (e.g., primary, replica, read-only).
153150
This is the core reusable spec for a shard's pod.
@@ -1424,7 +1421,10 @@ spec:
14241421
- readOnly
14251422
type: string
14261423
type: object
1427-
type: array
1424+
description: |-
1425+
Pools defines the different pools of pods for this shard (e.g., replicas, read-only).
1426+
This is a direct copy from the parent TableGroup's Pools definition.
1427+
type: object
14281428
type: object
14291429
x-kubernetes-validations:
14301430
- message: at least one shard pool must be defined

0 commit comments

Comments
 (0)