sync en zh yaml (#19781)
This commit is contained in:
@@ -14,6 +14,6 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx:1.8
|
image: nginx:1.14.2
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx:1.8 # Update the version of nginx from 1.7.9 to 1.8
|
image: nginx:1.16.1 # Update the version of nginx from 1.14.2 to 1.16.1
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx:1.7.9
|
image: nginx:1.14.2
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: slave
|
- name: slave
|
||||||
image: gcr.io/google_samples/gb-redisslave:v1
|
image: gcr.io/google_samples/gb-redisslave:v3
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
cpu: 100m
|
cpu: 100m
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
kind: PersistentVolume
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: mysql-pv-volume
|
name: mysql-pv-volume
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
@@ -106,16 +106,16 @@ spec:
|
|||||||
cd /var/lib/mysql
|
cd /var/lib/mysql
|
||||||
|
|
||||||
# Determine binlog position of cloned data, if any.
|
# Determine binlog position of cloned data, if any.
|
||||||
if [[ -f xtrabackup_slave_info ]]; then
|
if [[ -f xtrabackup_slave_info && "x$(<xtrabackup_slave_info)" != "x" ]]; then
|
||||||
# XtraBackup already generated a partial "CHANGE MASTER TO" query
|
# XtraBackup already generated a partial "CHANGE MASTER TO" query
|
||||||
# because we're cloning from an existing slave.
|
# because we're cloning from an existing slave. (Need to remove the tailing semicolon!)
|
||||||
mv xtrabackup_slave_info change_master_to.sql.in
|
cat xtrabackup_slave_info | sed -E 's/;$//g' > change_master_to.sql.in
|
||||||
# Ignore xtrabackup_binlog_info in this case (it's useless).
|
# Ignore xtrabackup_binlog_info in this case (it's useless).
|
||||||
rm -f xtrabackup_binlog_info
|
rm -f xtrabackup_slave_info xtrabackup_binlog_info
|
||||||
elif [[ -f xtrabackup_binlog_info ]]; then
|
elif [[ -f xtrabackup_binlog_info ]]; then
|
||||||
# We're cloning directly from master. Parse binlog position.
|
# We're cloning directly from master. Parse binlog position.
|
||||||
[[ `cat xtrabackup_binlog_info` =~ ^(.*?)[[:space:]]+(.*?)$ ]] || exit 1
|
[[ `cat xtrabackup_binlog_info` =~ ^(.*?)[[:space:]]+(.*?)$ ]] || exit 1
|
||||||
rm xtrabackup_binlog_info
|
rm -f xtrabackup_binlog_info xtrabackup_slave_info
|
||||||
echo "CHANGE MASTER TO MASTER_LOG_FILE='${BASH_REMATCH[1]}',\
|
echo "CHANGE MASTER TO MASTER_LOG_FILE='${BASH_REMATCH[1]}',\
|
||||||
MASTER_LOG_POS=${BASH_REMATCH[2]}" > change_master_to.sql.in
|
MASTER_LOG_POS=${BASH_REMATCH[2]}" > change_master_to.sql.in
|
||||||
fi
|
fi
|
||||||
@@ -126,16 +126,15 @@ spec:
|
|||||||
until mysql -h 127.0.0.1 -e "SELECT 1"; do sleep 1; done
|
until mysql -h 127.0.0.1 -e "SELECT 1"; do sleep 1; done
|
||||||
|
|
||||||
echo "Initializing replication from clone position"
|
echo "Initializing replication from clone position"
|
||||||
|
mysql -h 127.0.0.1 \
|
||||||
|
-e "$(<change_master_to.sql.in), \
|
||||||
|
MASTER_HOST='mysql-0.mysql', \
|
||||||
|
MASTER_USER='root', \
|
||||||
|
MASTER_PASSWORD='', \
|
||||||
|
MASTER_CONNECT_RETRY=10; \
|
||||||
|
START SLAVE;" || exit 1
|
||||||
# In case of container restart, attempt this at-most-once.
|
# In case of container restart, attempt this at-most-once.
|
||||||
mv change_master_to.sql.in change_master_to.sql.orig
|
mv change_master_to.sql.in change_master_to.sql.orig
|
||||||
mysql -h 127.0.0.1 <<EOF
|
|
||||||
$(<change_master_to.sql.orig),
|
|
||||||
MASTER_HOST='mysql-0.mysql',
|
|
||||||
MASTER_USER='root',
|
|
||||||
MASTER_PASSWORD='',
|
|
||||||
MASTER_CONNECT_RETRY=10;
|
|
||||||
START SLAVE;
|
|
||||||
EOF
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start a server to send backups when requested by peers.
|
# Start a server to send backups when requested by peers.
|
||||||
|
|||||||
@@ -29,6 +29,6 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx:1.7.9
|
image: nginx:1.14.2
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx:1.7.9
|
image: nginx:1.14.2
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|||||||
@@ -12,3 +12,5 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: shared-data
|
- name: shared-data
|
||||||
mountPath: /usr/share/nginx/html
|
mountPath: /usr/share/nginx/html
|
||||||
|
hostNetwork: true
|
||||||
|
dnsPolicy: Default
|
||||||
|
|||||||
@@ -14,6 +14,6 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx:1.7.9
|
image: nginx:1.14.2
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|||||||
@@ -13,6 +13,6 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx:1.11.9 # update the image
|
image: nginx:1.16.1 # update the image
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ spec:
|
|||||||
replicas: 3
|
replicas: 3
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
podManagementPolicy: Parallel
|
podManagementPolicy: OrderedReady
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: audit.k8s.io/v1beta1 # This is required.
|
apiVersion: audit.k8s.io/v1 # This is required.
|
||||||
kind: Policy
|
kind: Policy
|
||||||
# Don't generate audit events for all requests in RequestReceived stage.
|
# Don't generate audit events for all requests in RequestReceived stage.
|
||||||
omitStages:
|
omitStages:
|
||||||
@@ -65,4 +65,4 @@ rules:
|
|||||||
# Long-running requests like watches that fall under this rule will not
|
# Long-running requests like watches that fall under this rule will not
|
||||||
# generate an audit event in RequestReceived.
|
# generate an audit event in RequestReceived.
|
||||||
omitStages:
|
omitStages:
|
||||||
- "RequestReceived"
|
- "RequestReceived"
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: redis
|
- name: redis
|
||||||
image: kubernetes/redis:v1
|
image: redis:5.0.4
|
||||||
|
command:
|
||||||
|
- redis-server
|
||||||
|
- "/redis-master/redis.conf"
|
||||||
env:
|
env:
|
||||||
- name: MASTER
|
- name: MASTER
|
||||||
value: "true"
|
value: "true"
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: podinfo
|
- name: podinfo
|
||||||
mountPath: /etc/podinfo
|
mountPath: /etc/podinfo
|
||||||
readOnly: false
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: podinfo
|
- name: podinfo
|
||||||
downwardAPI:
|
downwardAPI:
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: podinfo
|
- name: podinfo
|
||||||
mountPath: /etc/podinfo
|
mountPath: /etc/podinfo
|
||||||
readOnly: false
|
|
||||||
volumes:
|
volumes:
|
||||||
- name: podinfo
|
- name: podinfo
|
||||||
downwardAPI:
|
downwardAPI:
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ spec:
|
|||||||
- name: test-container
|
- name: test-container
|
||||||
image: nginx
|
image: nginx
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
# name must match the volume name below
|
# name must match the volume name below
|
||||||
- name: secret-volume
|
- name: secret-volume
|
||||||
mountPath: /etc/secret-volume
|
mountPath: /etc/secret-volume
|
||||||
# The secret data is exposed to Containers in the Pod through a Volume.
|
# The secret data is exposed to Containers in the Pod through a Volume.
|
||||||
volumes:
|
volumes:
|
||||||
- name: secret-volume
|
- name: secret-volume
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ kind: Secret
|
|||||||
metadata:
|
metadata:
|
||||||
name: test-secret
|
name: test-secret
|
||||||
data:
|
data:
|
||||||
username: bXktYXBwCg==
|
username: bXktYXBw
|
||||||
password: Mzk1MjgkdmRnN0piCg==
|
password: Mzk1MjgkdmRnN0pi
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
kind: Pod
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: nginx
|
name: nginx
|
||||||
spec:
|
spec:
|
||||||
@@ -9,7 +9,7 @@ spec:
|
|||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /var/run/secrets/tokens
|
- mountPath: /var/run/secrets/tokens
|
||||||
name: vault-token
|
name: vault-token
|
||||||
serviceAccountName: acct
|
serviceAccountName: build-robot
|
||||||
volumes:
|
volumes:
|
||||||
- name: vault-token
|
- name: vault-token
|
||||||
projected:
|
projected:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: 8080
|
port: 8080
|
||||||
httpHeaders:
|
httpHeaders:
|
||||||
- name: X-Custom-Header
|
- name: Custom-Header
|
||||||
value: Awesome
|
value: Awesome
|
||||||
initialDelaySeconds: 3
|
initialDelaySeconds: 3
|
||||||
periodSeconds: 3
|
periodSeconds: 3
|
||||||
|
|||||||
@@ -5,13 +5,15 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
|
runAsGroup: 3000
|
||||||
fsGroup: 2000
|
fsGroup: 2000
|
||||||
volumes:
|
volumes:
|
||||||
- name: sec-ctx-vol
|
- name: sec-ctx-vol
|
||||||
emptyDir: {}
|
emptyDir: {}
|
||||||
containers:
|
containers:
|
||||||
- name: sec-ctx-demo
|
- name: sec-ctx-demo
|
||||||
image: gcr.io/google-samples/node-hello:1.0
|
image: busybox
|
||||||
|
command: [ "sh", "-c", "sleep 1h" ]
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: sec-ctx-vol
|
- name: sec-ctx-vol
|
||||||
mountPath: /data/demo
|
mountPath: /data/demo
|
||||||
|
|||||||
@@ -5,6 +5,6 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: nginx:1.7.9
|
image: nginx:1.14.2
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
kind: PersistentVolumeClaim
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: task-pv-claim
|
name: task-pv-claim
|
||||||
spec:
|
spec:
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
kind: Pod
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
metadata:
|
metadata:
|
||||||
name: task-pv-pod
|
name: task-pv-pod
|
||||||
spec:
|
spec:
|
||||||
volumes:
|
volumes:
|
||||||
- name: task-pv-storage
|
- name: task-pv-storage
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: task-pv-claim
|
claimName: task-pv-claim
|
||||||
containers:
|
containers:
|
||||||
- name: task-pv-container
|
- name: task-pv-container
|
||||||
image: nginx
|
image: nginx
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
kind: PersistentVolume
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: task-pv-volume
|
name: task-pv-volume
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
Reference in New Issue
Block a user