-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
sample-app: Fix port of node-server-svc (80 to 8080) #6204
base: main
Are you sure you want to change the base?
Conversation
Without this, following the instructions that don't require port forwarding (e.g. using "minikube tunnel") fails: the service is exposed on port 80, which is not what the frontend expects. After this commit the setup mimics that of the frontend service, which works both with and without port forwarding. Signed-off-by: Guzman <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: guzalv The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for knative ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
This is needed because the node-server service listens on port 8080, and the K8s ref resolver doesn't support custom ports [1], and referring to the node-server-svc service yields: http://node-server-svc.default.svc.cluster.local/insert Instead of the correct URL: http://node-server-svc.default.svc.cluster.local:8080/insert Which results in hanging connections and eventually timeouts when adding new comments that pass the trigger's filter. [1] https://github.com/knative/pkg/blob/dcf159339de2fec9dde678a04cb7a354e912d2bf/resolver/addressable_resolver.go#L227 Signed-off-by: Guzman <[email protected]>
Hi, When I reached step 6 of the sample app tutorial I noticed that the event never reached the subscriber (node-server service). If I understand correctly, this is because when the subscriber's destination is a reference to a service, the resolver assumes it listens on port 80, i.e. it doesn't consider the "port" part of the hostname. I lack experience to fully understand how this is supposed to work. Should I open an issue in pkg/ to handle this kind of situation? or, am I going in the wrong direction? Thanks! |
cc @Leo6Leo Could you recreate the problem reported here, does this fix it? |
Without this, following the instructions that don't require port forwarding (e.g. using "minikube tunnel") fails: the service is exposed on port 80, which is not what the frontend expects.
After this commit the setup mimics that of the frontend service, which works both with and without port forwarding.