Skip to content

Commit

Permalink
add grpc CRs for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
DDH13 committed Mar 8, 2024
1 parent e136c6b commit ed85136
Showing 1 changed file with 130 additions and 0 deletions.
130 changes: 130 additions & 0 deletions test/integration/integration/tests/resources/tests/grpc-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved.
#
# WSO2 LLC. 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: dp.wso2.com/v1alpha2
kind: API
metadata:
name: dineth-grpc-api
namespace: gateway-integration-test-infra
labels:
api-name: "dineth-grpc-api"
api-version: "v1"
organization: "7505d64a54e061b7acd54ccd58b49dc43500b635"
managed-by: "apk"
spec:
apiName: Dineth GRPC API
apiType: GRPC
apiVersion: v1
basePath: /dineth-grpc-api/v1
isDefaultVersion: true
production:
- httpRouteRefs:
- dineth-grpc-route
organization: apk-org

---

apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GRPCRoute
metadata:
name: dineth-grpc-route
namespace: gateway-integration-test-infra
labels:
api-name: "dineth-grpc-api"
api-version: "v1"
organization: "7505d64a54e061b7acd54ccd58b49dc43500b635"
managed-by: "apk"
spec:
hostnames:
- grpc.test.gw.wso2.com
parentRefs:
- group: "gateway.networking.k8s.io"
kind: "Gateway"
name: "default"
sectionName: "httpslistener"
rules:
- matches:
- method:
service: StudentService
method: GetStudent
backendRefs:
- name: dineth-grpc-backend
kind: Backend
port: 6565
- matches:
- method:
service: StudentService
method: SendStudent
backendRefs:
- name: dineth-grpc-backend
kind: Backend
port: 6565
- matches:
- method:
service: TeacherService
method: GetTeacher
backendRefs:
- name: dineth-grpc-backend
kind: Backend
port: 6565

---

#apiVersion: "dp.wso2.com/v1alpha1"
#kind: "Authentication"
#metadata:
# name: dineth-grpc-api-auth
# namespace: gateway-integration-test-infra
# spec:
# default:
# authTypes:
# disabled: true
# targetRef:
# group: "gateway.networking.k8s.io"
# kind: Resource
# namespace: gateway-integration-test-infra
# name: dineth-grpc-api
apiVersion: dp.wso2.com/v1alpha1
kind: Authentication
metadata:
name: disable-grpc-api-security
namespace: gateway-integration-test-infra
spec:
override:
disabled: true
targetRef:
group: gateway.networking.k8s.io
kind: API
namespace: gateway-integration-test-infra
name: dineth-grpc-api
---

apiVersion: dp.wso2.com/v1alpha1
kind: Backend
metadata:
name: dineth-grpc-backend
namespace: gateway-integration-test-infra
labels:
api-name: "dineth-grpc-api"
api-version: "v1"
organization: "7505d64a54e061b7acd54ccd58b49dc43500b635"
managed-by: "apk"
spec:
services:
- host: grpc-backend
port: 6565
basePath: ""
protocol: https

0 comments on commit ed85136

Please sign in to comment.