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: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: ghcr.io/numtide/multigres-operator
newTag: 076c82c-dirty
newTag: 84cd6d9-dirty
45 changes: 14 additions & 31 deletions config/samples/child-resources/kind-cell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ spec:
# Logical name of the cell
name: zone-a

# Container images for cell components
images:
multigateway: ghcr.io/multigres/multigateway:latest
multiorch: ghcr.io/multigres/multiorch:latest
# Physical zone placement (use either 'zone' or 'region', not both)
zone: us-west-1a

# Container image for multigateway
multigatewayImage: ghcr.io/multigres/multigres:main

# MultiGateway deployment - query routing
multigateway:
Expand All @@ -23,38 +24,20 @@ spec:
cpu: 200m
memory: 256Mi

# MultiOrch deployment - cell orchestration
multiorch:
replicas: 1
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi

# Reference to the global topology server
globalTopoServer:
rootPath: /multigres
clientServiceName: kind-global-topo-client
address: kind-global-topo:2379
rootPath: /multigres/global
implementation: etcd2

# Cell-local topology server configuration
# If managedSpec is set, a TopoServer CR will be created for this cell
# Cell-local topology server configuration (optional)
# If specified, creates a local etcd cluster for this cell
topoServer:
managedSpec:
etcd:
image: quay.io/coreos/etcd:v3.5.12
replicas: 1

# Storage for etcd data - kind uses local storage provisioner
dataVolumeClaimTemplate:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

# Resource requirements for etcd - lower for kind
storage:
size: 1Gi
resources:
requests:
cpu: 50m
Expand All @@ -70,4 +53,4 @@ spec:
# Topology reconciliation settings
topologyReconciliation:
registerCell: true
pruneTablets: true
prunePoolers: true
54 changes: 28 additions & 26 deletions config/samples/child-resources/kind-shard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,48 @@ metadata:
name: kind-shard-sample
namespace: default
spec:
# Shard identification
databaseName: mydb
tableGroupName: users
shardName: "0"

# Container images for shard components
images:
multiorch: ghcr.io/multigres/multigres:main
multipooler: ghcr.io/multigres/multigres:main
postgres: postgres:16-alpine
multipooler: ghcr.io/multigres/multipooler:latest

# Reference to the global topology server
globalTopoServer:
address: kind-global-topo:2379
rootPath: /multigres/global
implementation: etcd2

# MultiOrch configuration for shard orchestration
multiOrch:
multiorch:
cells:
- zone-a
image: ghcr.io/multigres/multiorch:latest
replicas: 1
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 256Mi
memory: 128Mi

# Shard pools - different types of PostgreSQL replicas
pools:
# Primary replica pool
primary:
type: replica
cell: zone-a
database: mydb
tableGroup: users
replicas: 1
type: readWrite
cells:
- zone-a
replicasPerCell: 1

# Storage configuration - kind uses local storage provisioner
dataVolumeClaimTemplate:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage:
size: 1Gi

# PostgreSQL container configuration - lower resources for kind
postgres:
Expand All @@ -62,18 +69,13 @@ spec:

# Read replica pool
replica:
type: replica
cell: zone-a
database: mydb
tableGroup: users
replicas: 1
type: readOnly
cells:
- zone-a
replicasPerCell: 1

dataVolumeClaimTemplate:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storage:
size: 1Gi

postgres:
resources:
Expand Down
37 changes: 16 additions & 21 deletions config/samples/child-resources/kind-toposerver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,24 @@ metadata:
name: kind-toposerver-sample
namespace: default
spec:
# Root path for topology data in etcd
rootPath: /multigres/global
# Etcd configuration for the topology server
etcd:
# etcd container image
image: quay.io/coreos/etcd:v3.5.12

# etcd container image
image: quay.io/coreos/etcd:v3.5.12
# Number of etcd replicas (must be odd: 1, 3, 5, etc.)
# Using 1 replica for kind to minimize resource usage
replicas: 1

# Number of etcd replicas (must be odd: 1, 3, 5, etc.)
# Using 1 replica for kind to minimize resource usage
replicas: 1
# Storage configuration for etcd data - kind uses local storage provisioner
storage:
size: 1Gi

# Storage configuration for etcd data - kind uses local storage provisioner
dataVolumeClaimTemplate:
accessModes:
- ReadWriteOnce
# Resource requirements for etcd containers - lower for kind
resources:
requests:
storage: 1Gi

# Resource requirements for etcd containers - lower for kind
resources:
requests:
cpu: 50m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
cpu: 50m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/numtide/multigres-operator
go 1.25.0

require (
github.com/numtide/multigres-operator/api v0.0.0-20251213015258-2919bb5e88f9
github.com/numtide/multigres-operator/pkg/resource-handler v0.0.0-20251214103105-801ed36d716f
github.com/numtide/multigres-operator/api v0.0.0-20260101063420-94576a4bc1f7
github.com/numtide/multigres-operator/pkg/resource-handler v0.0.0-20260101072241-f8648bb2952b
k8s.io/apimachinery v0.34.3
k8s.io/client-go v0.34.3
sigs.k8s.io/controller-runtime v0.22.4
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,14 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/numtide/multigres-operator/api v0.0.0-20251213015258-2919bb5e88f9 h1:Z2zMSUfdjqdvFlUgf769dOjNqp4CKNsqNzoi8mdgCag=
github.com/numtide/multigres-operator/api v0.0.0-20251213015258-2919bb5e88f9/go.mod h1:A1bBmTxHr+362dGZ5G6u2S4xsP6enbgdUS/UJUOmKbc=
github.com/numtide/multigres-operator/api v0.0.0-20260101063420-94576a4bc1f7 h1:INtpGqYsgCsX3wWlEubF87VL47ePkcXyFoCiPtw5uY0=
github.com/numtide/multigres-operator/api v0.0.0-20260101063420-94576a4bc1f7/go.mod h1:A1bBmTxHr+362dGZ5G6u2S4xsP6enbgdUS/UJUOmKbc=
github.com/numtide/multigres-operator/pkg/resource-handler v0.0.0-20251214103105-801ed36d716f h1:JPVxktYbOaZzfzPtvQo4H+boZPghGspRvlYtoNS5GAA=
github.com/numtide/multigres-operator/pkg/resource-handler v0.0.0-20251214103105-801ed36d716f/go.mod h1:OMXscMC1UxSFGhbm0sMytBEdEwVbs7mtq8LBdeRic38=
github.com/numtide/multigres-operator/pkg/resource-handler v0.0.0-20260101063420-94576a4bc1f7 h1:fcYU1xN/tSrRFrNZzL7o6x9vF6XlgmtLI+IKIeXNaqI=
github.com/numtide/multigres-operator/pkg/resource-handler v0.0.0-20260101063420-94576a4bc1f7/go.mod h1:u230KlrsEps5xjRhpWldDVWaqPVK/h7oRLMdWR7+r40=
github.com/numtide/multigres-operator/pkg/resource-handler v0.0.0-20260101072241-f8648bb2952b h1:JmXzCLm3KvgegBuhCvetZUzuLekoEv52U3pNbGMzLTw=
github.com/numtide/multigres-operator/pkg/resource-handler v0.0.0-20260101072241-f8648bb2952b/go.mod h1:u230KlrsEps5xjRhpWldDVWaqPVK/h7oRLMdWR7+r40=
github.com/numtide/multigres-operator/pkg/testutil v0.0.0-20251213002906-55493b734373 h1:B9uGjUsG0rMi+dGt2blEDpr8wbwnE/W1xcpuxZwvOYk=
github.com/numtide/multigres-operator/pkg/testutil v0.0.0-20251213002906-55493b734373/go.mod h1:+NQa7dSvQqxhBOE9XcE9RWXLvOvNaw0keCc29Y7pjyQ=
github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg=
Expand Down