From d6bdb664fb5eb80faa44112d5926ee15dd38023f Mon Sep 17 00:00:00 2001 From: chenrui Date: Mon, 26 Nov 2018 19:06:25 +0800 Subject: [PATCH] zh-trans: add broken link references (#11310) * zh-trans: add broken link references * zh-trans: another batch of needed references * zh-trans: add needed community/static/cncf-code-of-conduct.md ref --- .../community/static/cncf-code-of-conduct.md | 46 +++++++++++++++++++ .../admin/resource/cpu-constraints-pod-2.yaml | 13 ++++++ .../admin/resource/cpu-constraints-pod-3.yaml | 13 ++++++ .../admin/resource/cpu-constraints-pod-4.yaml | 8 ++++ .../admin/resource/cpu-constraints-pod.yaml | 13 ++++++ .../admin/resource/cpu-constraints.yaml | 11 +++++ .../admin/resource/cpu-defaults-pod-2.yaml | 11 +++++ .../admin/resource/cpu-defaults-pod-3.yaml | 11 +++++ .../admin/resource/cpu-defaults-pod.yaml | 8 ++++ .../examples/admin/resource/cpu-defaults.yaml | 11 +++++ .../resource/memory-constraints-pod-2.yaml | 13 ++++++ .../resource/memory-constraints-pod-3.yaml | 13 ++++++ .../resource/memory-constraints-pod-4.yaml | 9 ++++ .../resource/memory-constraints-pod.yaml | 13 ++++++ .../admin/resource/memory-constraints.yaml | 11 +++++ .../admin/resource/memory-defaults-pod-2.yaml | 11 +++++ .../admin/resource/memory-defaults-pod-3.yaml | 11 +++++ .../admin/resource/memory-defaults-pod.yaml | 8 ++++ .../admin/resource/memory-defaults.yaml | 11 +++++ .../admin/resource/quota-mem-cpu-pod-2.yaml | 16 +++++++ .../admin/resource/quota-mem-cpu-pod.yaml | 16 +++++++ .../admin/resource/quota-mem-cpu.yaml | 10 ++++ .../admin/resource/quota-objects-pvc-2.yaml | 11 +++++ .../admin/resource/quota-objects-pvc.yaml | 11 +++++ .../admin/resource/quota-objects.yaml | 9 ++++ content/zh/examples/application/job/job.yaml | 20 ++++++++ .../application/job/rabbitmq/Dockerfile | 10 ++++ .../application/job/rabbitmq/job.yaml | 20 ++++++++ .../application/job/rabbitmq/worker.py | 7 +++ content/zh/examples/application/job/worker.py | 7 +++ 30 files changed, 382 insertions(+) create mode 100644 content/zh/community/static/cncf-code-of-conduct.md create mode 100644 content/zh/examples/admin/resource/cpu-constraints-pod-2.yaml create mode 100644 content/zh/examples/admin/resource/cpu-constraints-pod-3.yaml create mode 100644 content/zh/examples/admin/resource/cpu-constraints-pod-4.yaml create mode 100644 content/zh/examples/admin/resource/cpu-constraints-pod.yaml create mode 100644 content/zh/examples/admin/resource/cpu-constraints.yaml create mode 100644 content/zh/examples/admin/resource/cpu-defaults-pod-2.yaml create mode 100644 content/zh/examples/admin/resource/cpu-defaults-pod-3.yaml create mode 100644 content/zh/examples/admin/resource/cpu-defaults-pod.yaml create mode 100644 content/zh/examples/admin/resource/cpu-defaults.yaml create mode 100644 content/zh/examples/admin/resource/memory-constraints-pod-2.yaml create mode 100644 content/zh/examples/admin/resource/memory-constraints-pod-3.yaml create mode 100644 content/zh/examples/admin/resource/memory-constraints-pod-4.yaml create mode 100644 content/zh/examples/admin/resource/memory-constraints-pod.yaml create mode 100644 content/zh/examples/admin/resource/memory-constraints.yaml create mode 100644 content/zh/examples/admin/resource/memory-defaults-pod-2.yaml create mode 100644 content/zh/examples/admin/resource/memory-defaults-pod-3.yaml create mode 100644 content/zh/examples/admin/resource/memory-defaults-pod.yaml create mode 100644 content/zh/examples/admin/resource/memory-defaults.yaml create mode 100644 content/zh/examples/admin/resource/quota-mem-cpu-pod-2.yaml create mode 100644 content/zh/examples/admin/resource/quota-mem-cpu-pod.yaml create mode 100644 content/zh/examples/admin/resource/quota-mem-cpu.yaml create mode 100644 content/zh/examples/admin/resource/quota-objects-pvc-2.yaml create mode 100644 content/zh/examples/admin/resource/quota-objects-pvc.yaml create mode 100644 content/zh/examples/admin/resource/quota-objects.yaml create mode 100644 content/zh/examples/application/job/job.yaml create mode 100644 content/zh/examples/application/job/rabbitmq/Dockerfile create mode 100644 content/zh/examples/application/job/rabbitmq/job.yaml create mode 100644 content/zh/examples/application/job/rabbitmq/worker.py create mode 100644 content/zh/examples/application/job/worker.py diff --git a/content/zh/community/static/cncf-code-of-conduct.md b/content/zh/community/static/cncf-code-of-conduct.md new file mode 100644 index 0000000000..3ee025ba34 --- /dev/null +++ b/content/zh/community/static/cncf-code-of-conduct.md @@ -0,0 +1,46 @@ + +## CNCF Community Code of Conduct v1.0 + +### Contributor Code of Conduct + +As contributors and maintainers of this project, and in the interest of fostering +an open and welcoming community, we pledge to respect all people who contribute +through reporting issues, posting feature requests, updating documentation, +submitting pull requests or patches, and other activities. + +We are committed to making participation in this project a harassment-free experience for +everyone, regardless of level of experience, gender, gender identity and expression, +sexual orientation, disability, personal appearance, body size, race, ethnicity, age, +religion, or nationality. + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, such as physical or electronic addresses, + without explicit permission +* Other unethical or unprofessional conduct. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are not +aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers +commit themselves to fairly and consistently applying these principles to every aspect +of managing this project. Project maintainers who do not follow or enforce the Code of +Conduct may be permanently removed from the project team. + +This code of conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting +the [Kubernetes Code of Conduct Committee](https://github.com/kubernetes/community/tree/master/committee-code-of-conduct) . + +This Code of Conduct is adapted from the Contributor Covenant +(http://contributor-covenant.org), version 1.2.0, available at +http://contributor-covenant.org/version/1/2/0/ + +### CNCF Events Code of Conduct + +CNCF events are governed by the Linux Foundation [Code of Conduct](http://events.linuxfoundation.org/events/cloudnativecon/attend/code-of-conduct) available on the event page. This is designed to be compatible with the above policy and also includes more details on responding to incidents. diff --git a/content/zh/examples/admin/resource/cpu-constraints-pod-2.yaml b/content/zh/examples/admin/resource/cpu-constraints-pod-2.yaml new file mode 100644 index 0000000000..b5c7348f26 --- /dev/null +++ b/content/zh/examples/admin/resource/cpu-constraints-pod-2.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Pod +metadata: + name: constraints-cpu-demo-2 +spec: + containers: + - name: constraints-cpu-demo-2-ctr + image: nginx + resources: + limits: + cpu: "1.5" + requests: + cpu: "500m" diff --git a/content/zh/examples/admin/resource/cpu-constraints-pod-3.yaml b/content/zh/examples/admin/resource/cpu-constraints-pod-3.yaml new file mode 100644 index 0000000000..896d98ec2f --- /dev/null +++ b/content/zh/examples/admin/resource/cpu-constraints-pod-3.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Pod +metadata: + name: constraints-cpu-demo-4 +spec: + containers: + - name: constraints-cpu-demo-4-ctr + image: nginx + resources: + limits: + cpu: "800m" + requests: + cpu: "100m" diff --git a/content/zh/examples/admin/resource/cpu-constraints-pod-4.yaml b/content/zh/examples/admin/resource/cpu-constraints-pod-4.yaml new file mode 100644 index 0000000000..3c102158db --- /dev/null +++ b/content/zh/examples/admin/resource/cpu-constraints-pod-4.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Pod +metadata: + name: constraints-cpu-demo-4 +spec: + containers: + - name: constraints-cpu-demo-4-ctr + image: vish/stress diff --git a/content/zh/examples/admin/resource/cpu-constraints-pod.yaml b/content/zh/examples/admin/resource/cpu-constraints-pod.yaml new file mode 100644 index 0000000000..7db23f26c8 --- /dev/null +++ b/content/zh/examples/admin/resource/cpu-constraints-pod.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Pod +metadata: + name: constraints-cpu-demo +spec: + containers: + - name: constraints-cpu-demo-ctr + image: nginx + resources: + limits: + cpu: "800m" + requests: + cpu: "500m" diff --git a/content/zh/examples/admin/resource/cpu-constraints.yaml b/content/zh/examples/admin/resource/cpu-constraints.yaml new file mode 100644 index 0000000000..6fc4239027 --- /dev/null +++ b/content/zh/examples/admin/resource/cpu-constraints.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: LimitRange +metadata: + name: cpu-min-max-demo-lr +spec: + limits: + - max: + cpu: "800m" + min: + cpu: "200m" + type: Container diff --git a/content/zh/examples/admin/resource/cpu-defaults-pod-2.yaml b/content/zh/examples/admin/resource/cpu-defaults-pod-2.yaml new file mode 100644 index 0000000000..9ca216dee1 --- /dev/null +++ b/content/zh/examples/admin/resource/cpu-defaults-pod-2.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Pod +metadata: + name: default-cpu-demo-2 +spec: + containers: + - name: default-cpu-demo-2-ctr + image: nginx + resources: + limits: + cpu: "1" diff --git a/content/zh/examples/admin/resource/cpu-defaults-pod-3.yaml b/content/zh/examples/admin/resource/cpu-defaults-pod-3.yaml new file mode 100644 index 0000000000..214cdee34b --- /dev/null +++ b/content/zh/examples/admin/resource/cpu-defaults-pod-3.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Pod +metadata: + name: default-cpu-demo-3 +spec: + containers: + - name: default-cpu-demo-3-ctr + image: nginx + resources: + requests: + cpu: "0.75" diff --git a/content/zh/examples/admin/resource/cpu-defaults-pod.yaml b/content/zh/examples/admin/resource/cpu-defaults-pod.yaml new file mode 100644 index 0000000000..56b06d9a69 --- /dev/null +++ b/content/zh/examples/admin/resource/cpu-defaults-pod.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Pod +metadata: + name: default-cpu-demo +spec: + containers: + - name: default-cpu-demo-ctr + image: nginx diff --git a/content/zh/examples/admin/resource/cpu-defaults.yaml b/content/zh/examples/admin/resource/cpu-defaults.yaml new file mode 100644 index 0000000000..b53d297181 --- /dev/null +++ b/content/zh/examples/admin/resource/cpu-defaults.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: LimitRange +metadata: + name: cpu-limit-range +spec: + limits: + - default: + cpu: 1 + defaultRequest: + cpu: 0.5 + type: Container diff --git a/content/zh/examples/admin/resource/memory-constraints-pod-2.yaml b/content/zh/examples/admin/resource/memory-constraints-pod-2.yaml new file mode 100644 index 0000000000..0b1ae569c4 --- /dev/null +++ b/content/zh/examples/admin/resource/memory-constraints-pod-2.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Pod +metadata: + name: constraints-mem-demo-2 +spec: + containers: + - name: constraints-mem-demo-2-ctr + image: nginx + resources: + limits: + memory: "1.5Gi" + requests: + memory: "800Mi" diff --git a/content/zh/examples/admin/resource/memory-constraints-pod-3.yaml b/content/zh/examples/admin/resource/memory-constraints-pod-3.yaml new file mode 100644 index 0000000000..f97cd4a8ac --- /dev/null +++ b/content/zh/examples/admin/resource/memory-constraints-pod-3.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Pod +metadata: + name: constraints-mem-demo-3 +spec: + containers: + - name: constraints-mem-demo-3-ctr + image: nginx + resources: + limits: + memory: "800Mi" + requests: + memory: "100Mi" diff --git a/content/zh/examples/admin/resource/memory-constraints-pod-4.yaml b/content/zh/examples/admin/resource/memory-constraints-pod-4.yaml new file mode 100644 index 0000000000..657530c41e --- /dev/null +++ b/content/zh/examples/admin/resource/memory-constraints-pod-4.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Pod +metadata: + name: constraints-mem-demo-4 +spec: + containers: + - name: constraints-mem-demo-4-ctr + image: nginx + diff --git a/content/zh/examples/admin/resource/memory-constraints-pod.yaml b/content/zh/examples/admin/resource/memory-constraints-pod.yaml new file mode 100644 index 0000000000..06954d10d6 --- /dev/null +++ b/content/zh/examples/admin/resource/memory-constraints-pod.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Pod +metadata: + name: constraints-mem-demo +spec: + containers: + - name: constraints-mem-demo-ctr + image: nginx + resources: + limits: + memory: "800Mi" + requests: + memory: "600Mi" diff --git a/content/zh/examples/admin/resource/memory-constraints.yaml b/content/zh/examples/admin/resource/memory-constraints.yaml new file mode 100644 index 0000000000..3a2924c032 --- /dev/null +++ b/content/zh/examples/admin/resource/memory-constraints.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: LimitRange +metadata: + name: mem-min-max-demo-lr +spec: + limits: + - max: + memory: 1Gi + min: + memory: 500Mi + type: Container diff --git a/content/zh/examples/admin/resource/memory-defaults-pod-2.yaml b/content/zh/examples/admin/resource/memory-defaults-pod-2.yaml new file mode 100644 index 0000000000..aa80610d84 --- /dev/null +++ b/content/zh/examples/admin/resource/memory-defaults-pod-2.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Pod +metadata: + name: default-mem-demo-2 +spec: + containers: + - name: default-mem-demo-2-ctr + image: nginx + resources: + limits: + memory: "1Gi" diff --git a/content/zh/examples/admin/resource/memory-defaults-pod-3.yaml b/content/zh/examples/admin/resource/memory-defaults-pod-3.yaml new file mode 100644 index 0000000000..09ee8b39a9 --- /dev/null +++ b/content/zh/examples/admin/resource/memory-defaults-pod-3.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Pod +metadata: + name: default-mem-demo-3 +spec: + containers: + - name: default-mem-demo-3-ctr + image: nginx + resources: + requests: + memory: "128Mi" diff --git a/content/zh/examples/admin/resource/memory-defaults-pod.yaml b/content/zh/examples/admin/resource/memory-defaults-pod.yaml new file mode 100644 index 0000000000..ce7a50fb55 --- /dev/null +++ b/content/zh/examples/admin/resource/memory-defaults-pod.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: Pod +metadata: + name: default-mem-demo +spec: + containers: + - name: default-mem-demo-ctr + image: nginx diff --git a/content/zh/examples/admin/resource/memory-defaults.yaml b/content/zh/examples/admin/resource/memory-defaults.yaml new file mode 100644 index 0000000000..b98a5ae262 --- /dev/null +++ b/content/zh/examples/admin/resource/memory-defaults.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: LimitRange +metadata: + name: mem-limit-range +spec: + limits: + - default: + memory: 512Mi + defaultRequest: + memory: 256Mi + type: Container diff --git a/content/zh/examples/admin/resource/quota-mem-cpu-pod-2.yaml b/content/zh/examples/admin/resource/quota-mem-cpu-pod-2.yaml new file mode 100644 index 0000000000..22726c600a --- /dev/null +++ b/content/zh/examples/admin/resource/quota-mem-cpu-pod-2.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Pod +metadata: + name: quota-mem-cpu-demo-2 +spec: + containers: + - name: quota-mem-cpu-demo-2-ctr + image: redis + resources: + limits: + memory: "1Gi" + cpu: "800m" + requests: + memory: "700Mi" + cpu: "400m" + diff --git a/content/zh/examples/admin/resource/quota-mem-cpu-pod.yaml b/content/zh/examples/admin/resource/quota-mem-cpu-pod.yaml new file mode 100644 index 0000000000..ba27bf5ccf --- /dev/null +++ b/content/zh/examples/admin/resource/quota-mem-cpu-pod.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Pod +metadata: + name: quota-mem-cpu-demo +spec: + containers: + - name: quota-mem-cpu-demo-ctr + image: nginx + resources: + limits: + memory: "800Mi" + cpu: "800m" + requests: + memory: "600Mi" + cpu: "400m" + diff --git a/content/zh/examples/admin/resource/quota-mem-cpu.yaml b/content/zh/examples/admin/resource/quota-mem-cpu.yaml new file mode 100644 index 0000000000..5c4bcd81b8 --- /dev/null +++ b/content/zh/examples/admin/resource/quota-mem-cpu.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: ResourceQuota +metadata: + name: mem-cpu-demo +spec: + hard: + requests.cpu: "1" + requests.memory: 1Gi + limits.cpu: "2" + limits.memory: 2Gi diff --git a/content/zh/examples/admin/resource/quota-objects-pvc-2.yaml b/content/zh/examples/admin/resource/quota-objects-pvc-2.yaml new file mode 100644 index 0000000000..88c165d144 --- /dev/null +++ b/content/zh/examples/admin/resource/quota-objects-pvc-2.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: pvc-quota-demo-2 +spec: + storageClassName: manual + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 4Gi diff --git a/content/zh/examples/admin/resource/quota-objects-pvc.yaml b/content/zh/examples/admin/resource/quota-objects-pvc.yaml new file mode 100644 index 0000000000..b38256b897 --- /dev/null +++ b/content/zh/examples/admin/resource/quota-objects-pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: pvc-quota-demo +spec: + storageClassName: manual + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 3Gi diff --git a/content/zh/examples/admin/resource/quota-objects.yaml b/content/zh/examples/admin/resource/quota-objects.yaml new file mode 100644 index 0000000000..e97748decd --- /dev/null +++ b/content/zh/examples/admin/resource/quota-objects.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: ResourceQuota +metadata: + name: object-quota-demo +spec: + hard: + persistentvolumeclaims: "1" + services.loadbalancers: "2" + services.nodeports: "0" diff --git a/content/zh/examples/application/job/job.yaml b/content/zh/examples/application/job/job.yaml new file mode 100644 index 0000000000..4e1a61892b --- /dev/null +++ b/content/zh/examples/application/job/job.yaml @@ -0,0 +1,20 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: job-wq-1 +spec: + completions: 8 + parallelism: 2 + template: + metadata: + name: job-wq-1 + spec: + containers: + - name: c + image: gcr.io//job-wq-1 + env: + - name: BROKER_URL + value: amqp://guest:guest@rabbitmq-service:5672 + - name: QUEUE + value: job1 + restartPolicy: OnFailure diff --git a/content/zh/examples/application/job/rabbitmq/Dockerfile b/content/zh/examples/application/job/rabbitmq/Dockerfile new file mode 100644 index 0000000000..cbd36bb620 --- /dev/null +++ b/content/zh/examples/application/job/rabbitmq/Dockerfile @@ -0,0 +1,10 @@ +# Specify BROKER_URL and QUEUE when running +FROM ubuntu:14.04 + +RUN apt-get update && \ + apt-get install -y curl ca-certificates amqp-tools python \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* +COPY ./worker.py /worker.py + +CMD /usr/bin/amqp-consume --url=$BROKER_URL -q $QUEUE -c 1 /worker.py diff --git a/content/zh/examples/application/job/rabbitmq/job.yaml b/content/zh/examples/application/job/rabbitmq/job.yaml new file mode 100644 index 0000000000..4e1a61892b --- /dev/null +++ b/content/zh/examples/application/job/rabbitmq/job.yaml @@ -0,0 +1,20 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: job-wq-1 +spec: + completions: 8 + parallelism: 2 + template: + metadata: + name: job-wq-1 + spec: + containers: + - name: c + image: gcr.io//job-wq-1 + env: + - name: BROKER_URL + value: amqp://guest:guest@rabbitmq-service:5672 + - name: QUEUE + value: job1 + restartPolicy: OnFailure diff --git a/content/zh/examples/application/job/rabbitmq/worker.py b/content/zh/examples/application/job/rabbitmq/worker.py new file mode 100644 index 0000000000..a20884515d --- /dev/null +++ b/content/zh/examples/application/job/rabbitmq/worker.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +# Just prints standard out and sleeps for 10 seconds. +import sys +import time +print("Processing " + sys.stdin.lines()) +time.sleep(10) diff --git a/content/zh/examples/application/job/worker.py b/content/zh/examples/application/job/worker.py new file mode 100644 index 0000000000..a20884515d --- /dev/null +++ b/content/zh/examples/application/job/worker.py @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +# Just prints standard out and sleeps for 10 seconds. +import sys +import time +print("Processing " + sys.stdin.lines()) +time.sleep(10)