Skip to content

Commit 5db5d26

Browse files
authored
sync en zh yaml (#19781)
1 parent 09fc6f9 commit 5db5d26

25 files changed

+46
-42
lines changed

content/zh/examples/application/deployment-scale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ spec:
1414
spec:
1515
containers:
1616
- name: nginx
17-
image: nginx:1.8
17+
image: nginx:1.14.2
1818
ports:
1919
- containerPort: 80

content/zh/examples/application/deployment-update.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ spec:
1414
spec:
1515
containers:
1616
- name: nginx
17-
image: nginx:1.8 # Update the version of nginx from 1.7.9 to 1.8
17+
image: nginx:1.16.1 # Update the version of nginx from 1.14.2 to 1.16.1
1818
ports:
1919
- containerPort: 80

content/zh/examples/application/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ spec:
1414
spec:
1515
containers:
1616
- name: nginx
17-
image: nginx:1.7.9
17+
image: nginx:1.14.2
1818
ports:
1919
- containerPort: 80

content/zh/examples/application/guestbook/redis-slave-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
spec:
2121
containers:
2222
- name: slave
23-
image: gcr.io/google_samples/gb-redisslave:v1
23+
image: gcr.io/google_samples/gb-redisslave:v3
2424
resources:
2525
requests:
2626
cpu: 100m

content/zh/examples/application/mysql/mysql-pv.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
kind: PersistentVolume
21
apiVersion: v1
2+
kind: PersistentVolume
33
metadata:
44
name: mysql-pv-volume
55
labels:

content/zh/examples/application/mysql/mysql-statefulset.yaml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ spec:
106106
cd /var/lib/mysql
107107
108108
# Determine binlog position of cloned data, if any.
109-
if [[ -f xtrabackup_slave_info ]]; then
109+
if [[ -f xtrabackup_slave_info && "x$(<xtrabackup_slave_info)" != "x" ]]; then
110110
# XtraBackup already generated a partial "CHANGE MASTER TO" query
111-
# because we're cloning from an existing slave.
112-
mv xtrabackup_slave_info change_master_to.sql.in
111+
# because we're cloning from an existing slave. (Need to remove the tailing semicolon!)
112+
cat xtrabackup_slave_info | sed -E 's/;$//g' > change_master_to.sql.in
113113
# Ignore xtrabackup_binlog_info in this case (it's useless).
114-
rm -f xtrabackup_binlog_info
114+
rm -f xtrabackup_slave_info xtrabackup_binlog_info
115115
elif [[ -f xtrabackup_binlog_info ]]; then
116116
# We're cloning directly from master. Parse binlog position.
117117
[[ `cat xtrabackup_binlog_info` =~ ^(.*?)[[:space:]]+(.*?)$ ]] || exit 1
118-
rm xtrabackup_binlog_info
118+
rm -f xtrabackup_binlog_info xtrabackup_slave_info
119119
echo "CHANGE MASTER TO MASTER_LOG_FILE='${BASH_REMATCH[1]}',\
120120
MASTER_LOG_POS=${BASH_REMATCH[2]}" > change_master_to.sql.in
121121
fi
@@ -126,16 +126,15 @@ spec:
126126
until mysql -h 127.0.0.1 -e "SELECT 1"; do sleep 1; done
127127
128128
echo "Initializing replication from clone position"
129+
mysql -h 127.0.0.1 \
130+
-e "$(<change_master_to.sql.in), \
131+
MASTER_HOST='mysql-0.mysql', \
132+
MASTER_USER='root', \
133+
MASTER_PASSWORD='', \
134+
MASTER_CONNECT_RETRY=10; \
135+
START SLAVE;" || exit 1
129136
# In case of container restart, attempt this at-most-once.
130137
mv change_master_to.sql.in change_master_to.sql.orig
131-
mysql -h 127.0.0.1 <<EOF
132-
$(<change_master_to.sql.orig),
133-
MASTER_HOST='mysql-0.mysql',
134-
MASTER_USER='root',
135-
MASTER_PASSWORD='',
136-
MASTER_CONNECT_RETRY=10;
137-
START SLAVE;
138-
EOF
139138
fi
140139
141140
# Start a server to send backups when requested by peers.

content/zh/examples/application/nginx-app.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ spec:
2929
spec:
3030
containers:
3131
- name: nginx
32-
image: nginx:1.7.9
32+
image: nginx:1.14.2
3333
ports:
3434
- containerPort: 80

content/zh/examples/application/nginx/nginx-deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ spec:
1414
spec:
1515
containers:
1616
- name: nginx
17-
image: nginx:1.7.9
17+
image: nginx:1.14.2
1818
ports:
1919
- containerPort: 80

content/zh/examples/application/shell-demo.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ spec:
1212
volumeMounts:
1313
- name: shared-data
1414
mountPath: /usr/share/nginx/html
15+
hostNetwork: true
16+
dnsPolicy: Default

content/zh/examples/application/simple_deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ spec:
1414
spec:
1515
containers:
1616
- name: nginx
17-
image: nginx:1.7.9
17+
image: nginx:1.14.2
1818
ports:
1919
- containerPort: 80

0 commit comments

Comments
 (0)