From b886d6bcfda5d3d8342e1c47cc879972c562022b Mon Sep 17 00:00:00 2001 From: Mengjiao Liu Date: Fri, 20 Sep 2024 15:14:46 +0800 Subject: [PATCH] [zh-cn] Resync some examples YAMLs --- .../examples/application/deployment-sidecar.yaml | 10 +++++----- .../examples/application/job/job-sidecar.yaml | 2 +- .../examples/application/web/web-parallel.yaml | 2 +- content/zh-cn/examples/application/web/web.yaml | 2 +- .../health-for-strangers.yaml | 14 +++++++------- .../list-events-default-service-account.yaml | 2 +- .../examples/service/access/hello-application.yaml | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/content/zh-cn/examples/application/deployment-sidecar.yaml b/content/zh-cn/examples/application/deployment-sidecar.yaml index ae958c5b74..3f1b841d31 100644 --- a/content/zh-cn/examples/application/deployment-sidecar.yaml +++ b/content/zh-cn/examples/application/deployment-sidecar.yaml @@ -17,7 +17,7 @@ spec: containers: - name: myapp image: alpine:latest - command: ['sh', '-c', 'echo "logging" > /opt/logs.txt'] + command: ['sh', '-c', 'while true; do echo "logging" >> /opt/logs.txt; sleep 1; done'] volumeMounts: - name: data mountPath: /opt @@ -25,10 +25,10 @@ spec: - name: logshipper image: alpine:latest restartPolicy: Always - command: ['sh', '-c', 'tail /opt/logs.txt'] + command: ['sh', '-c', 'tail -F /opt/logs.txt'] volumeMounts: - name: data mountPath: /opt - volumes: - - name: data - emptyDir: {} \ No newline at end of file + volumes: + - name: data + emptyDir: {} \ No newline at end of file diff --git a/content/zh-cn/examples/application/job/job-sidecar.yaml b/content/zh-cn/examples/application/job/job-sidecar.yaml index c5518cb061..9787ad8851 100644 --- a/content/zh-cn/examples/application/job/job-sidecar.yaml +++ b/content/zh-cn/examples/application/job/job-sidecar.yaml @@ -16,7 +16,7 @@ spec: - name: logshipper image: alpine:latest restartPolicy: Always - command: ['sh', '-c', 'tail /opt/logs.txt'] + command: ['sh', '-c', 'tail -F /opt/logs.txt'] volumeMounts: - name: data mountPath: /opt diff --git a/content/zh-cn/examples/application/web/web-parallel.yaml b/content/zh-cn/examples/application/web/web-parallel.yaml index a6633f476c..3664c63c10 100644 --- a/content/zh-cn/examples/application/web/web-parallel.yaml +++ b/content/zh-cn/examples/application/web/web-parallel.yaml @@ -30,7 +30,7 @@ spec: spec: containers: - name: nginx - image: registry.k8s.io/nginx-slim:0.8 + image: registry.k8s.io/nginx-slim:0.24 ports: - containerPort: 80 name: web diff --git a/content/zh-cn/examples/application/web/web.yaml b/content/zh-cn/examples/application/web/web.yaml index 95244cd72b..6f8f5133ff 100644 --- a/content/zh-cn/examples/application/web/web.yaml +++ b/content/zh-cn/examples/application/web/web.yaml @@ -29,7 +29,7 @@ spec: spec: containers: - name: nginx - image: registry.k8s.io/nginx-slim:0.8 + image: registry.k8s.io/nginx-slim:0.21 ports: - containerPort: 80 name: web diff --git a/content/zh-cn/examples/priority-and-fairness/health-for-strangers.yaml b/content/zh-cn/examples/priority-and-fairness/health-for-strangers.yaml index 955322c84b..312f80751f 100644 --- a/content/zh-cn/examples/priority-and-fairness/health-for-strangers.yaml +++ b/content/zh-cn/examples/priority-and-fairness/health-for-strangers.yaml @@ -1,4 +1,4 @@ -apiVersion: flowcontrol.apiserver.k8s.io/v1beta3 +apiVersion: flowcontrol.apiserver.k8s.io/v1 kind: FlowSchema metadata: name: health-for-strangers @@ -8,12 +8,12 @@ spec: name: exempt rules: - nonResourceRules: - - nonResourceURLs: - - "/healthz" - - "/livez" - - "/readyz" - verbs: - - "*" + - nonResourceURLs: + - "/healthz" + - "/livez" + - "/readyz" + verbs: + - "*" subjects: - kind: Group group: diff --git a/content/zh-cn/examples/priority-and-fairness/list-events-default-service-account.yaml b/content/zh-cn/examples/priority-and-fairness/list-events-default-service-account.yaml index 94e73ae948..e9e1beab99 100644 --- a/content/zh-cn/examples/priority-and-fairness/list-events-default-service-account.yaml +++ b/content/zh-cn/examples/priority-and-fairness/list-events-default-service-account.yaml @@ -1,4 +1,4 @@ -apiVersion: flowcontrol.apiserver.k8s.io/v1beta3 +apiVersion: flowcontrol.apiserver.k8s.io/v1 kind: FlowSchema metadata: name: list-events-default-service-account diff --git a/content/zh-cn/examples/service/access/hello-application.yaml b/content/zh-cn/examples/service/access/hello-application.yaml index 1cf41313c5..24270db9c9 100644 --- a/content/zh-cn/examples/service/access/hello-application.yaml +++ b/content/zh-cn/examples/service/access/hello-application.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: hello-world - image: gcr.io/google-samples/node-hello:1.0 + image: us-docker.pkg.dev/google-samples/containers/gke/hello-app:2.0 ports: - containerPort: 8080 protocol: TCP