dagvl opened a new issue, #2013:
URL: https://github.com/apache/apisix-ingress-controller/issues/2013
### Current Behavior
given this yaml:
```
---
apiVersion: apisix.apache.org/v2
kind: ApisixPluginConfig
metadata:
name: default
namespace: namespace
spec:
plugins:
- name: real-ip
enable: false
config:
source: http_x_forwarded_for
```
when it is applied with kubectl, it is accepted:
```
❯ k apply -f ../apisix/resources/plugins.yaml
apisixpluginconfig.apisix.apache.org/default created
```
However, the ingress-controller reports an error when trying to apply it to
apisix:
```
apisix/apisix_plugin_config.go:282 sync ApisixPluginConfig failed, will
retry {"object":
{"Type":1,"Object":{"Key":"eu-north-1-dev-workflow-vimond/default","OldObject":null,"GroupVersion":"apisix.apache.org/v2"},"OldObject":null,"Tombstone":null},
"error": "1 error occurred:\n\t* unexpected status code 400; error message:
{\"error_msg\":\"invalid configuration: additional properties forbidden, found
name\"}\n\n\n"}
```
Logs from apisix:
```
10.121.59.47 - - [18/Oct/2023:22:17:44 +0000]
apisix-admin.ingress-apisix.svc.cluster.local:9180 "PUT
/apisix/admin/plugin_configs/76333208 HTTP/1.1" 400 94 0.000 "-"
"Go-http-client/1.1" - - -
"http://apisix-admin.ingress-apisix.svc.cluster.local:9180"
```
The exact same plugin block works fine when put directly in an `ApisixRoute`
### Expected Behavior
Expect the plugin_config to be created without error
### Error Logs
ingress-controller
```
apisix/apisix_plugin_config.go:282 sync ApisixPluginConfig failed, will
retry {"object":
{"Type":1,"Object":{"Key":"eu-north-1-dev-workflow-vimond/default","OldObject":null,"GroupVersion":"apisix.apache.org/v2"},"OldObject":null,"Tombstone":null},
"error": "1 error occurred:\n\t* unexpected status code 400; error message:
{\"error_msg\":\"invalid configuration: additional properties forbidden, found
name\"}\n\n\n"}
```
apisix
```
10.121.59.47 - - [18/Oct/2023:22:17:44 +0000]
apisix-admin.ingress-apisix.svc.cluster.local:9180 "PUT
/apisix/admin/plugin_configs/76333208 HTTP/1.1" 400 94 0.000 "-"
"Go-http-client/1.1" - - -
"http://apisix-admin.ingress-apisix.svc.cluster.local:9180"
```
### Steps to Reproduce
Install apisix with chart version `1.7.1`. Make sure ingress-controller is
enabled:
```
ingress-controller:
enabled: true
```
k apply -f file.yaml where file.yaml is:
```
---
apiVersion: apisix.apache.org/v2
kind: ApisixPluginConfig
metadata:
name: default
namespace: default
spec:
plugins:
- name: real-ip
enable: false
config:
source: http_x_forwarded_for
```
### Environment
- APISIX Ingress controller version (run `apisix-ingress-controller version
--long`)
```
Version: 1.7.0
Git SHA: no-git-module
Go Version: go1.20.10
Building OS/Arch: linux/aarch64
Running OS/Arch: linux/arm64
```
- Kubernetes cluster version (run `kubectl version`)
```
Server Version: version.Info{Major:"1", Minor:"26+",
GitVersion:"v1.26.9-eks-f8587cb",
GitCommit:"2e0997b730999ec918be56b8ed945394905673c5", GitTreeState:"clean",
BuildDate:"2023-09-18T22:09:26Z", GoVersion:"go1.20.8", Compiler:"gc",
Platform:"linux/amd64"}
```
- OS version if running APISIX Ingress controller in a bare-metal
environment (run `uname -a`)
```
Linux apisix-ingress-controller-dd44bfb69-hwbk4
5.10.192-183.736.amzn2.aarch64 #1 SMP Wed Sep 6 21:15:30 UTC 2023 aarch64
aarch64 aarch64 GNU/Linux
```
--
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]