@@ -68,16 +68,18 @@ func TestCellReconciliation(t *testing.T) {
6868 },
6969 Spec : multigresv1alpha1.CellSpec {
7070 Name : "zone1" ,
71+ Zone : "us-west-1a" ,
7172 MultiGateway : multigresv1alpha1.StatelessSpec {
7273 Replicas : ptr .To (int32 (2 )),
7374 },
74- MultiOrch : multigresv1alpha1.StatelessSpec {
75- Replicas : ptr .To (int32 (2 )),
75+ GlobalTopoServer : multigresv1alpha1.GlobalTopoServerRef {
76+ Address : "global-topo:2379" ,
77+ RootPath : "/multigres/global" ,
78+ Implementation : "etcd2" ,
7679 },
77- GlobalTopoServer : multigresv1alpha1.GlobalTopoServerRefSpec {
78- ClientServiceName : "global-topo" ,
80+ TopoServer : & multigresv1alpha1.LocalTopoServerSpec {
81+ Etcd : & multigresv1alpha1. EtcdSpec {} ,
7982 },
80- TopoServer : multigresv1alpha1.CellTopoServerSpec {},
8183 },
8284 },
8385 wantResources : []client.Object {
@@ -101,7 +103,17 @@ func TestCellReconciliation(t *testing.T) {
101103 Containers : []corev1.Container {
102104 {
103105 Name : "multigateway" ,
104- Image : "numtide/multigres-operator:latest" ,
106+ Image : "ghcr.io/multigres/multigres:latest" ,
107+ Args : []string {
108+ "multigateway" ,
109+ "--http-port" , "15100" ,
110+ "--grpc-port" , "15170" ,
111+ "--pg-port" , "15432" ,
112+ "--topo-global-server-addresses" , "global-topo:2379" ,
113+ "--topo-global-root" , "/multigres/global" ,
114+ "--topo-implementation" , "etcd2" ,
115+ "--cell" , "zone1" ,
116+ },
105117 Ports : []corev1.ContainerPort {
106118 tcpPort (t , "http" , 15100 ),
107119 tcpPort (t , "grpc" , 15170 ),
@@ -140,16 +152,18 @@ func TestCellReconciliation(t *testing.T) {
140152 },
141153 Spec : multigresv1alpha1.CellSpec {
142154 Name : "zone2" ,
155+ Zone : "us-west-1b" ,
143156 MultiGateway : multigresv1alpha1.StatelessSpec {
144157 Replicas : ptr .To (int32 (3 )),
145158 },
146- MultiOrch : multigresv1alpha1.StatelessSpec {
147- Replicas : ptr .To (int32 (3 )),
159+ GlobalTopoServer : multigresv1alpha1.GlobalTopoServerRef {
160+ Address : "global-topo:2379" ,
161+ RootPath : "/multigres/global" ,
162+ Implementation : "etcd2" ,
148163 },
149- GlobalTopoServer : multigresv1alpha1.GlobalTopoServerRefSpec {
150- ClientServiceName : "global-topo" ,
164+ TopoServer : & multigresv1alpha1.LocalTopoServerSpec {
165+ Etcd : & multigresv1alpha1. EtcdSpec {} ,
151166 },
152- TopoServer : multigresv1alpha1.CellTopoServerSpec {},
153167 },
154168 },
155169 wantResources : []client.Object {
@@ -173,7 +187,17 @@ func TestCellReconciliation(t *testing.T) {
173187 Containers : []corev1.Container {
174188 {
175189 Name : "multigateway" ,
176- Image : "numtide/multigres-operator:latest" ,
190+ Image : "ghcr.io/multigres/multigres:latest" ,
191+ Args : []string {
192+ "multigateway" ,
193+ "--http-port" , "15100" ,
194+ "--grpc-port" , "15170" ,
195+ "--pg-port" , "15432" ,
196+ "--topo-global-server-addresses" , "global-topo:2379" ,
197+ "--topo-global-root" , "/multigres/global" ,
198+ "--topo-implementation" , "etcd2" ,
199+ "--cell" , "zone2" ,
200+ },
177201 Ports : []corev1.ContainerPort {
178202 tcpPort (t , "http" , 15100 ),
179203 tcpPort (t , "grpc" , 15170 ),
@@ -211,21 +235,20 @@ func TestCellReconciliation(t *testing.T) {
211235 Namespace : "default" ,
212236 },
213237 Spec : multigresv1alpha1.CellSpec {
214- Name : "zone3" ,
215- Images : multigresv1alpha1.CellImagesSpec {
216- MultiGateway : "custom/multigateway:v1.0.0" ,
217- MultiOrch : "custom/multiorch:v1.0.0" ,
218- },
238+ Name : "zone3" ,
239+ Zone : "us-west-1c" ,
240+ MultiGatewayImage : "custom/multigateway:v1.0.0" ,
219241 MultiGateway : multigresv1alpha1.StatelessSpec {
220242 Replicas : ptr .To (int32 (2 )),
221243 },
222- MultiOrch : multigresv1alpha1.StatelessSpec {
223- Replicas : ptr .To (int32 (2 )),
244+ GlobalTopoServer : multigresv1alpha1.GlobalTopoServerRef {
245+ Address : "global-topo:2379" ,
246+ RootPath : "/multigres/global" ,
247+ Implementation : "etcd2" ,
224248 },
225- GlobalTopoServer : multigresv1alpha1.GlobalTopoServerRefSpec {
226- ClientServiceName : "global-topo" ,
249+ TopoServer : & multigresv1alpha1.LocalTopoServerSpec {
250+ Etcd : & multigresv1alpha1. EtcdSpec {} ,
227251 },
228- TopoServer : multigresv1alpha1.CellTopoServerSpec {},
229252 },
230253 },
231254 wantResources : []client.Object {
@@ -250,6 +273,16 @@ func TestCellReconciliation(t *testing.T) {
250273 {
251274 Name : "multigateway" ,
252275 Image : "custom/multigateway:v1.0.0" ,
276+ Args : []string {
277+ "multigateway" ,
278+ "--http-port" , "15100" ,
279+ "--grpc-port" , "15170" ,
280+ "--pg-port" , "15432" ,
281+ "--topo-global-server-addresses" , "global-topo:2379" ,
282+ "--topo-global-root" , "/multigres/global" ,
283+ "--topo-implementation" , "etcd2" ,
284+ "--cell" , "zone3" ,
285+ },
253286 Ports : []corev1.ContainerPort {
254287 tcpPort (t , "http" , 15100 ),
255288 tcpPort (t , "grpc" , 15170 ),
@@ -288,6 +321,7 @@ func TestCellReconciliation(t *testing.T) {
288321 },
289322 Spec : multigresv1alpha1.CellSpec {
290323 Name : "zone4" ,
324+ Zone : "us-west-1d" ,
291325 MultiGateway : multigresv1alpha1.StatelessSpec {
292326 Replicas : ptr .To (int32 (2 )),
293327 Affinity : & corev1.Affinity {
@@ -308,30 +342,14 @@ func TestCellReconciliation(t *testing.T) {
308342 },
309343 },
310344 },
311- MultiOrch : multigresv1alpha1.StatelessSpec {
312- Replicas : ptr .To (int32 (2 )),
313- Affinity : & corev1.Affinity {
314- PodAntiAffinity : & corev1.PodAntiAffinity {
315- PreferredDuringSchedulingIgnoredDuringExecution : []corev1.WeightedPodAffinityTerm {
316- {
317- Weight : 100 ,
318- PodAffinityTerm : corev1.PodAffinityTerm {
319- LabelSelector : & metav1.LabelSelector {
320- MatchLabels : map [string ]string {
321- "app.kubernetes.io/component" : "multiorch" ,
322- },
323- },
324- TopologyKey : "kubernetes.io/hostname" ,
325- },
326- },
327- },
328- },
329- },
345+ GlobalTopoServer : multigresv1alpha1.GlobalTopoServerRef {
346+ Address : "global-topo:2379" ,
347+ RootPath : "/multigres/global" ,
348+ Implementation : "etcd2" ,
330349 },
331- GlobalTopoServer : multigresv1alpha1.GlobalTopoServerRefSpec {
332- ClientServiceName : "global-topo" ,
350+ TopoServer : & multigresv1alpha1.LocalTopoServerSpec {
351+ Etcd : & multigresv1alpha1. EtcdSpec {} ,
333352 },
334- TopoServer : multigresv1alpha1.CellTopoServerSpec {},
335353 },
336354 },
337355 wantResources : []client.Object {
@@ -355,7 +373,17 @@ func TestCellReconciliation(t *testing.T) {
355373 Containers : []corev1.Container {
356374 {
357375 Name : "multigateway" ,
358- Image : "numtide/multigres-operator:latest" ,
376+ Image : "ghcr.io/multigres/multigres:latest" ,
377+ Args : []string {
378+ "multigateway" ,
379+ "--http-port" , "15100" ,
380+ "--grpc-port" , "15170" ,
381+ "--pg-port" , "15432" ,
382+ "--topo-global-server-addresses" , "global-topo:2379" ,
383+ "--topo-global-root" , "/multigres/global" ,
384+ "--topo-implementation" , "etcd2" ,
385+ "--cell" , "zone4" ,
386+ },
359387 Ports : []corev1.ContainerPort {
360388 tcpPort (t , "http" , 15100 ),
361389 tcpPort (t , "grpc" , 15170 ),
0 commit comments