Skip to content

Compatibility issue: unable to create plugin config with APISIX v3.6 #2003

Description

@ikatlinsky

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: []
  1. Install crd in namespace with ingress controller, for example
k apply -f plugin.yaml
  1. 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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions