Skip to content

Conversation

dprotaso
Copy link
Member

@dprotaso dprotaso commented Oct 13, 2025

  • include a proxy endpoint that routes traffic to the node-server
  • reduce frontend nextjs image size to ~300MB

I'm hoping this supplements #6204

@knative-prow knative-prow bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 13, 2025
Copy link

knative-prow bot commented Oct 13, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dprotaso

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2025
Copy link

netlify bot commented Oct 13, 2025

Deploy Preview for knative ready!

Name Link
🔨 Latest commit 638be0e
🔍 Latest deploy log https://app.netlify.com/projects/knative/deploys/68f111b83e6acf0008b98e4e
😎 Deploy Preview https://deploy-preview-6444--knative.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@knative-prow knative-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 13, 2025
@dprotaso dprotaso force-pushed the drop-port-forwarding branch from 52b1140 to fe2efe6 Compare October 14, 2025 14:44
@dprotaso dprotaso marked this pull request as ready for review October 14, 2025 14:44
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 14, 2025
@knative-prow knative-prow bot requested review from nainaz and skonto October 14, 2025 14:44
@dprotaso dprotaso closed this Oct 14, 2025
@dprotaso dprotaso reopened this Oct 14, 2025
@dprotaso
Copy link
Member Author

re-opened so we get the github rate limit fix in main

Copy link
Member

@Leo6Leo Leo6Leo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't finished it yet. Submitting for the first round of review.

echo "✅ The node-server is now installed. Please visit http://localhost:8080 to view the bookstore node-server."
echo "⚠️ If you cannot access it, please run 'kubectl port-forward svc/node-server-svc 8080:80' to forward the port to your localhost."
echo "✅ The node-server is now installed. Please visit http://${NODE_SERVER_IP} to view the bookstore node-server."
read -p '🛑 Can you see "Hello World!"? If yes, press ENTER to continue...'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we added the reverse proxy, and only using the internal cluster IP for the backend server, user won't be able to directly access the node server backend. Therefore this message need to get updated. Instead, user can visit the bookstore front end page, and see if the status badge has turned green and show "Connected to node server"

CleanShot 2025-10-15 at 00 01 21@2x

Copy link
Member Author

@dprotaso dprotaso Oct 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://${NODE_SERVER_IP}

This works since the Kubernetes Service for the node server is of type=LoadBalancer

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CleanShot 2025-10-16 at 00 00 39@2x

I am using minikube tunnle, and this is what I saw when running the solution.sh script, which is the same as the frontend IP
CleanShot 2025-10-16 at 00 01 42@2x

echo ""
echo "✅ The node-server is now installed. Please visit http://localhost:8080 to view the bookstore node-server."
echo "⚠️ If you cannot access it, please run 'kubectl port-forward svc/node-server-svc 8080:80' to forward the port to your localhost."
echo "✅ The node-server is now installed. Please visit http://${NODE_SERVER_IP} to view the bookstore node-server."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The next comment applies to here as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works since the Kubernetes Service for the node server is of type=LoadBalancer

Copy link
Member

@Leo6Leo Leo6Leo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have finished most of the review, beside these comments, the rest looks good. I will be manually follow and run through the tutorial later to make sure content is accurate. Thanks @dprotaso !

echo "✅ The node-server is now installed. Please visit http://localhost:8080 to view the bookstore node-server."
echo "⚠️ If you cannot access it, please run 'kubectl port-forward svc/node-server-svc 8080:80' to forward the port to your localhost."
echo "✅ The node-server is now installed. Please visit http://${NODE_SERVER_IP} to view the bookstore node-server."
read -p '🛑 Can you see "Hello World!"? If yes, press ENTER to continue...'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CleanShot 2025-10-16 at 00 00 39@2x

I am using minikube tunnle, and this is what I saw when running the solution.sh script, which is the same as the frontend IP
CleanShot 2025-10-16 at 00 01 42@2x


# Install Camel-K
echo ""
echo "📦 Installing Camel-K..."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like $REGISTRY_PORT value cannot be empty here. If it is, the script will exit with error.

error: error parsing STDIN: error converting YAML to JSON: yaml: line 9: mapping values are not allowed in this context

I haven't used the local registry yet, so couldn't comment on this too much. Originally in the old version of tutorial, the remote registry address is requested.

https://github.com/dprotaso/knative-docs/blob/1ec7a2b8807bd23fcf3c217e0adc5634b5e2d0bf/code-samples/eventing/bookstore-sample-app/solution/solution.sh#L63-L75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants