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

Create index.md #1308

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

tangtang-0521
Copy link

@tangtang-0521 tangtang-0521 commented Mar 4, 2025

Summary by CodeRabbit

  • Documentation
    • Introduced a new community article titled "社区文章|HTNN 如何斟酌出更好的插件扩展机制", detailing the HTNN plugin extension mechanism. The document covers design principles for strong extensibility, high development efficiency, and robust validation methods for plugin configurations.

Copy link

coderabbitai bot commented Mar 4, 2025

Warning

Rate limit exceeded

@tangtang-0521 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 23 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 5a7fe1d and 4c2be77.

📒 Files selected for processing (1)
  • content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md (1 hunks)

Walkthrough

A new markdown file has been added to the documentation. It provides a detailed explanation of the HTNN plugin extension mechanism. The document describes the unified FilterPolicy CRD—highlighting its use of the targetRef and filters fields—to enable policy configuration and decouple plugins from network resources. It also explains the validation process using Protobuf and Go, and categorizes plugins into Native and Go Plugins to illustrate their roles in the control and data planes.

Changes

File(s) Change Summary
content/zh/blog/.../htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md Added a new markdown file outlining the HTNN plugin extension design. It details the unified FilterPolicy CRD structure, explains configuration validation via Protobuf and Go, and differentiates between Native and Go plugin integrations.

Poem

Hoppin' through docs with delight,
Where policies and plugins unite.
A FilterPolicy dreams in the code,
Simplifying rules down the digital road.
I'm a bunny with a keyboard so spry,
Celebrating fresh changes under a techy sky!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (7)
content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md (7)

18-18: Convert Bare URL to Markdown Link

The GitHub URL on this line is currently presented as a bare URL. For better readability and consistency, consider converting it to a markdown link—for example: [HTNN GitHub](https://github.com/mosn/htnn).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

18-18: Bare URL used
null

(MD034, no-bare-urls)


28-59: Specify Language for Fenced Code Block

The configuration snippet provided here is in a fenced code block without an explicit language identifier. Adding a language (for example, yaml) will improve syntax highlighting and clarity.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

28-28: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


67-71: Add Language Identifier to Code Block

For the code block showcasing the Plugin struct, specifying a language (such as go) will enable proper syntax highlighting and enhance readability.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

67-67: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


78-78: Review Verb Modification in Chinese Text

Consider verifying the phrasing in this line regarding the adverbial usage. For instance, re-evaluate whether “高效的开发效率” might be more accurately phrased as “高效地开发” or an alternative expression that better conforms to Chinese grammatical conventions.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~78-~78: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:高"地"开发
Context: ...懂网关的实现细节。由于插件开发的门槛降低了,开发者能够更加聚焦业务问题,取得更高的开发效率。 ## Validate via Protobuf and Go ...

(wb4)


93-95: Verify Terminology Consistency

The term “补齐” is used to describe bridging the capability gap between Istio and Gateway API. Please confirm that this term correctly conveys the intended meaning; if there’s a risk of misinterpretation (as hinted by language tools), a minor clarification might help.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~94-~94: 您的意思是“"不"齐”?
Context: ...licy 把 CORS 的能力加回来。Native Plugin 的能力不仅限于补齐 istio 现有能力和 Gateway API 之间的间隙。istio 官方...

(BU)


104-108: Use Semantic Headings Instead of Emphasis

Lines 104 and 106 use emphasis to denote section titles (e.g., "欢迎大家加入社区与我们交流" and "GitHub"). For improved document semantics and accessibility, consider using markdown headings (for example, ## 欢迎大家加入社区与我们交流 and ## GitHub).

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

104-104: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


106-106: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


108-108: Bare URL used
null

(MD034, no-bare-urls)


108-108: Convert Bare URL to Markdown Link

The URL on line 108 is presented in a bare format. Converting it into a markdown link (e.g., [HTNN GitHub](https://github.com/mosn/htnn)) would enhance the document’s readability and adhere to markdown best practices.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

108-108: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d0809f8 and ce2d8b8.

📒 Files selected for processing (1)
  • content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md

[uncategorized] ~11-~11: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:好"地"插
Context: ...0-tps-1080-459.jpg)" --- # HTNN 如何斟酌出更好的插件扩展机制 在设计插件扩展机制时,HTNN 关注两点: 1. 扩展性尽可能...

(wb4)


[uncategorized] ~78-~78: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:高"地"开发
Context: ...懂网关的实现细节。由于插件开发的门槛降低了,开发者能够更加聚焦业务问题,取得更高的开发效率。 ## Validate via Protobuf and Go ...

(wb4)


[uncategorized] ~94-~94: 您的意思是“"不"齐”?
Context: ...licy 把 CORS 的能力加回来。Native Plugin 的能力不仅限于补齐 istio 现有能力和 Gateway API 之间的间隙。istio 官方...

(BU)

🪛 markdownlint-cli2 (0.17.2)
content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md

18-18: Bare URL used
null

(MD034, no-bare-urls)


28-28: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


67-67: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


104-104: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


106-106: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


108-108: Bare URL used
null

(MD034, no-bare-urls)

🔇 Additional comments (1)
content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md (1)

1-9: Front Matter Formatting and Metadata Validity

The front matter is well-structured and includes all the necessary metadata (title, authorlink, description, categories, tags, date, cover). Please double-check that the cover URL and date are in line with your site's formatting standards.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md (6)

13-20: Introduction & URL Formatting
The introductory section succinctly outlines the two core objectives. However, the GitHub URL on line 19 is written as a bare URL. For consistency and improved readability, consider converting it into a markdown link.

Example change:

-**GitHub**: https://github.com/mosn/htnn
+**GitHub**: [https://github.com/mosn/htnn](https://github.com/mosn/htnn)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

19-19: Bare URL used
null

(MD034, no-bare-urls)


29-60: Code Fence for YAML Example
The fenced code block presents a YAML snippet for a typical FilterPolicy. To enhance syntax highlighting and readability, please specify the language (e.g., yaml) for the code block.

Example change:

-```
+```yaml

(Ensure that the closing fence remains unchanged.)

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

29-29: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


69-73: Code Fence for Plugin Struct
The code block defining the Plugin struct would benefit from a language identifier (likely go) to improve clarity and enable proper syntax highlighting.

Example change:

-```
+```go

(Remember to update the closing fence accordingly.)

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

69-69: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


75-80: Plugin Development Explanation
The explanation of plugin decoupling is well-articulated. As a minor nitpick, reconsider the phrasing on line 80 regarding "高效的开发效率"—using an adverbial form (for example, "高效地开发") might more precisely convey the intended meaning.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~80-~80: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:高"地"开发
Context: ...懂网关的实现细节。由于插件开发的门槛降低了,开发者能够更加聚焦业务问题,取得更高的开发效率。 ## Validate via Protobuf and Go ...

(wb4)


90-100: Run in Istiod or Envoy Section
This portion of the document clearly distinguishes between Native Plugins and Go Plugins and their deployment contexts. On line 96, please double-check that the term "补齐" is the intended word—it might be worth confirming that it accurately conveys the desired meaning rather than implying any inadvertent error.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~96-~96: 您的意思是“"不"齐”?
Context: ...licy 把 CORS 的能力加回来。Native Plugin 的能力不仅限于补齐 istio 现有能力和 Gateway API 之间的间隙。istio 官方...

(BU)


106-112: Community Call-to-Action Formatting
The final section uses bold text to highlight "欢迎大家加入社区与我们交流" and "GitHub." However, markdownlint recommends using proper heading syntax instead of emphasis for titles to improve document structure. Additionally, the GitHub URL on line 111 is a bare URL; formatting it as a markdown link would enhance consistency.

Example changes:

-**GitHub**
+## GitHub

and

-https://github.com/mosn/htnn
+[https://github.com/mosn/htnn](https://github.com/mosn/htnn)
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

106-106: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


108-108: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


111-111: Bare URL used
null

(MD034, no-bare-urls)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce2d8b8 and 5a7fe1d.

📒 Files selected for processing (1)
  • content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md

[uncategorized] ~11-~11: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:好"地"插
Context: ...0-tps-1080-459.jpg)" --- # HTNN 如何斟酌出更好的插件扩展机制 在设计插件扩展机制时,HTNN 关注两点: 1. 扩展性尽可能...

(wb4)


[uncategorized] ~80-~80: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:高"地"开发
Context: ...懂网关的实现细节。由于插件开发的门槛降低了,开发者能够更加聚焦业务问题,取得更高的开发效率。 ## Validate via Protobuf and Go ...

(wb4)


[uncategorized] ~96-~96: 您的意思是“"不"齐”?
Context: ...licy 把 CORS 的能力加回来。Native Plugin 的能力不仅限于补齐 istio 现有能力和 Gateway API 之间的间隙。istio 官方...

(BU)

🪛 markdownlint-cli2 (0.17.2)
content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md

19-19: Bare URL used
null

(MD034, no-bare-urls)


29-29: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


69-69: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


106-106: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


108-108: Emphasis used instead of a heading
null

(MD036, no-emphasis-as-heading)


111-111: Bare URL used
null

(MD034, no-bare-urls)

🔇 Additional comments (6)
content/zh/blog/htnn-how-to-deliberate-on-a-better-plugin-extension-mechanism/index.md (6)

1-9: Front Matter Review
The YAML front matter is comprehensive, providing key metadata such as title, authorlink, description, categories, tags, date, and cover image. Please ensure these values (especially the date and tag formats) are consistent with your site’s conventions.


11-12: Title Clarity
The title is clear and descriptive, setting the stage for the content.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~11-~11: 动词的修饰一般为‘形容词(副词)+地+动词’。您的意思是否是:好"地"插
Context: ...0-tps-1080-459.jpg)" --- # HTNN 如何斟酌出更好的插件扩展机制 在设计插件扩展机制时,HTNN 关注两点: 1. 扩展性尽可能...

(wb4)


21-28: FilterPolicy CRD Section
This section clearly explains the purpose of the FilterPolicy CRD and its role in unifying network policy configurations. The rationale provided is easy to follow.


62-67: FilterPolicy Fields Explanation
This segment concisely explains the two core fields—targetRef and filters—which is both informative and clearly presented.


82-89: Validation via Protobuf and Go
This section effectively details the rationale behind using Protobuf and Go for pre-validating plugin configurations. The detailed explanation supports the design decisions well.


102-105: Summary Section
The summary succinctly reiterates the key points and reinforces the design objectives. The content is both clear and compelling.

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

Successfully merging this pull request may close these issues.

1 participant