ikatlinsky opened a new issue, #2003:
URL: https://github.com/apache/apisix-ingress-controller/issues/2003
### Current Behavior
When creating plugin config via ingress controller 400 error is shown -
`failed to create pluginConfig: unexpected status code 400; error message:
{"error_msg":"invalid configuration: additional properties forbidden, found
name"}`
Seems like broken by
https://github.com/apache/apisix/pull/10233/files#diff-ebd29c155b76d68bb1cd728cd626f281f81c62ddb451b345baf2ed8f81480127L504.
Maybe this bug should belong to ingress controller project, not sure.
### Expected Behavior
The plugin config should be created successfully, seems like the name should
be added to the plugin config attributes -
https://github.com/Sn0rt/apisix/blob/9b97ec3692b65c4a5296bf22aa8cfa3f90e92769/apisix/schema_def.lua#L951.
### Error Logs
```
2023-10-10T18:01:34+08:00 debug apisix/cluster.go:747 creating
resource in cluster {"cluster_name": "default", "name": "pluginConfig",
"url":
"http://apisix-gateway-admin.apisix.svc.cluster.local:9180/apisix/admin/plugin_configs/3b92ebf7",
"body":
"{\"id\":\"3b92ebf7\",\"name\":\"apisix_global-plugin\",\"desc\":\"Created by
apisix-ingress-controller, DO NOT modify it
manually\",\"labels\":{\"managed-by\":\"apisix-ingress-controller\"},\"plugins\":{}}"}
2023-10-10T18:01:34+08:00 error apisix/pluginconfig.go:139 failed
to create pluginConfig: unexpected status code 400; error message:
{"error_msg":"invalid configuration: additional properties forbidden, found
name"}
```
### Steps to Reproduce
1. Prepare plugin config crd
```
apiVersion: apisix.apache.org/v2
kind: ApisixPluginConfig
metadata:
name: global-plugin
spec:
plugins: []
```
2. Install crd in namespace with ingress controller, for example
```
k apply -f plugin.yaml
```
3. Check ingress controller logs
```
2023-10-10T18:01:34+08:00 debug apisix/cluster.go:747 creating
resource in cluster {"cluster_name": "default", "name": "pluginConfig",
"url":
"http://apisix-gateway-admin.apisix.svc.cluster.local:9180/apisix/admin/plugin_configs/3b92ebf7",
"body":
"{\"id\":\"3b92ebf7\",\"name\":\"apisix_global-plugin\",\"desc\":\"Created by
apisix-ingress-controller, DO NOT modify it
manually\",\"labels\":{\"managed-by\":\"apisix-ingress-controller\"},\"plugins\":{}}"}
2023-10-10T18:01:34+08:00 error apisix/pluginconfig.go:139 failed
to create pluginConfig: unexpected status code 400; error message:
{"error_msg":"invalid configuration: additional properties forbidden, found
name"}
```
### Environment
- APISIX version (run `apisix version`): 3.6.0
- APISIX Ingress Controller version: 1.7.0
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]