Why when I modify the config-features in knative's configMap and want to enable schedulerName, an error occurs
this is the wrong message:error: configmaps "config-features" could not be patched: admission webhook "config.webhook.serving.knative.dev" denied the request: validation failed: the update modifies a key in "_example" which is probably not what you want. Instead, copy the respective setting to the top-level of the ConfigMap, directly below "data"
knative version 1.8 and kubernetes 1.26.1
Hi @aishuijiaodeyu
As the error says, you need to add your required feature key: value (kubernetes.podspec-schedulername: "enabled") pair directly under the data: section of the config map, and NOT under the _example: section .
The admission webhook checks to see if the user has confused the _example: section to be the data: section and reports errors if _example: has been changed . To indicate that your change under _example: will not be respected.
👍
Hi 你好@aishuijiaodeyu
As the error says, you need to add your required feature
key: value(kubernetes.podspec-schedulername: "enabled") pair directly under thedata:section of the config map, and NOT under the_example:section .正如错误所说,您需要直接在配置映射data:部分下添加所需的功能key: value(kubernetes.podspec-schedulername: "enabled") 对,而不是在_example:部分下添加。 The admission webhook checks to see if the user has confused the_example:section to be thedata:section and reports errors if_example:has been changed . To indicate that your change under_example:will not be respected.准入 webhook 检查用户是否将部分混淆为data:该_example:部分,并在已更改时_example:报告错误。表明您的更改_example:将不被尊重。
Thank you, I've solved it, just like you said.