Skip to content

Commit 56ad8a6

Browse files
authored
Merge pull request #43898 from my-git9/patch-16849
[zh-cn] sync security.md jsonpath.md
2 parents 1dfeccf + 90f1bd8 commit 56ad8a6

File tree

2 files changed

+66
-44
lines changed

2 files changed

+66
-44
lines changed

content/zh-cn/docs/reference/issues-security/security.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,37 +31,45 @@ This page describes Kubernetes security and disclosure information.
3131
## 安全公告 {#security-announcements}
3232

3333
<!--
34-
Join the [kubernetes-security-announce](https://groups.google.com/forum/#!forum/kubernetes-security-announce) group for emails about security and major API announcements.
34+
Join the [kubernetes-security-announce](https://groups.google.com/forum/#!forum/kubernetes-security-announce)
35+
group for emails about security and major API announcements.
3536
-->
36-
加入 [kubernetes-security-announce](https://groups.google.com/forum/#!forum/kubernetes-security-announce) 组,以获取关于安全性和主要 API 公告的电子邮件。
37+
加入 [kubernetes-security-announce](https://groups.google.com/forum/#!forum/kubernetes-security-announce)
38+
组,以获取关于安全性和主要 API 公告的电子邮件。
3739

3840
<!--
3941
## Report a Vulnerability
4042
-->
4143
## 报告一个漏洞 {#report-a-vulnerability}
4244

4345
<!--
44-
We're extremely grateful for security researchers and users that report vulnerabilities to the Kubernetes Open Source Community. All reports are thoroughly investigated by a set of community volunteers.
46+
We're extremely grateful for security researchers and users that report vulnerabilities to
47+
the Kubernetes Open Source Community. All reports are thoroughly investigated by a set of community volunteers.
4548
-->
4649
我们非常感谢向 Kubernetes 开源社区报告漏洞的安全研究人员和用户。
4750
所有的报告都由社区志愿者进行彻底调查。
4851

4952
<!--
50-
To make a report, submit your vulnerability to the [Kubernetes bug bounty program](https://hackerone.com/kubernetes). This allows triage and handling of the vulnerability with standardized response times.
53+
To make a report, submit your vulnerability to the [Kubernetes bug bounty program](https://hackerone.com/kubernetes).
54+
This allows triage and handling of the vulnerability with standardized response times.
5155
-->
5256
如需报告,请将你的漏洞提交给 [Kubernetes 漏洞赏金计划](https://hackerone.com/kubernetes)
5357
这样做可以使得社区能够在标准化的响应时间内对漏洞进行分类和处理。
5458

5559
<!--
56-
You can also email the private [[email protected]](mailto:[email protected]) list with the security details and the details expected for [all Kubernetes bug reports](https://github.com/kubernetes/kubernetes/blob/master/.github/ISSUE_TEMPLATE/bug-report.yaml).
60+
You can also email the private [[email protected]](mailto:[email protected])
61+
list with the security details and the details expected for
62+
[all Kubernetes bug reports](https://github.com/kubernetes/kubernetes/blob/master/.github/ISSUE_TEMPLATE/bug-report.yaml).
5763
-->
5864
你还可以通过电子邮件向私有 [[email protected]](mailto:[email protected])
5965
列表发送电子邮件,邮件中应该包含
6066
[所有 Kubernetes 错误报告](https://github.com/kubernetes/kubernetes/blob/master/.github/ISSUE_TEMPLATE/bug-report.yaml)
6167
所需的详细信息。
6268

6369
<!--
64-
You may encrypt your email to this list using the GPG keys of the [Security Response Committee members](https://git.k8s.io/security/README.md#product-security-committee-psc). Encryption using GPG is NOT required to make a disclosure.
70+
You may encrypt your email to this list using the GPG keys of the
71+
[Security Response Committee members](https://git.k8s.io/security/README.md#product-security-committee-psc).
72+
Encryption using GPG is NOT required to make a disclosure.
6573
-->
6674
你可以使用[安全响应委员会成员](https://git.k8s.io/security/README.md#product-security-committee-psc)
6775
GPG 密钥加密你的发往邮件列表的邮件。揭示问题时不需要使用 GPG 来加密。
@@ -102,12 +110,15 @@ GPG 密钥加密你的发往邮件列表的邮件。揭示问题时不需要使
102110
## 安全漏洞响应 {#security-vulnerability-response}
103111

104112
<!--
105-
Each report is acknowledged and analyzed by Security Response Committee members within 3 working days. This will set off the [Security Release Process](https://git.k8s.io/security/security-release-process.md#disclosures).
113+
Each report is acknowledged and analyzed by Security Response Committee members within 3 working days.
114+
This will set off the [Security Release Process](https://git.k8s.io/security/security-release-process.md#disclosures).
106115
-->
107-
每个报告在 3 个工作日内由安全响应委员会成员确认和分析,这将启动[安全发布过程](https://git.k8s.io/sig-release/security-release-process-documentation/security-release-process.md#disclosures)
116+
每个报告在 3 个工作日内由安全响应委员会成员确认和分析,
117+
这将启动[安全发布过程](https://git.k8s.io/sig-release/security-release-process-documentation/security-release-process.md#disclosures)
108118

109119
<!--
110-
Any vulnerability information shared with Security Response Committee stays within Kubernetes project and will not be disseminated to other projects unless it is necessary to get the issue fixed.
120+
Any vulnerability information shared with Security Response Committee stays within Kubernetes project
121+
and will not be disseminated to other projects unless it is necessary to get the issue fixed.
111122
-->
112123
与安全响应委员会共享的任何漏洞信息都保留在 Kubernetes 项目中,除非有必要修复该问题,否则不会传播到其他项目。
113124

@@ -122,18 +133,23 @@ As the security issue moves from triage, to identified fix, to release planning
122133
## 公开披露时间 {#public-disclosure-timing}
123134

124135
<!--
125-
A public disclosure date is negotiated by the Kubernetes Security Response Committee and the bug submitter. We prefer to fully disclose the bug as soon as possible once a user mitigation is available.
136+
A public disclosure date is negotiated by the Kubernetes Security Response Committee and the bug submitter.
137+
We prefer to fully disclose the bug as soon as possible once a user mitigation is available.
126138
-->
127139
公开披露日期由 Kubernetes 安全响应委员会和 bug 提交者协商。
128140
我们倾向于在能够为用户提供缓解措施之后尽快完全披露该 bug。
129141

130142
<!--
131-
It is reasonable to delay disclosure when the bug or the fix is not yet fully understood, the solution is not well-tested, or for vendor coordination.
143+
It is reasonable to delay disclosure when the bug or the fix is not yet fully understood,
144+
the solution is not well-tested, or for vendor coordination.
132145
-->
133146
当 bug 或其修复还没有被完全理解,解决方案没有经过良好的测试,或者为了处理供应商协调问题时,延迟披露是合理的。
134147

135148
<!--
136-
The timeframe for disclosure is from immediate (especially if it's already publicly known) to a few weeks. For a vulnerability with a straightforward mitigation, we expect report date to disclosure date to be on the order of 7 days. The Kubernetes Security Response Committee holds the final say when setting a disclosure date.
149+
The timeframe for disclosure is from immediate (especially if it's already publicly known)
150+
to a few weeks. For a vulnerability with a straightforward mitigation, we expect report date
151+
to disclosure date to be on the order of 7 days. The Kubernetes Security Response Committee
152+
holds the final say when setting a disclosure date.
137153
-->
138154
信息披露的时间范围从即时(尤其是已经公开的)到几周不等。
139155
对于具有直接缓解措施的漏洞,我们希望报告日期到披露日期的间隔是 7 天。

content/zh-cn/docs/reference/kubectl/jsonpath.md

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,12 @@ Given the JSON input:
5858
"items":[
5959
{
6060
"kind":"None",
61-
"metadata":{"name":"127.0.0.1"},
61+
"metadata":{
62+
"name":"127.0.0.1",
63+
"labels":{
64+
"kubernetes.io/hostname":"127.0.0.1"
65+
}
66+
},
6267
"status":{
6368
"capacity":{"cpu":"4"},
6469
"addresses":[{"type": "LegacyHostIP", "address":"127.0.0.1"}]
@@ -90,36 +95,38 @@ Given the JSON input:
9095
```
9196

9297
<!--
93-
Function | Description | Example | Result
94-
--------------------|---------------------------|-----------------------------------------------------------------|------------------
95-
`text` | the plain text | `kind is {.kind}` | `kind is List`
96-
`@` | the current object | `{@}` | the same as input
97-
`.` or `[]` | child operator | `{.kind}`, `{['kind']}` or `{['name\.type']}` | `List`
98-
`..` | recursive descent | `{..name}` | `127.0.0.1 127.0.0.2 myself e2e`
99-
`*` | wildcard. Get all objects | `{.items[*].metadata.name}` | `[127.0.0.1 127.0.0.2]`
100-
`[start:end:step]` | subscript operator | `{.users[0].name}` | `myself`
101-
`[,]` | union operator | `{.items[*]['metadata.name', 'status.capacity']}` | `127.0.0.1 127.0.0.2 map[cpu:4] map[cpu:8]`
102-
`?()` | filter | `{.users[?(@.name=="e2e")].user.password}` | `secret`
103-
`range`, `end` | iterate list | `{range .items[*]}[{.metadata.name}, {.status.capacity}] {end}` | `[127.0.0.1, map[cpu:4]] [127.0.0.2, map[cpu:8]]`
104-
`''` | quote interpreted string | `{range .items[*]}{.metadata.name}{'\t'}{end}` | `127.0.0.1 127.0.0.2`
98+
Function | Description | Example | Result
99+
--------------------|------------------------------|-----------------------------------------------------------------|------------------
100+
`text` | the plain text | `kind is {.kind}` | `kind is List`
101+
`@` | the current object | `{@}` | the same as input
102+
`.` or `[]` | child operator | `{.kind}`, `{['kind']}` or `{['name\.type']}` | `List`
103+
`..` | recursive descent | `{..name}` | `127.0.0.1 127.0.0.2 myself e2e`
104+
`*` | wildcard. Get all objects | `{.items[*].metadata.name}` | `[127.0.0.1 127.0.0.2]`
105+
`[start:end:step]` | subscript operator | `{.users[0].name}` | `myself`
106+
`[,]` | union operator | `{.items[*]['metadata.name', 'status.capacity']}` | `127.0.0.1 127.0.0.2 map[cpu:4] map[cpu:8]`
107+
`?()` | filter | `{.users[?(@.name=="e2e")].user.password}` | `secret`
108+
`range`, `end` | iterate list | `{range .items[*]}[{.metadata.name}, {.status.capacity}] {end}` | `[127.0.0.1, map[cpu:4]] [127.0.0.2, map[cpu:8]]`
109+
`''` | quote interpreted string | `{range .items[*]}{.metadata.name}{'\t'}{end}` | `127.0.0.1 127.0.0.2`
110+
`\` | escape termination character | `{.items[0].metadata.labels.kubernetes\.io/hostname}` | `127.0.0.1`
105111
-->
106-
函数 | 描述 | 示例 | 结果
107-
--------------------|---------------------------|-----------------------------------------------------------------|------------------
108-
`text` | 纯文本 | `kind is {.kind}` | `kind is List`
109-
`@` | 当前对象 | `{@}` | 与输入相同
110-
`.` or `[]` | 子运算符 | `{.kind}`, `{['kind']}` or `{['name\.type']}` | `List`
111-
`..` | 递归下降 | `{..name}` | `127.0.0.1 127.0.0.2 myself e2e`
112-
`*` | 通配符。获取所有对象 | `{.items[*].metadata.name}` | `[127.0.0.1 127.0.0.2]`
113-
`[start:end:step]` | 下标运算符 | `{.users[0].name}` | `myself`
114-
`[,]` | 并集运算符 | `{.items[*]['metadata.name', 'status.capacity']}` | `127.0.0.1 127.0.0.2 map[cpu:4] map[cpu:8]`
115-
`?()` | 过滤 | `{.users[?(@.name=="e2e")].user.password}` | `secret`
116-
`range`, `end` | 迭代列表 | `{range .items[*]}[{.metadata.name}, {.status.capacity}] {end}` | `[127.0.0.1, map[cpu:4]] [127.0.0.2, map[cpu:8]]`
117-
`''` | 引用解释执行字符串 | `{range .items[*]}{.metadata.name}{'\t'}{end}` | `127.0.0.1 127.0.0.2`
112+
函数 | 描述 | 示例 | 结果
113+
--------------------|--------------------------|-----------------------------------------------------------------|------------------
114+
`text` | 纯文本 | `kind is {.kind}` | `kind is List`
115+
`@` | 当前对象 | `{@}` | 与输入相同
116+
`.``[]` | 子运算符 | `{.kind}``{['kind']}``{['name\.type']}` | `List`
117+
`..` | 递归下降 | `{..name}` | `127.0.0.1 127.0.0.2 myself e2e`
118+
`*` | 通配符。获取所有对象 | `{.items[*].metadata.name}` | `[127.0.0.1 127.0.0.2]`
119+
`[start:end:step]` | 下标运算符 | `{.users[0].name}` | `myself`
120+
`[,]` | 并集运算符 | `{.items[*]['metadata.name', 'status.capacity']}` | `127.0.0.1 127.0.0.2 map[cpu:4] map[cpu:8]`
121+
`?()` | 过滤 | `{.users[?(@.name=="e2e")].user.password}` | `secret`
122+
`range``end` | 迭代列表 | `{range .items[*]}[{.metadata.name}, {.status.capacity}] {end}` | `[127.0.0.1, map[cpu:4]] [127.0.0.2, map[cpu:8]]`
123+
`''` | 引用解释执行字符串 | `{range .items[*]}{.metadata.name}{'\t'}{end}` | `127.0.0.1 127.0.0.2`
124+
`\` | 转义终止符 | `{.items[0].metadata.labels.kubernetes\.io/hostname}` | `127.0.0.1`
118125

119126
<!--
120127
Examples using `kubectl` and JSONPath expressions:
121128
-->
122-
使用 `kubectl` 和 JSONPath 表达式的示例:
129+
使用 `kubectl` 和 JSONPath 表达式的示例
123130

124131
```shell
125132
kubectl get pods -o json
@@ -128,22 +135,21 @@ kubectl get pods -o=jsonpath='{.items[0]}'
128135
kubectl get pods -o=jsonpath='{.items[0].metadata.name}'
129136
kubectl get pods -o=jsonpath="{.items[*]['metadata.name', 'status.capacity']}"
130137
kubectl get pods -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.startTime}{"\n"}{end}'
138+
kubectl get pods -o=jsonpath='{.items[0].metadata.labels.kubernetes\.io/hostname}'
131139
```
132140

133-
<!--
134141
{{< note >}}
135-
On Windows, you must _double_ quote any JSONPath template that contains spaces (not single quote as shown above for bash). This in turn means that you must use a single quote or escaped double quote around any literals in the template. For example:
142+
<!--
143+
On Windows, you must _double_ quote any JSONPath template that contains spaces (not single quote as shown above for bash).
144+
This in turn means that you must use a single quote or escaped double quote around any literals in the template. For example:
136145
137146
```cmd
138147
kubectl get pods -o=jsonpath="{range .items[*]}{.metadata.name}{'\t'}{.status.startTime}{'\n'}{end}"
139148
kubectl get pods -o=jsonpath="{range .items[*]}{.metadata.name}{\"\t\"}{.status.startTime}{\"\n\"}{end}"
140149
```
141-
{{< /note >}}
142150
-->
143-
{{< note >}}
144151
在 Windows 上,对于任何包含空格的 JSONPath 模板,你必须使用双引号(不是上面 bash 所示的单引号)。
145-
反过来,这意味着你必须在模板中的所有文字周围使用单引号或转义的双引号。
146-
例如:
152+
反过来,这意味着你必须在模板中的所有文字周围使用单引号或转义的双引号。例如:
147153

148154
```cmd
149155
C:\> kubectl get pods -o=jsonpath="{range .items[*]}{.metadata.name}{'\t'}{.status.startTime}{'\n'}{end}"

0 commit comments

Comments
 (0)