forked from serhatcetinkaya/vitess-consul-poc
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvtgate.yaml
95 lines (95 loc) · 2.04 KB
/
vtgate.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
apiVersion: v1
kind: Service
metadata:
labels:
app: vtgate
name: vtgate
namespace: cloud
spec:
ports:
- name: vtgate
port: 8080
targetPort: vtgate
selector:
app: vtgate
type: NodePort
---
apiVersion: v1
data:
mysql_auth.json: '{"root": [{"Password": "passw0rd"}]}'
kind: ConfigMap
metadata:
name: vtgate-auth
namespace: cloud
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: vtgate
namespace: cloud
spec:
replicas: 1
revisionHistoryLimit: 2
selector:
matchLabels:
app: vtgate
template:
metadata:
labels:
app: vtgate
spec:
containers:
- args:
- /vt/bin/vtgate
- -topo_implementation
- consul
- -topo_global_server_address
- localhost:8500
- -topo_global_root
- vitess/global
- -mysql_server_port
- "3306"
- -mysql_auth_server_impl
- static
- -mysql_auth_server_static_file
- /opt/vitess/mysql_auth.json
- -cell
- us_east_1
- -cells_to_watch
- us_east_1
- -gateway_implementation
- discoverygateway
- -port
- "8080"
- -service_map
- grpc-vtgateservice
- -tablet_types_to_wait
- MASTER
- -grpc_max_message_size
- "37754432"
image: vitess/lite:v12.0.0-rc1
imagePullPolicy: IfNotPresent
name: vtgate
ports:
- containerPort: 8080
name: vtgate
- containerPort: 3306
name: vtgate-mysql
volumeMounts:
- mountPath: /opt/vitess/mysql_auth.json
name: vtgate-auth-vol
subPath: mysql_auth.json
- image: nginx:1.17.7
imagePullPolicy: IfNotPresent
name: nginx
volumeMounts:
- mountPath: /etc/nginx/conf.d/consul.conf
name: nginx-config-vol
subPath: consul.conf
volumes:
- configMap:
name: nginx-config
name: nginx-config-vol
- configMap:
name: vtgate-auth
name: vtgate-auth-vol