-
Notifications
You must be signed in to change notification settings - Fork 1.6k
zh-translation:/docs/setup/additional-setup/sidecar-injection/index.md #5410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add Installing the Sidecar section translations
Hi @sirius1024. Thanks for your PR. I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -9,37 +9,35 @@ aliases: | |||
- /docs/setup/kubernetes/additional-setup/sidecar-injection/ | |||
--- | |||
|
|||
## Injection | |||
## 注入 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请问全文中所有的标题增加锚点。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经加好测试过了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
缺少锚点
Add anchor for sections
/ok-to-test |
/review |
@@ -9,37 +9,35 @@ aliases: | |||
- /docs/setup/kubernetes/additional-setup/sidecar-injection/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
所有内部超链接前需要添加 /zh
,例如
/zh/docs/setup/kubernetes/additional-setup/sidecar-injection/
/zh/docs/reference/commands/istioctl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
所有内部超链接已经修复
title: Installing the Sidecar | ||
description: Install the Istio sidecar in application pods automatically using the sidecar injector webhook or manually using istioctl CLI. | ||
title: 设置 Sidecar | ||
description: 在应用程序 Pod 中使用 sidecar injector webhook 自动安装或使用 istioctl CLI 手动安装 Istio sidecar 。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中文标点与英文之间不需要加空格
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经修复
|
||
Manual injection directly modifies configuration, like deployments, and injects the proxy configuration into it. | ||
手动注入直接修改配置,如 deployment ,并将代理配置注入其中。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中文标点与英文之间不需要加空格
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经修复
The above command will not remove the injected sidecars from Pods. A | ||
rolling update or simply deleting the pods and forcing the deployment | ||
to create them is required. | ||
上面的命令不会从 pod 中移除注入的 sidecar 。需要进行滚动更新或者直接删除 pod ,并强制 deployment 创建它们。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中文标点与英文之间不需要加空格
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已经修复
/review |
1. Add `/zh` at the head of internal links 2. Fix punctuations with space
@@ -134,41 +130,27 @@ sleep-776b7bcdcd-bhn9m 2/2 Terminating 0 2m | |||
sleep-776b7bcdcd-gmvnr 1/1 Running 0 2s | |||
{{< /text >}} | |||
|
|||
#### Understanding what happened | |||
#### 理解其过程{#understanding-what-happened} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
title: Installing the Sidecar | ||
description: Install the Istio sidecar in application pods automatically using the sidecar injector webhook or manually using istioctl CLI. | ||
title: 设置 Sidecar | ||
description: 在应用程序 Pod 中使用 sidecar injector webhook 自动安装或使用 istioctl CLI 手动安装 Istio sidecar 。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中文标点与英文之间不需要加空格,详见术语表。
https://github.com/servicemesher/istio-official-translation/blob/master/term.md
`istio-sidecar-injector` configuration map specifies the configuration for the | ||
injected sidecar. To change how namespaces are selected for injection, you can | ||
edit the `MutatingWebhookConfiguration` with the following command: | ||
当 Kubernetes 调用 webhook 时, [`admissionregistration`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#mutatingwebhookconfiguration-v1beta1-admissionregistration-k8s-io) 配置被应用。默认配置将 sidecar 注入到所有拥有 `istio-injection=enabled` 标签的 namespace 下的 pod 中。 `istio-sidecar-injector` 配置图指定了注入 sidecar 的配置。如需更改指定哪些 namespace 被注入,你可以使用以下命令编辑 `MutatingWebhookConfiguration` : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
英文与中文标点直接不需要加空格。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configuration map 翻译为配置图似乎不合适,map 在这里应该是指映射或字典。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configuration map 翻译为配置图似乎不合适,map 在这里应该是指映射或字典。
不错。已经修改。
标点的哪些comments已经outdate了。您可以刷新一下,PR有更新这些错误。
@@ -286,19 +262,19 @@ data: | |||
... | |||
{{< /text >}} | |||
|
|||
The above statement means: Never inject on pods that have the label `openshift.io/build.name` **or** `openshift.io/deployer-pod-for.name` – the values of the labels don't matter, we are just checking if the keys exist. With this rule added, the OpenShift Builds use case illustrated above is covered, meaning auxiliary pods will not have sidecars injected (because source-to-image auxiliary pods **do** contain those labels). | |||
上面声明的意思是:永远不要注入带有 `openshift.io/build.name` **或者** `openshift.io/deployer-pod-for.name` 标签的 pod —— 标签的值无关紧要,我们只检查键睡否存在。添加了这个规则之后,就涵盖了上面所说的 OpenShift 的构建用例,也就是说辅助 pod 不会被注入 sidecar(因为 source-to-image 工具产生的辅助 pod **明确**包含这些标签)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
睡否 => 是否
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
||
To manually inject a deployment, use [`istioctl kube-inject`](/docs/reference/commands/istioctl/#istioctl-kube-inject): | ||
要手动注入 deployment ,请使用 [`istioctl kube-inject`](/docs/reference/commands/istioctl/#istioctl-kube-inject): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deployment ,=> deployment,
{{< /tip >}} | ||
|
||
When the injection webhook is enabled, any new pods that are created will automatically have a sidecar added to them. | ||
当注入 webhook 被启用后,任何新的 pod 都有将在创建时自动添加 sidecar 。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sidecar 。=> sidecar。
|
||
{{< text bash >}} | ||
$ kubectl describe pod -l app=sleep | ||
{{< /text >}} | ||
|
||
Disable injection for the `default` namespace and verify new pods are created without the sidecar. | ||
禁用 `default` namespace 注入,并确认新的 pod 在创建时没有 sidecar 。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sidecar 。=> sidecar。
|
||
#### More control: adding exceptions | ||
有些情况下用户无法控制 pod 的创建,例如,这些用户是被其他人创建的。因此他们无法在 pod 中添加 `sidecar.istio.io/inject` 注解,来明确是否安装 sidecar 。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sidecar 。=> sidecar。
/retest |
|
||
Note that unlike manual injection, automatic injection occurs at the pod-level. You won't see any change to the deployment itself. Instead you'll want to check individual pods (via `kubectl describe`) to see the injected proxy. | ||
请注意,区别于手动注入,自动注入发生在 pod 层面。你将看不到 deployment 本身有任何更改。取而代之,需要检查单独的 pod(使用 `kubectl describe` )来查询被注入的代理。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处右括号前多了一个空格
的 pod(使用 kubectl describe
)来
`istio-sidecar-injector` configuration map specifies the configuration for the | ||
injected sidecar. To change how namespaces are selected for injection, you can | ||
edit the `MutatingWebhookConfiguration` with the following command: | ||
当 Kubernetes 调用 webhook 时, [`admissionregistration`](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.10/#mutatingwebhookconfiguration-v1beta1-admissionregistration-k8s-io) 配置被应用。默认配置将 sidecar 注入到所有拥有 `istio-injection=enabled` 标签的 namespace 下的 pod 中。 `istio-sidecar-injector` 配置字典指定了注入 sidecar 的配置。如需更改指定哪些 namespace 被注入,你可以使用以下命令编辑 `MutatingWebhookConfiguration` : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中文标点与英文之间不需要加空格
命令编辑 MutatingWebhookConfiguration
:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
|
||
The label selector approach gives a lot of flexibility on how to express those exceptions. Take a look at [these docs](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements) to see what you can do with them! | ||
使用标签选择器的方法在表达这些例外时提供了很大的灵活性。查看 [这些文档](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements) 看看可以用它们来做什么! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
中文超链接前后无需加空格
|
||
The label selector approach gives a lot of flexibility on how to express those exceptions. Take a look at [these docs](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements) to see what you can do with them! | ||
使用标签选择器的方法在表达这些例外时提供了很大的灵活性。查看[这些文档](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements) 看看可以用它们来做什么! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
超链接右侧多了一个空格 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
超链接右侧多了一个空格 😅
Sorry for my negligence. Fixed.
/LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/retest |
/LGTM |
ref: servicemesher/istio-official-translation#1277