# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # --- apiVersion: gateway.networking.k8s.io/v1 kind: HTTPRoute metadata: name: helloworld-http-route namespace: default spec: parentRefs: - name: pixiu namespace: default sectionName: http rules: - matches: - path: type: PathPrefix value: /greet.GreetService backendRefs: - name: dubbo-go-server namespace: helloworld port: 20000 weight: 100 --- apiVersion: pixiu.apache.org/v1alpha1 kind: PixiuClusterPolicy metadata: name: helloworld-cluster namespace: default spec: targetRef: group: gateway.networking.k8s.io kind: Gateway name: pixiu clusterRef: - name: helloworld-dubbo-go-server type: static loadBalancerPolicy: "lb" endpoints: - address: dubbo-go-server.helloworld.svc.cluster.local port: 20000 --- apiVersion: pixiu.apache.org/v1alpha1 kind: PixiuFilterPolicy metadata: name: helloworld-http-filter namespace: default spec: targetRef: group: gateway.networking.k8s.io kind: Gateway name: pixiu listenersRef: - name: http filterChains: type: dgp.filter.httpconnectionmanager config: routeConfig: routes: - match: prefix: "/greet.GreetService" methods: [] route: cluster: "helloworld-dubbo-go-server" cluster_not_found_response_code: 505 - match: path: "/greet.GreetService/Greet" methods: [] route: cluster: "helloworld-dubbo-go-server" cluster_not_found_response_code: 505 httpFilters: - name: dgp.filter.http.httpproxy config: timeoutConfig: connectTimeout: 5s requestTimeout: 5s