Skip to content

Conversation

Flying-Tom
Copy link
Contributor

No description provided.

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign lizhencheng9527 for approval. For more information see the Kubernetes Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

Summary of Changes

Hello @Flying-Tom, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request adds a new, detailed guide to the documentation, focusing on how to effectively configure Istio Service Entry and VirtualService. The guide provides clear instructions and examples for enabling services within the mesh to access and route traffic to both simulated and real external services, thereby expanding the capabilities of traffic management and external connectivity for users.

Highlights

  • New Documentation Guide: Introduces a new guide on configuring Istio Service Entry and routing rules.
  • Practical Examples: Provides step-by-step instructions for setting up a sample environment with Httpbin and Sleep applications, detailing the creation of ServiceEntry and VirtualService resources.
  • Testing and Understanding: Includes practical examples for testing the configured Service Entry and understanding its behavior, along with advanced use cases like configuring access to real external services.
  • Localization: Adds a Chinese localized version of the Service Entry guide, ensuring broader accessibility.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

netlify bot commented Sep 20, 2025

Deploy Preview for kmesh-net ready!

Name Link
🔨 Latest commit 82819b8
🔍 Latest deploy log https://app.netlify.com/projects/kmesh-net/deploys/68d5258224f4bc0008dbfd25
😎 Deploy Preview https://deploy-preview-240--kmesh-net.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.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new guide on using Istio's Service Entry with Kmesh, along with a Chinese translation. The guide is well-structured and provides clear, step-by-step instructions. My review includes suggestions to improve the guide's accuracy and robustness by updating to the recommended Istio API version, making Kubernetes commands more explicit, and clarifying the configuration for ServiceEntry resources.


```bash
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3

Choose a reason for hiding this comment

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

medium

The Istio API version networking.istio.io/v1alpha3 is outdated. It is recommended to use the stable v1beta1 version in new documentation, as v1alpha3 APIs are deprecated and scheduled for removal in future Istio releases.

Suggested change
apiVersion: networking.istio.io/v1alpha3
apiVersion: networking.istio.io/v1beta1

- 240.240.0.1
resolution: DNS
---
apiVersion: networking.istio.io/v1alpha3

Choose a reason for hiding this comment

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

medium

The Istio API version networking.istio.io/v1alpha3 is outdated. It is recommended to use the stable v1beta1 version in new documentation, as v1alpha3 APIs are deprecated and scheduled for removal in future Istio releases.

Suggested change
apiVersion: networking.istio.io/v1alpha3
apiVersion: networking.istio.io/v1beta1


```bash
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3

Choose a reason for hiding this comment

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

medium

The Istio API version networking.istio.io/v1alpha3 is outdated. It is recommended to use the stable v1beta1 version in new documentation, as v1alpha3 APIs are deprecated and scheduled for removal in future Istio releases.

Suggested change
apiVersion: networking.istio.io/v1alpha3
apiVersion: networking.istio.io/v1beta1

Comment on lines +223 to +226
kubectl delete serviceentry external-fake-svc
kubectl delete virtualservice fake-service-route
kubectl delete serviceentry external-httpbin

Choose a reason for hiding this comment

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

medium

For clarity and to avoid potential errors if the user's kubectl context is not set to the default namespace, it is good practice to explicitly specify the namespace with the -n flag in kubectl commands.

Suggested change
kubectl delete serviceentry external-fake-svc
kubectl delete virtualservice fake-service-route
kubectl delete serviceentry external-httpbin
kubectl delete serviceentry external-fake-svc -n default
kubectl delete virtualservice fake-service-route -n default
kubectl delete serviceentry external-httpbin -n default


```bash
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3

Choose a reason for hiding this comment

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

medium

The Istio API version networking.istio.io/v1alpha3 is outdated. It is recommended to use the stable v1beta1 version in new documentation, as v1alpha3 APIs are deprecated and scheduled for removal in future Istio releases.

Suggested change
apiVersion: networking.istio.io/v1alpha3
apiVersion: networking.istio.io/v1beta1

protocol: HTTP
addresses:
- 240.240.0.1
resolution: DNS

Choose a reason for hiding this comment

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

medium

For a ServiceEntry with a statically defined IP address in the addresses field, it is clearer and more idiomatic to set resolution to STATIC. While DNS resolution with a specified address works (using DNS as a fallback), STATIC more accurately describes the configuration's intent for this virtual service.

Suggested change
resolution: DNS
resolution: STATIC

- 240.240.0.1
resolution: DNS
---
apiVersion: networking.istio.io/v1alpha3

Choose a reason for hiding this comment

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

medium

The Istio API version networking.istio.io/v1alpha3 is outdated. It is recommended to use the stable v1beta1 version in new documentation, as v1alpha3 APIs are deprecated and scheduled for removal in future Istio releases.

Suggested change
apiVersion: networking.istio.io/v1alpha3
apiVersion: networking.istio.io/v1beta1


```bash
kubectl apply -f - <<EOF
apiVersion: networking.istio.io/v1alpha3

Choose a reason for hiding this comment

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

medium

The Istio API version networking.istio.io/v1alpha3 is outdated. It is recommended to use the stable v1beta1 version in new documentation, as v1alpha3 APIs are deprecated and scheduled for removal in future Istio releases.

Suggested change
apiVersion: networking.istio.io/v1alpha3
apiVersion: networking.istio.io/v1beta1

Comment on lines +223 to +225
kubectl delete serviceentry external-fake-svc
kubectl delete virtualservice fake-service-route
kubectl delete serviceentry external-httpbin

Choose a reason for hiding this comment

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

medium

For clarity and to avoid potential errors if the user's kubectl context is not set to the default namespace, it is good practice to explicitly specify the namespace with the -n flag in kubectl commands.

Suggested change
kubectl delete serviceentry external-fake-svc
kubectl delete virtualservice fake-service-route
kubectl delete serviceentry external-httpbin
kubectl delete serviceentry external-fake-svc -n default
kubectl delete virtualservice fake-service-route -n default
kubectl delete serviceentry external-httpbin -n default

@hzxuzhonghu hzxuzhonghu requested a review from Copilot September 24, 2025 02:22
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive documentation for configuring Service Entry and routing in Istio with Kmesh, providing both English and Chinese versions of the guide. The documentation demonstrates how to use Service Entry to define external services and configure VirtualService to route traffic within the mesh.

Key changes:

  • Added complete tutorial for Service Entry configuration and testing
  • Included practical examples with httpbin service and routing scenarios
  • Provided both basic and advanced use cases with external service configuration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/application-layer/try-service-entry.md English version of the Service Entry configuration guide
i18n/zh/docusaurus-plugin-content-docs/current/application-layer/try-service-entry.md Chinese translation of the Service Entry guide

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

number: 80
protocol: HTTP
addresses:
- 240.240.0.1
Copy link
Member

Choose a reason for hiding this comment

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

you donot need to provide this address.

And btw, i think this depend on the dns proxy feature is turned on

@Copilot Copilot AI review requested due to automatic review settings September 25, 2025 11:20
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +21 to +22
kubectl apply -f ./samples/httpbin/httpbin.yaml
kubectl apply -f ./samples/sleep/sleep.yaml
Copy link
Preview

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

The file paths use relative paths that may not exist in all environments. Consider using absolute URLs like the Chinese version does (https://raw.githubusercontent.com/istio/istio/release-1.21/samples/httpbin/httpbin.yaml) or add a note about where these files should be located.

Suggested change
kubectl apply -f ./samples/httpbin/httpbin.yaml
kubectl apply -f ./samples/sleep/sleep.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/httpbin/httpbin.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/sleep/sleep.yaml

Copilot uses AI. Check for mistakes.

我们需要部署 Httpbin 作为目标服务:

```bash
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/httpbin/httpbin.yaml
Copy link
Preview

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

Only the httpbin deployment is shown, but the preparation section mentions deploying both httpbin and sleep. The sleep deployment command is missing, creating inconsistency with the English version which shows both deployments.

Suggested change
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/httpbin/httpbin.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/httpbin/httpbin.yaml
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.21/samples/sleep/sleep.yaml

Copilot uses AI. Check for mistakes.

exportTo:
- "*"
hosts:
- kmesh-fake.com
Copy link
Member

Choose a reason for hiding this comment

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

since you are writing the doc, would prefer using ServiceEntry to access external service.

So you can make kmesh-fake.com access https://httpbin.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants