From 27af4a308d56795eddb08d07cbb86d8651c4f5a2 Mon Sep 17 00:00:00 2001 From: Hao Kuang Date: Fri, 15 Dec 2017 20:38:03 +0000 Subject: Single K8S Node Of Deploying SDNC Cluster POC It's a reference of how to deploy sdnc cluster under single node k8s environment. Currently the config of nfs for mysql db only supports one k8s node. For mutiple nodes, because of dockernfs mount, nfs provisioner has conflict with it, which fails mount operation of SDNC pod. Also, if SDNC needs to fully utilize mysql cluster under k8s, in core project, DbLibService.java should be enhanced to support that writing to master only and reading from them. Issue-ID: SDNC-163 Change-Id: I85ad327f2fe04fe8e9a135289d7c25a917234438 Signed-off-by: Hao Kuang --- kubernetes/sdnc/templates/mysql-configmap.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 kubernetes/sdnc/templates/mysql-configmap.yaml (limited to 'kubernetes/sdnc/templates/mysql-configmap.yaml') diff --git a/kubernetes/sdnc/templates/mysql-configmap.yaml b/kubernetes/sdnc/templates/mysql-configmap.yaml new file mode 100644 index 0000000000..deaa997f02 --- /dev/null +++ b/kubernetes/sdnc/templates/mysql-configmap.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: mysql + namespace: "{{ .Values.nsPrefix }}-sdnc" + labels: + app: mysql +data: + master.cnf: | + # Apply this config only on the master. + [mysqld] + log-bin + [localpathprefix] + master + slave.cnf: | + # Apply this config only on slaves. + [mysqld] + super-read-only + [localpathprefix] + slave -- cgit 1.2.3-korg