serving icon indicating copy to clipboard operation
serving copied to clipboard

Why when I modify the config-features in knative's configMap and want to enable schedulerName, an error occurs

Open SleepyKFish opened this issue 3 years ago • 3 comments

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

SleepyKFish avatar Jul 12 '23 08:07 SleepyKFish

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.

naveenrajm7 avatar Jul 12 '23 19:07 naveenrajm7

👍

ReToCode avatar Jul 17 '23 11:07 ReToCode

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 .正如错误所说,您需要直接在配置映射 data: 部分下添加所需的功能 key: value ( kubernetes.podspec-schedulername: "enabled" ) 对,而不是在 _example: 部分下添加。 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.准入 webhook 检查用户是否将部分混淆为 data: 该 _example: 部分,并在已更改时 _example: 报告错误。表明您的更改 _example: 将不被尊重。

Thank you, I've solved it, just like you said.

SleepyKFish avatar Jul 17 '23 12:07 SleepyKFish