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

Importing this on kubernetes #10

Open
namanjain98 opened this issue Apr 25, 2024 · 18 comments
Open

Importing this on kubernetes #10

namanjain98 opened this issue Apr 25, 2024 · 18 comments

Comments

@namanjain98
Copy link

i want to deploy pubnet on kubernetes
i have created certain deployment and svc
but somehow registration is not getting enabled
Screenshot 2024-04-25 at 2 50 09 PM

@namanjain98
Copy link
Author

i have disabled the Cors from the code
image

still getting this error

image

@ricardoboss
Copy link
Owner

Hi, thanks for taking the time to file an issue!

CORS is nothing you can disable from the API-side. It's a browser feature, so every time you want to access an API from a browser (i.e. JS/WASM), you will need to configure CORS.

You can enable registrations in the appsettings.json by setting OpenRegistrations to true, like here:

"OpenRegistration": true

@namanjain98
Copy link
Author

namanjain98 commented Apr 25, 2024

Hi @ricardoboss

This setting is already enabled
And CORS is already configured

The progress is the registration page is now visible but when filling the registration form and submitting it it js giving http 405 error on the post method what can be done on that case

@ricardoboss
Copy link
Owner

That sounds like a bug in the frontend... Do you have a screenshot of the network tab for that request for me?

Can you also give me a repo and/or steps to reproduce this?

@namanjain98
Copy link
Author

attaching the SS for this issue
image

@ricardoboss
Copy link
Owner

Ok, and if you switch to the "Network" tab in the dev tools and select the latest failed request?

@namanjain98
Copy link
Author

sure attaching the SS

image

@ricardoboss
Copy link
Owner

So you're hosting this via kubernetes? Are you using a reverse proxy? Which one? How is it configured?

@namanjain98
Copy link
Author

description of the error

image image

@namanjain98
Copy link
Author

We have istio deployed in out kubernetes cluster which acts as reverse proxy
and our services are present in mesh
also the endpoints are exposed using virtualservice from kubernetes cluster

@namanjain98
Copy link
Author

can you provide any helm chart for pubnet using which we can deploy it directly on our cluster

@ricardoboss
Copy link
Owner

Sorry, I have no experience with istio, kubernetes or helm charts... From my end it looks like your cluster is blocking every request that isn't GET. Can you try reproducing the issue with the docker images or just run it locally to check?

@namanjain98
Copy link
Author

namanjain98 commented Apr 25, 2024

@ricardoboss locally it is running fine
i want it specifically for kubernetes

at localhost request flow is working fine

@ricardoboss
Copy link
Owner

Sorry, I'm trying but as I said, I have no experience whatsoever with kubernetes.

Which server is sending the response? Is it Kestrel or something else?

@namanjain98
Copy link
Author

@ricardoboss it is not kestrel server
the applications are deployed on kubernetes deployments as frontend, backend , workder as deployment and services with postgres, seq is also deployed as kubernetes deployments

@ricardoboss
Copy link
Owner

Thanks for sharing. Can you provide more info about your istio setup? I'm curious about any rules affecting HTTP methods or security features.

Also, check Istio logs for errors or warnings.

Could you try disabling istio or using another reverse proxy temporarily to see if the issue persists?

@namanjain98
Copy link
Author

hi @ricardoboss

replicated the same scneario in minikube cluster in local
context:

  • No istio gateway is present in this
  • a basic setup with deployments ad services is running

after doing a port forward on localhost for frontend service it is giving the same error on registration

attachoing the screenshots for reference
image
image

@ricardoboss
Copy link
Owner

Hmm... What are the values for the CORS headers? Specifically, the Access-Control-Allow-Methods header?

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

No branches or pull requests

2 participants