Add TLS handling to mariadb backup and restore

Added certification handling to restore_mariadb script.

Change-Id: Iff3a15c0b4e84857cafd5b70c6cbea5363734751
This commit is contained in:
Huang, Sophie (sh879n) 2020-08-11 21:26:15 +00:00
parent f1e9a6ba83
commit 48c4d8c900

View File

@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
{{- $envAll := . }}
# Capture the user's command line arguments
ARGS=("$@")
@ -44,6 +46,12 @@ RESTORE_CMD="mysql \
--user=${RESTORE_USER} \
--password=${RESTORE_PW} \
--host=$MARIADB_SERVER_SERVICE_HOST \
{{- if .Values.manifests.certificates }}
--ssl-verify-server-cert=false \
--ssl-ca=/etc/mysql/certs/ca.crt \
--ssl-key=/etc/mysql/certs/tls.key \
--ssl-cert=/etc/mysql/certs/tls.crt \
{{- end }}
--connect-timeout 10"
# Get a single database data from the SQL file.