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

KUBE-503: adjust Github workflows, adjust for latest Proto definitions and add e2e test #3

Merged
merged 9 commits into from
Sep 3, 2024

Conversation

Trojan295
Copy link
Contributor

@Trojan295 Trojan295 commented Aug 28, 2024

I used the following resources on Tilt cluster to expose a gRPC server for testing:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    nginx.ingress.kubernetes.io/backend-protocol: GRPC
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/auth-response-headers: Grpc-Metadata-user-token, user-token
    nginx.ingress.kubernetes.io/auth-url: http://gatekeeper.console.svc.cluster.local:8080/v1/strict
  generation: 1
  name: public-cloud-proxy-grpc
  namespace: default
spec:
  ingressClassName: internal
  rules:
  - host: grpc-damianc.localenv.cast.ai
    http:
      paths:
      - backend:
          service:
            name: cloud-proxy
            port:
              name: grpc
        path: /gcpproxy.CloudProxyAPI/StreamCloudProxy
        pathType: ImplementationSpecific
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: cloud-proxy
  name: cloud-proxy
  namespace: default
spec:
  ports:
  - name: "grpc"
    port: 50051
    protocol: TCP
    targetPort: 50051
  selector:
    app: cloud-proxy
  type: ClusterIP

Then created a deployment cloud-proxy and used Telepresence to intercept it and run the gRPC server locally.
https://www.getambassador.io/docs/telepresence-oss/latest/howtos/intercepts

telepresence intercept cloud-proxy -p 50051
❯ go run ./e2e
[CLOUD-PROXY-E2E] 2024/09/03 15:12:00 starting response returning loop
[CLOUD-PROXY-E2E] 2024/09/03 15:12:09 Received a proxy connection from client
[CLOUD-PROXY-E2E] 2024/09/03 15:12:09 Starting response receiver
[CLOUD-PROXY-E2E] 2024/09/03 15:12:09 Starting request sender
[CLOUD-PROXY-E2E] 2024/09/03 15:12:09 Sending request to cluster proxy client
[CLOUD-PROXY-E2E] 2024/09/03 15:12:09 Sending request to cluster proxy client
[CLOUD-PROXY-E2E] 2024/09/03 15:12:09 Sending request to cluster proxy client
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 Got a response from client: d50a51d5-0e57-47dc-b2d7-eeb297e36a88, 200
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 Sent a response back to caller
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 Received a response back from dispatcher d50a51d5-0e57-47dc-b2d7-eeb297e36a88
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 Got a response from client: 1ff9f13a-b48c-47ac-9ffe-1193378175a3, 200
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 Sent a response back to caller
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 Received a response back from dispatcher 1ff9f13a-b48c-47ac-9ffe-1193378175a3
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 Got a response from client: b21666ee-9771-41f1-a7d1-82c6a8dc2eed, 200
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 Sent a response back to caller
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 Received a response back from dispatcher b21666ee-9771-41f1-a7d1-82c6a8dc2eed
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 stream closed, stopping sending responses
[CLOUD-PROXY-E2E] 2024/09/03 15:12:10 TEST PASSED: basic test

@Trojan295 Trojan295 changed the title WIP: add e2e tests skeleton add e2e tests skeleton Aug 30, 2024
@Trojan295 Trojan295 changed the title add e2e tests skeleton KUBE-503: add e2e tests skeleton Aug 30, 2024
Makefile Outdated Show resolved Hide resolved
@Trojan295 Trojan295 changed the title KUBE-503: add e2e tests skeleton KUBE-503: add Terraform module for deploying castai-cloud-proxy Sep 3, 2024
@Trojan295 Trojan295 changed the title KUBE-503: add Terraform module for deploying castai-cloud-proxy KUBE-503: adjust Github workflows, adjust for latest Proto definitions and add e2e test Sep 3, 2024
@Trojan295 Trojan295 merged commit 4b1cab9 into main Sep 3, 2024
1 check 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.

2 participants