This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
/
my-vitess.yaml
124 lines (124 loc) · 2.99 KB
/
my-vitess.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
# To keep the example workload to a minimum, a single
# topology server is used for the local and global scope
# This is fine in small installations but may not be
# ideal for large, multi-zone installations
apiVersion: etcd.database.coreos.com/v1beta2
kind: EtcdCluster
metadata:
name: etcd-zone1
spec:
pod:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchLabels:
etcd_cluster: etcd-vitess
topologyKey: kubernetes.io/hostname
weight: 100
resources:
requests:
cpu: 200m
memory: 100Mi
repository: quay.io/coreos/etcd
size: 1
version: 3.3.10
---
# Sample VitessCluster with all resources embedded within
# the VitessCluster object. It is also possible to split
# all or some of the resources into their own objects for easier
# management. See the examples directory for more information
apiVersion: vitess.io/v1alpha2
kind: VitessCluster
metadata:
name: vt
labels:
app: vitess
spec:
lockserver:
metadata:
name: global
spec:
type: etcd2
etcd2:
address: etcd-global-client:2379
pathPrefix: /vitess/global
cells:
- metadata:
name: zone1
spec:
lockserver:
metadata:
name: zone1
spec:
type: etcd2
etcd2:
address: etcd-zone1-client:2379
pathPrefix: /vitess/zone1
defaults:
replicas: 1
image: vitess/vttablet:helm-1.0.4
keyspaces:
- metadata:
name: unsharded-dbname
spec:
shards:
- metadata:
name: "0"
spec:
defaults:
replicas: 2
containers:
mysql:
image: percona:5.7.23
vttablet:
image: vitess/vttablet:helm-1.0.4
tablets:
- metadata:
name: zone1
spec:
cellID: zone1
tabletID: 101
type: replica
- metadata:
name: sharded-dbname
spec:
shards:
- metadata:
name: "x-80"
spec:
keyRange: { to: "80" }
defaults:
replicas: 2
containers:
mysql:
image: percona:5.7.23
vttablet:
image: vitess/vttablet:helm-1.0.4
tablets:
- metadata:
name: zone1
spec:
cellID: zone1
tabletID: 102
type: replica
- metadata:
name: "80-x"
spec:
keyRange: { from: "80" }
defaults:
replicas: 2
containers:
mysql:
image: percona:5.7.23
vttablet:
image: vitess/vttablet:helm-1.0.4
tablets:
- metadata:
name: zone1
spec:
cellID: zone1
tabletID: 103
type: replica