feat: Support dubbo group for http2rpc (#404)

This commit is contained in:
Hinsteny Hisoka
2023-06-29 10:55:34 +08:00
committed by GitHub
parent c32e1ab69b
commit 736eea6cf9
9 changed files with 192 additions and 120 deletions

View File

@@ -323,7 +323,7 @@ apiVersion: v1
kind: Pod
metadata:
name: nacos-standlone-rc3
namespace: higress-system
namespace: higress-conformance-app-backend
labels:
name: nacos-standlone-rc3
spec:
@@ -337,7 +337,7 @@ apiVersion: v1
kind: Service
metadata:
name: nacos-standlone-rc3-service
namespace: higress-system
namespace: higress-conformance-app-backend
spec:
selector:
name: nacos-standlone-rc3
@@ -350,10 +350,15 @@ apiVersion: v1
kind: Pod
metadata:
name: dubbo-demo-provider
namespace: higress-system
namespace: higress-conformance-app-backend
spec:
containers:
- name: dubbo-demo-provider
image: registry.cn-hangzhou.aliyuncs.com/hinsteny/dubbo-provider-demo:0.0.1
image: registry.cn-hangzhou.aliyuncs.com/hinsteny/dubbo-provider-demo:0.0.2
env:
- name: NACOS_K8S_NAMESPACE
value: higress-conformance-app-backend
- name: DUBBO_GROUP
value: dev
ports:
- containerPort: 20880

View File

@@ -35,7 +35,7 @@ var HTTPRouteHttp2Rpc = suite.ConformanceTest{
Request: http.AssertionRequest{
ActualRequest: http.Request{
Host: "foo.com",
Path: "/sayhello?name=hisoka",
Path: "/dubbo/hello?name=higress",
Method: "GET",
},
},

View File

@@ -19,18 +19,18 @@ metadata:
namespace: higress-system
spec:
dubbo:
service: "com.dubbo.demo.api.DemoService"
version: "1.0.0"
service: com.dubbo.demo.api.DemoService
version: 1.0.0
group: dev
methods:
- serviceMethod: "sayHello"
- serviceMethod: sayHello
headersAttach: "*"
httpMethods:
- "GET"
- “POST”
httpPath: "/sayhello"
- GET
httpPath: "/dubbo/hello"
params:
- paramKey: "name"
paramSource: "QUERY"
- paramKey: name
paramSource: QUERY
paramType: "java.lang.String"
---
apiVersion: networking.higress.io/v1
@@ -40,7 +40,7 @@ metadata:
namespace: higress-system
spec:
registries:
- domain: nacos-standlone-rc3-service
- domain: nacos-standlone-rc3-service.higress-conformance-app-backend
nacosGroups:
- DEFAULT_GROUP
name: nacos-service-resource
@@ -51,7 +51,7 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
higress.io/destination: providers:com.dubbo.demo.api.DemoService:1.0.0:.DEFAULT-GROUP.public.nacos
higress.io/destination: providers:com.dubbo.demo.api.DemoService:1.0.0:dev.DEFAULT-GROUP.public.nacos
higress.io/rpc-destination-name: httproute-http2rpc-demo
name: httproute-http2rpc-demo-ingress
namespace: higress-system
@@ -62,7 +62,7 @@ spec:
http:
paths:
- pathType: Prefix
path: /
path: /dubbo
backend:
resource:
apiGroup: networking.higress.io

View File

@@ -159,6 +159,8 @@ func (suite *ConformanceTestSuite) Setup(t *testing.T) {
"higress-conformance-infra",
"higress-conformance-app-backend",
"higress-conformance-web-backend",
"nacos-standlone-rc3",
"dubbo-demo-provider",
}
kubernetes.NamespacesMustBeAccepted(t, suite.Client, suite.TimeoutConfig, namespaces)
}