feat:Add test scripts into Notes.txt, and image pull policy (#15354)

Signed-off-by: Aisuko <urakiny@gmail.com>
This commit is contained in:
Aisuko
2019-07-31 10:20:13 -07:00
committed by Kubernetes Prow Robot
parent 60e26378d9
commit 84662c4c81
5 changed files with 24 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: mysqlha
version: 0.7.1
version: 0.8.0
appVersion: 5.7.13
description: MySQL cluster with a single master and zero or more slave replicas
keywords:
+1
View File
@@ -37,6 +37,7 @@ The following table lists the configurable parameters of the MySQL chart and the
| ----------------------------------------- | ------------------------------------------------- | -------------------------------------- |
| `mysqlImage` | `mysql` image and tag. | `mysql:5.7.13` |
| `xtraBackupImage` | `xtrabackup` image and tag. | `gcr.io/google-samples/xtrabackup:1.0` |
| `imagePullPolicy` | Image pull policy. | `IfNotPresent` |
| `replicaCount` | Number of MySQL replicas | 3 |
| `mysqlRootPassword` | Password for the `root` user. | Randomly generated |
| `mysqlUser` | Username of new user to create. | `nil` |
+11 -3
View File
@@ -12,8 +12,16 @@ To connect to your database:
2. Run a pod to use as a client:
kubectl run mysql-client --image={{ .Values.mysqlImage }} -it --rm --restart=Never -- /bin/sh
kubectl run mysql-client --image={{ .Values.mysqlImage }} -it --rm --restart='Never' --namespace {{ .Release.Namespace }} -- /bin/sh
2. Open a connection to one of the MySQL pods
3. To connect to Master service (read/write):
mysql -h {{ template "fullname" . }}-0.{{ template "fullname" . }} -p
mysql -h {{ template "fullname" . }}-0.{{ template "fullname" . }} -u root -p
{{- if lt 1 (.Values.mysqlha.replicaCount | int64) }}
4. To connect to slave service (read-only):
mysql -h {{ template "fullname" . }}-readonly -u root -p
{{- end }}
+5 -1
View File
@@ -25,6 +25,7 @@ spec:
initContainers:
- name: clone-mysql
image: {{ .Values.xtraBackupImage }}
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
command:
- bash
- "-c"
@@ -58,6 +59,7 @@ spec:
mountPath: /etc/mysql/conf.d
- name: init-mysql
image: {{ .Values.mysqlImage }}
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
command: ["/bin/bash"]
args:
- "-c"
@@ -89,6 +91,7 @@ spec:
containers:
- name: mysql
image: {{ .Values.mysqlImage }}
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
env:
- name: MYSQL_DATABASE
value: {{ default "" .Values.mysqlha.mysqlDatabase | quote }}
@@ -146,6 +149,7 @@ spec:
timeoutSeconds: 1
- name: xtrabackup
image: {{ .Values.xtraBackupImage }}
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
env:
- name: MYSQL_PWD
valueFrom:
@@ -226,7 +230,7 @@ spec:
{{- if .Values.metrics.enabled }}
- name: metrics
image: "{{ .Values.metrics.image }}:{{ .Values.metrics.imageTag }}"
imagePullPolicy: {{ .Values.pullPolicy | quote }}
imagePullPolicy: {{ .Values.imagePullPolicy | quote }}
{{- if .Values.mysqlha.mysqlAllowEmptyPassword }}
command: ['sh', '-c', 'DATA_SOURCE_NAME="root@(localhost:3306)/" /bin/mysqld_exporter' ]
{{- else }}
+6 -1
View File
@@ -4,6 +4,12 @@
mysqlImage: mysql:5.7.13
xtraBackupImage: gcr.io/google-samples/xtrabackup:1.0
## Specify an imagePullPolicy (Required)
## It's recommended to change this to 'Always' if the image tag is 'latest'
## ref: http://kubernetes.io/docs/user-guide/images/#updating-images
##
imagePullPolicy: IfNotPresent
mysqlha:
replicaCount: 3
@@ -76,7 +82,6 @@ metrics:
enabled: false
image: prom/mysqld-exporter
imageTag: v0.10.0
imagePullPolicy: IfNotPresent
annotations: {}
livenessProbe: