Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: when multiple http2Rpc config constructHttp2RpcEnvoyFilter (… #935

Merged
merged 3 commits into from May 14, 2024

Conversation

hanxiantao
Copy link
Contributor

@hanxiantao hanxiantao commented May 12, 2024

Ⅰ. Describe what this PR did

修复两个Http2Rpc转换EnvoyFilter有两个envoy.filters.http.http_dubbo_transcoder的部分的问题

Ⅱ. Does this pull request fix one issue?

Http2Rpc配置两个Http2Rpc,路由转发失败 #926

fixes #926

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

两个Ingress和Http2Rpc的情况
image
只有一个account Ingress和Http2Rpc的情况
image
相关配置:

kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
  name: account-higress
  namespace: higress-system
  labels:
    higress.io/resource-definer: higress
  annotations:
    higress.io/destination: >-
      providers:com.alibaba.edas.boot.AccountService:1.0.0:DUBBO.DEFAULT-GROUP.public.nacos
    higress.io/ignore-path-case: 'false'
    higress.io/rpc-destination-name: account
spec:
  ingressClassName: higress
  rules:
    - http:
        paths:
          - path: /account
            pathType: Prefix
            backend:
              resource:
                apiGroup: networking.higress.io
                kind: McpBridge
                name: default
status:
  loadBalancer: {}
---
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
  name: echo-higress
  namespace: higress-system
  labels:
    higress.io/resource-definer: higress
  annotations:
    higress.io/destination: >-
      providers:com.alibaba.edas.boot.EchoService:1.0.0:DUBBO.DEFAULT-GROUP.public.nacos
    higress.io/ignore-path-case: 'false'
    higress.io/rpc-destination-name: echo
spec:
  ingressClassName: higress
  rules:
    - http:
        paths:
          - path: /echo
            pathType: Prefix
            backend:
              resource:
                apiGroup: networking.higress.io
                kind: McpBridge
                name: default
status:
  loadBalancer: {}
---
apiVersion: networking.higress.io/v1
kind: Http2Rpc
metadata:
  name: echo
  namespace: higress-system
spec:
  dubbo:
    group: DUBBO
    methods:
      - httpMethods:
          - GET
        httpPath: /echo/echo
        params:
          - paramKey: p
            paramSource: QUERY
            paramType: java.lang.String
        serviceMethod: echo
    service: com.alibaba.edas.boot.EchoService
    version: 1.0.0
---
apiVersion: networking.higress.io/v1
kind: Http2Rpc
metadata:
  name: account
  namespace: higress-system
spec:
  dubbo:
    group: DUBBO
    methods:
      - httpMethods:
          - GET
        httpPath: /account/name
        params:
          - paramKey: p
            paramSource: QUERY
            paramType: java.lang.String
        serviceMethod: name
    service: com.alibaba.edas.boot.AccountService
    version: 1.0.0

Ⅴ. Special notes for reviews

@hanxiantao hanxiantao reopened this May 12, 2024
@hanxiantao hanxiantao changed the title fix: fix when multiple http2Rpc config constructHttp2RpcEnvoyFilter (… fix: when multiple http2Rpc config constructHttp2RpcEnvoyFilter (… May 12, 2024
Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@johnlanni johnlanni merged commit 8043780 into alibaba:main May 14, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Http2Rpc配置两个Http2Rpc,路由转发失败
2 participants