11apiVersion : multigres.com/v1alpha1
22kind : MultigresCluster
33metadata :
4- name : external -etcd-cluster
4+ name : ext -etcd
55 namespace : default
66spec :
77 # ----------------------------------------------------------------
88 # 1. Global Topology (External)
99 # ----------------------------------------------------------------
10- # Connects to an existing, external Etcd cluster (e.g. cloud managed).
10+ # Connects to the external Etcd cluster defined below.
11+ # This demonstrates how to connect to an existing Etcd cluster.
1112 globalTopoServer :
1213 external :
1314 endpoints :
14- - " https ://etcd-1.infra.local :2379"
15- - " https://etcd-2.infra.local:2379 "
16- caSecret : " etcd-ca-secret"
17- clientCertSecret : " etcd-client-cert-secret"
15+ - " http ://external- etcd-service.default.svc :2379"
16+ # TLS is optional. For this sample we use HTTP (no secrets required).
17+ # caSecret: "etcd-ca-secret"
18+ # clientCertSecret: "etcd-client-cert-secret"
1819 rootPath : " /multigres/global"
1920
2021 # ----------------------------------------------------------------
@@ -28,19 +29,60 @@ spec:
2829
2930 # Cell B: High-Isolation Configuration
3031 # This cell has its own dedicated, Operator-managed Etcd cluster.
31- # It does NOT use the global etcd for cell-level data.
32- # Benefit: If the external global etcd has an outage, this cell
33- # remains fully functional for intra-cell traffic.
3432 - name : " zone-b-isolated"
3533 zone : " us-east-1b"
3634 spec :
3735 localTopoServer :
3836 etcd :
39- image : " quay .io/coreos /etcd:v3.5 "
37+ image : " gcr .io/etcd-development /etcd:v3.6.7 "
4038 replicas : 3
4139 storage :
42- size : " 5Gi "
40+ size : " 1Gi "
4341 class : " standard-gp3"
44- # Since we are defining 'spec', we must also define the gateway
4542 multigateway :
4643 replicas : 2
44+ ---
45+ # ----------------------------------------------------------------
46+ # External Etcd Cluster Resource (For Demonstration)
47+ # ----------------------------------------------------------------
48+ apiVersion : apps/v1
49+ kind : Deployment
50+ metadata :
51+ name : external-etcd
52+ namespace : default
53+ labels :
54+ app : external-etcd
55+ spec :
56+ replicas : 1
57+ selector :
58+ matchLabels :
59+ app : external-etcd
60+ template :
61+ metadata :
62+ labels :
63+ app : external-etcd
64+ spec :
65+ containers :
66+ - name : etcd
67+ image : " gcr.io/etcd-development/etcd:v3.6.7"
68+ imagePullPolicy : IfNotPresent
69+ command :
70+ - /usr/local/bin/etcd
71+ - " --advertise-client-urls=http://0.0.0.0:2379"
72+ - " --listen-client-urls=http://0.0.0.0:2379"
73+ ports :
74+ - containerPort : 2379
75+ name : client
76+ ---
77+ apiVersion : v1
78+ kind : Service
79+ metadata :
80+ name : external-etcd-service
81+ namespace : default
82+ spec :
83+ selector :
84+ app : external-etcd
85+ ports :
86+ - protocol : TCP
87+ port : 2379
88+ targetPort : 2379
0 commit comments