LabelSelector
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。所表达的需求最终要按逻辑与的关系组合。
This page is automatically generated.
If you plan to report an issue with this page, mention that the page is auto-generated in your issue description. The fix may need to happen elsewhere in the Kubernetes project.