god12311 opened a new issue, #10010:
URL: https://github.com/apache/apisix/issues/10010
### Description
Dear All:
I use the curl test to create upstream and route through the API, and the
dashboard can directly delete the upstream,There is a binding relationship
between upstream and route, and the business domain name can be accessed
normally.
`
curl https://xxx.net/apisix/admin/upstreams/1691811771 -H 'X-API-KEY:
xxxxxxxx' -X PUT -d @upstream.json
### cat upstream.json
{
"type": "roundrobin",
"name": "upstream-xxx",
"desc": "upstream xxxx",
"retries": 1,
"timeout": {
"connect":15,
"send":15,
"read":15
},
"scheme": "http",
"nodes": {
"xxx.xxx.svc.cluster.local": 100
}
}
curl https://xxx.net/apisix/admin/upstreams/1691811772 -H 'X-API-KEY:
xxxxxx' -X PUT -d @upstream-1.json
### cat upstream-1.json
{
"type": "roundrobin",
"name": "upstream-xxxx-1",
"desc": "upstream xxxxx-1",
"retries": 1,
"timeout": {
"connect":15,
"send":15,
"read":15
},
"scheme": "http",
"nodes": {
"xxx-1.xxx.svc.cluster.local": 100
}
}
curl https://xxxx.net/apisix/admin/routes/1691811771 -H 'X-API-KEY: xxxxx'
-X PUT -d @route.json
### cat route.json
{
"methods": [],
"status": 1,
"name": "xxxx.test.net",
"desc": "route xxxx",
"host": "xxxx.test.net",
"uri": "/*",
"plugins": {
"traffic-split": {
"rules": [
{
"weighted_upstreams": [
{
"upstream_id": 1691811772
},
{
"weight": 0
},
{
"weight": 100
}
]
}
]
}
},
"upstream_id": 1691811771
}
`
### Environment
- APISIX version (run `apisix version`): 3.2.0
- Helm APISIX Chart: apisix-1.3.1
- Operating system (run `uname -a`): 4.19.84-300.el7.x86_64
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
openresty/1.21.4.1
- etcd version, if relevant (run `curl
http://127.0.0.1:9090/v1/server_info`):3.5.9
- APISIX Dashboard version, if relevant: 3.0.0
- Helm APISIX Dashboard Chart: apisix-dashboard-0.8.1
--
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]