变异接纳webhook静态名称空间选择器

问题描述

有人知道是否有一种基于名称空间名称而不是标签选择器定义静态选择器的方法吗?原因是某些名称空间是由操作员创建的,我对标签没有任何控制。

谢谢 埃西

解决方法

似乎没有,从未听说过,从未发现过类似的东西。

根据MutatingWebhookConfiguration docs属性namespaceSelector的类型LabelSelector [meta/v1]支持

.matchExpressions
matchExpressions is a list of label selector requirements. The requirements are ANDed.

.matchLabels
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions,whose key field is "key",the operator is "In",and the values array contains only "value". The requirements are ANDed.

最后,一切都取决于labels

确定您看到了these examples