Files
kubernetes/examples/vitess/vtgate-controller-template.yaml
Anthony Yeh cc45d293e2 Add Vitess example for sharded MySQL in Kubernetes.
This is a simplified version of the configs found in the Vitess repo:

https://github.com/youtube/vitess/tree/master/examples/kubernetes

Here we use a single script to start all of Vitess, since the aim is
just to show the end result. The full tutorial on our site goes into
much more detail on each step:

http://vitess.io/getting-started/
2015-09-25 14:50:17 -07:00

45 lines
1.1 KiB
YAML

kind: ReplicationController
apiVersion: v1
metadata:
name: vtgate
spec:
replicas: {{replicas}}
template:
metadata:
labels:
component: vtgate
app: vitess
spec:
containers:
- name: vtgate
image: vitess/lite:v2.0
volumeMounts:
- name: syslog
mountPath: /dev/log
- name: vtdataroot
mountPath: /vt/vtdataroot
resources:
limits:
memory: "512Mi"
cpu: "500m"
command:
- sh
- "-c"
- >-
mkdir -p $VTDATAROOT/tmp &&
chown -R vitess /vt &&
su -p -c "/vt/bin/vtgate
-topo_implementation etcd
-etcd_global_addrs http://$ETCD_GLOBAL_SERVICE_HOST:$ETCD_GLOBAL_SERVICE_PORT
-log_dir $VTDATAROOT/tmp
-alsologtostderr
-port 15001
-tablet_protocol grpc
-cell test" vitess
volumes:
- name: syslog
hostPath: {path: /dev/log}
- name: vtdataroot
emptyDir: {}