pioneer-hash opened a new issue #399:
URL: https://github.com/apache/apisix-ingress-controller/issues/399
### Issue description
In a grayscale scenario, the grayscale upstream service and the production
upstream service belong to different namespaces when switching
environments.Routing configuration based on INGRESS-Controeller is now
cumbersome: only one namespace can be specified in each route configuration
file and that namespace must be in the same namespace as the service below. Can
the namespace configuration be placed in each route for greater flexibility
My needs are as follows:
Now this is all for production time configuration
```yaml
apiVersion: apisix.apache.org/v2alpha1
kind: ApisixRoute
metadata:
name: test-cookie
namespace: **prod-namespace**
spec:
http:
- name: rule1
priority: 1
match:
paths:
- /*
backends:
- serviceName: web3
servicePort: 81
weight: 70
- serviceName: web2
servicePort: 81
weight: 30
- name: rule2
priority: 0
match:
paths:
- /*
exprs:
- subject:
scope: Cookie
name: name
op: Equal
value: zhangsan
- subject:
scope: Header
name: name
op: NotEqual
value: lisi
backend:
serviceName: web2
servicePort: 81
```
But next time I need to switch the upstream of Routed rule2 ,and r Routed
rule2 current upstream service is in gray-namespace.
For me, it's a little bit of a hassle I need to configure two YAMLs
one
``` yaml
apiVersion: apisix.apache.org/v2alpha1
kind: ApisixRoute
metadata:
name: test-cookie
namespace: gray-namespace
spec:
http:
- name: rule1
priority: 1
match:
paths:
- /*
backends:
- serviceName: web3
servicePort: 81
weight: 70
- serviceName: web2
servicePort: 81
weight: 30
```
another
```yaml
apiVersion: apisix.apache.org/v2alpha1
kind: ApisixRoute
metadata:
name: test-cookie-111
namespace: **prod-namespace**
spec:
http:
- name: rule2
priority: 0
match:
paths:
- /*
exprs:
- subject:
scope: Cookie
name: name
op: Equal
value: zhangsan
- subject:
scope: Header
name: name
op: NotEqual
value: lisi
backend:
serviceName: web2
servicePort: 81
```
### Environment
* your apisix-ingress-controller version (output of
`apisix-ingress-controller version --long`);
* your Kubernetes cluster version (output of `kubectl version`);
* if you run apisix-ingress-controller in Bare-metal environment, also show
your OS version (`uname -a`).
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]