kubernetes - 变异准入 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.
最后一切都依赖于标签。
你肯定看到了这些例子
推荐阅读
- laravel - 将数据从刀片模板传递到 vue 时出现 Vue 警告
- javascript - 使用 Express (Node.js) 在 React 应用程序中找不到 index.js
- javascript - 使用 day 对象检查数组
- charts - 添加新节点后无法使 Grahviz 的边缘笔直并正确渲染
- netsuite - Netsuite 在客户记录中多次插入地址
- java - 如何在不使用模型的情况下将 JCheckBox 列添加到我的 JTable?
- python - 模型提供了很好的训练和测试准确性,但在进行预测时效果不佳
- selenium - 将最新的 Microsoft Edge (Win10) 浏览器添加到 Selenium Grid
- javascript - 在 POST 期间如何解决此 422 错误?
- reactjs - 无法使用 npx create-react-app 创建新的反应应用程序