diff options
author | Mike Elliott <mike.elliott@amdocs.com> | 2018-04-05 01:07:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-04-05 01:07:40 +0000 |
commit | 4624c12f60bf3d469d2008122902df8d5410952d (patch) | |
tree | 766573d1cb0a77501ffea955a33b82ee38dcf5e3 /kubernetes/common/mysql/templates/statefulset.yaml | |
parent | ad6382f57e802ced0892ea103bf880e11050590b (diff) | |
parent | baadb38f90168c15b9fc6007b507269ff5c47551 (diff) |
Merge "Multi-site High-availability Manual Failover (PoC)"
Diffstat (limited to 'kubernetes/common/mysql/templates/statefulset.yaml')
-rw-r--r-- | kubernetes/common/mysql/templates/statefulset.yaml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kubernetes/common/mysql/templates/statefulset.yaml b/kubernetes/common/mysql/templates/statefulset.yaml index 7b55bf2be0..e3f3428fbd 100644 --- a/kubernetes/common/mysql/templates/statefulset.yaml +++ b/kubernetes/common/mysql/templates/statefulset.yaml @@ -45,10 +45,11 @@ spec: # Generate mysql server-id from pod ordinal index. [[ `hostname` =~ -([0-9]+)$ ]] || exit 1 ordinal=${BASH_REMATCH[1]} + siteId={{ .Values.geoSiteId }} echo BASH_REMATCH=${BASH_REMATCH} echo [mysqld] > /mnt/conf.d/server-id.cnf # Add an offset to avoid reserved server-id=0 value. - echo server-id=$((100 + $ordinal)) >> /mnt/conf.d/server-id.cnf + echo server-id=$(($siteId*100 + $ordinal)) >> /mnt/conf.d/server-id.cnf # Copy appropriate conf.d files from config-map to emptyDir. if [[ $ordinal -eq 0 ]]; then cp /mnt/config-map/master.cnf /mnt/conf.d/ @@ -93,7 +94,7 @@ spec: subPath: mysql - name: conf mountPath: /etc/mysql/conf.d - + containers: #sdnc-db-container - name: {{ include "common.name" . }} @@ -236,3 +237,4 @@ spec: #{{ else }} emptyDir: {} #{{ end }} + |