Skip to content

Commit

Permalink
change gRPC CRs
Browse files Browse the repository at this point in the history
  • Loading branch information
DDH13 committed Mar 9, 2024
1 parent 1092bcf commit fd15910
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 31 deletions.
22 changes: 11 additions & 11 deletions test/integration/integration/tests/resources/base/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ spec:
apiVersion: v1
kind: Service
metadata:
name: grpc-demo-app
name: dineth-grpc-demo-server
namespace: gateway-integration-test-infra
spec:
selector:
app: grpc-demo-app
app: dineth-grpc-demo-server
ports:
- protocol: TCP
port: 6565
Expand All @@ -127,23 +127,23 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: grpc-demo-app
name: dineth-grpc-demo-server
namespace: gateway-integration-test-infra
labels:
app: grpc-demo-app
app: dineth-grpc-demo-server
spec:
replicas: 1
selector:
matchLabels:
app: grpc-demo-app
app: dineth-grpc-demo-server
template:
metadata:
labels:
app: grpc-demo-app
app: dineth-grpc-demo-server
spec:
containers:
- name: grpc-demo-app
image: grpc-demo-app:latest
- name: dineth-grpc-demo-server
image: dineth-grpc-demo-server:latest
imagePullPolicy: IfNotPresent
env:
- name: POD_NAME
Expand All @@ -156,10 +156,10 @@ spec:
fieldPath: metadata.namespace
resources:
requests:
cpu: "100m" # Adjust as needed
memory: "100Mi" # Adjust as needed
cpu: "100m"
memory: "100Mi"
ports:
- containerPort: 6565 # Ensuring the container exposes port 6565 for gRPC traffic
- containerPort: 6565

---
apiVersion: v1
Expand Down
34 changes: 14 additions & 20 deletions test/integration/integration/tests/resources/tests/grpc-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
basePath: /dineth-grpc-api/v1
isDefaultVersion: true
production:
- httpRouteRefs:
- routeRefs:
- dineth-grpc-route
organization: wso2-org

Expand All @@ -58,45 +58,39 @@ spec:
rules:
- matches:
- method:
service: StudentService
service: student.StudentService
method: GetStudent
backendRefs:
- name: dineth-grpc-backend
kind: Backend
port: 6565
- matches:
- method:
service: StudentService
method: SendStudent
service: student.StudentService
method: SendStudentStream
backendRefs:
- name: dineth-grpc-backend
kind: Backend
port: 6565
- matches:
- method:
service: TeacherService
method: GetTeacher
service: student.StudentService
method: GetStudentStream
backendRefs:
- name: dineth-grpc-backend
kind: Backend
port: 6565
- matches:
- method:
service: student.StudentService
method: SendAndGetStudentStream
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:
Expand Down

0 comments on commit fd15910

Please sign in to comment.