arabot777 opened a new issue #603:
URL: https://github.com/apache/apisix-ingress-controller/issues/603
### Issue description
When defining the ApisixRoute, the header of the Re-specified keyAuth does
not take effect.
### Environment
apisix-ingress-controller version:
Version: 0.6.0
Git SHA: no-git-module
Go Version: go1.13.8
Building OS/Arch: linux/amd64
Running OS/Arch: linux/amd64
Kubernetes cluster version:
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.4",
GitCommit:"d360454c9bcd1634cf4cc52d1867af5491dc9c5f", GitTreeState:"clean",
BuildDate:"2020-11-12T01:09:16Z", GoVersion:"go1.15.4", Compiler:"gc",
Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.2",
GitCommit:"faecb196815e248d3ecfb03c680a4507229c2a56", GitTreeState:"clean",
BuildDate:"2021-01-13T13:20:00Z", GoVersion:"go1.15.5", Compiler:"gc",
Platform:"linux/amd64"}
### Minimal test code / Steps to reproduce the issue
1. Define ApisixConsumers
> ```
> apiVersion: apisix.apache.org/v2alpha1
> kind: ApisixConsumer
> metadata:
> name: keyvalue
> spec:
> authParameter:
> keyAuth:
> value:
> key: foo
> ```
then view it through dashboard

2. Define ApisixRoute, custom keyAuth's header information.
Reference:https://github.com/apache/apisix-ingress-controller/blob/2d12c3fdd1369e9e263342d0def6473de5c0664f/samples/deploy/crd/v1beta1/ApisixRoute.yaml#L226-L230
and
https://github.com/apache/apisix-ingress-controller/blob/2d12c3fdd1369e9e263342d0def6473de5c0664f/test/e2e/features/consumer.go#L240-L263
> ```
> apiVersion: apisix.apache.org/v2alpha1
> kind: ApisixRoute
> metadata:
> name: key-auth-route
> spec:
> http:
> - name: rule1
> match:
> hosts:
> - httpbin.org
> paths:
> - /ip
> exprs:
> - subject:
> scope: Header
> name: X-Foo
> op: Equal
> value: bar
> backend:
> serviceName: httpbin
> servicePort: 80
> authentication:
> enable: true
> type: keyAuth
> keyAuth:
> header: test
> ```
then view it through dashboard。 The value of Header is still the default
value **apikey**, not a custom value **test**

### What's the actual result? (including assertion message & call stack if
applicable)
### What's the expected result?
--
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]