This is the first step to rename 'zh' to 'zh-cn'. There are several reasons why we rename the language name.
- The upstream docsy theme changed the language name, leading to many warnings during site build;
The side-effect is that the i18n strings are no longer working.
- We believe renaming the language is the right thing to do, because this move can make room for other variants of Chinese language, such as 'zh-tw', 'zh-sg' etc.
There would be several follow-ups to this PR, such as fixing the intra-site links, adding redirects etc.
We will lock up changes to zh/zh-cn pages for the moment, until this one gets in.
This PR is based on commit cdad0a7342.
3.6 KiB
api_metadata, content_type, description, title, weight, auto_generated
| api_metadata | content_type | description | title | weight | auto_generated | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
api_reference | 标签选择器是对一组资源的标签查询。 | LabelSelector | 2 | true |
import "k8s.io/apimachinery/pkg/apis/meta/v1"
标签选择器是对一组资源的标签查询。
matchLabels 和 matchExpressions 的结果按逻辑与的关系组合。
一个 empty 标签选择器匹配所有对象。一个 null 标签选择器不匹配任何对象。
-
matchExpressions ([]LabelSelectorRequirement)
matchExpressions是标签选择器要求的列表,这些要求的结果按逻辑与的关系来计算。-
matchExpressions.key (string), 必填
补丁策略:按照键
key合并key是选择器应用的标签键。
-
matchExpressions.operator (string),必填
operator表示键与一组值的关系。有效的运算符包括In、NotIn、Exists和DoesNotExist。
-
matchExpressions.values ([]string)
values是一个字符串值数组。如果运算符为In或NotIn,则values数组必须为非空。如果运算符是
Exists或DoesNotExist,则values数组必须为空。该数组在策略性合并补丁(Strategic Merge Patch)期间被替换。
-
-
matchLabels (map[string]string)
matchLabels是 {key,value} 键值对的映射。matchLabels映射中的单个 {key,value} 键值对相当于matchExpressions的一个元素,其键字段为key,运算符为In,values数组仅包含value。所表达的需求最终要按逻辑与的关系组合。