-
Notifications
You must be signed in to change notification settings - Fork 47
Feat: add guide for configuring Service Entry and routing in Istio #240
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
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Summary of ChangesHello @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
Using Gemini Code AssistThe 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
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 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
|
✅ Deploy Preview for kmesh-net ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
apiVersion: networking.istio.io/v1alpha3 | |
apiVersion: networking.istio.io/v1beta1 |
- 240.240.0.1 | ||
resolution: DNS | ||
--- | ||
apiVersion: networking.istio.io/v1alpha3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
apiVersion: networking.istio.io/v1alpha3 | |
apiVersion: networking.istio.io/v1beta1 |
|
||
```bash | ||
kubectl apply -f - <<EOF | ||
apiVersion: networking.istio.io/v1alpha3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
apiVersion: networking.istio.io/v1alpha3 | |
apiVersion: networking.istio.io/v1beta1 |
kubectl delete serviceentry external-fake-svc | ||
kubectl delete virtualservice fake-service-route | ||
kubectl delete serviceentry external-httpbin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
apiVersion: networking.istio.io/v1alpha3 | |
apiVersion: networking.istio.io/v1beta1 |
protocol: HTTP | ||
addresses: | ||
- 240.240.0.1 | ||
resolution: DNS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
resolution: DNS | |
resolution: STATIC |
- 240.240.0.1 | ||
resolution: DNS | ||
--- | ||
apiVersion: networking.istio.io/v1alpha3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
apiVersion: networking.istio.io/v1alpha3 | |
apiVersion: networking.istio.io/v1beta1 |
|
||
```bash | ||
kubectl apply -f - <<EOF | ||
apiVersion: networking.istio.io/v1alpha3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
apiVersion: networking.istio.io/v1alpha3 | |
apiVersion: networking.istio.io/v1beta1 |
kubectl delete serviceentry external-fake-svc | ||
kubectl delete virtualservice fake-service-route | ||
kubectl delete serviceentry external-httpbin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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 |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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
a4e1ab5
to
c26ed62
Compare
Signed-off-by: Tom <[email protected]>
c26ed62
to
82819b8
Compare
There was a problem hiding this 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.
kubectl apply -f ./samples/httpbin/httpbin.yaml | ||
kubectl apply -f ./samples/sleep/sleep.yaml |
There was a problem hiding this comment.
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.
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 |
There was a problem hiding this comment.
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.
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 |
There was a problem hiding this comment.
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/
No description provided.