-
Notifications
You must be signed in to change notification settings - Fork 9
add networking api #310
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
add networking api #310
Conversation
Signed-off-by: oilbeater <liumengxinfly@gmail.com>
WalkthroughThis PR adds comprehensive documentation and Kubernetes CustomResourceDefinition (CRD) files for networking APIs. It introduces new MDX documentation pages for HTTPRoute, Service, Vpc, and VpcEgressGateway resources, alongside two YAML CRD definitions for Vpc and VpcEgressGateway under the kubeovn.io API group. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~20 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying alauda-container-platform with
|
| Latest commit: |
f25898e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e08439b6.alauda-container-platform.pages.dev |
| Branch Preview URL: | https://network-api-master.alauda-container-platform.pages.dev |
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.
Actionable comments posted: 0
🧹 Nitpick comments (5)
docs/en/apis/kubernetes_apis/networking/httproute.mdx (1)
1-5: Minimal scaffolding—consider adding documentation content.The page is currently empty except for a component reference. While this may be intentional scaffolding, consider populating it with a brief description of the HTTPRoute API, key fields, or a "Coming Soon" note to set expectations.
docs/en/apis/kubernetes_apis/networking/vpc.mdx (1)
1-5: Minimal scaffolding—consistent with HTTPRoute but incomplete.Like httproute.mdx, this page contains only a component reference with no documentation content. Consider adding descriptive content to guide users on the Vpc resource and its usage.
docs/en/apis/kubernetes_apis/networking/index.mdx (1)
1-6: Add frontmatter metadata and populate overviewHeaders.The index page has empty frontmatter and an empty
overviewHeadersarray. For a hub page, consider adding metadata (title, description) and populating the headers array with relevant networking API sections.docs/en/apis/kubernetes_apis/networking/vpc-egress-gateway.mdx (1)
1-5: Minimal scaffolding—add documentation content.Like the other API pages, this contains only a component reference. Add descriptive content explaining VpcEgressGateway's purpose, configuration options, and usage patterns.
docs/shared/crds/kubeovn.io_vpcs.yaml (1)
89-130: BFD port structure includes complex nested selector but lacks description.The
bfdPortobject nests an IP field with complex validation patterns and a full nodeSelector structure. While the schema is correct, consider adding descriptions to the properties (especially the IP format constraints) to help operators understand the valid formats. This is optional but would improve usability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
docs/en/apis/kubernetes_apis/networking/httproute.mdx(1 hunks)docs/en/apis/kubernetes_apis/networking/index.mdx(1 hunks)docs/en/apis/kubernetes_apis/networking/service.mdx(1 hunks)docs/en/apis/kubernetes_apis/networking/vpc-egress-gateway.mdx(1 hunks)docs/en/apis/kubernetes_apis/networking/vpc.mdx(1 hunks)docs/shared/crds/kubeovn.io_vpc-egress-gateways.yaml(1 hunks)docs/shared/crds/kubeovn.io_vpcs.yaml(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/en/apis/kubernetes_apis/networking/service.mdx
[grammar] ~1-~1: Il y a peut-être une erreur ici
Context: # Service [v1]
(QB_NEW_FR)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cloudflare Pages
🔇 Additional comments (6)
docs/en/apis/kubernetes_apis/networking/service.mdx (1)
1-5: Content looks good—documenting standard Kubernetes Service endpoints.The file correctly documents the two primary Kubernetes Service API operations (list and get) with appropriate path prefixes for cluster-scoped routing. Static analysis flagged a false positive French grammar check which can be ignored.
docs/shared/crds/kubeovn.io_vpc-egress-gateways.yaml (3)
156-164: IP size validations assume non-empty array—verify intent.Lines 157-158 and 160-161 use conditions like
!has(self.internalIPs) || size(self.internalIPs) == 0 || size(self.internalIPs) >= self.replicas. This allows either unset/empty IPs or IPs >= replicas. Confirm this permits valid use cases where IPs are intentionally omitted or empty in certain scenarios.
256-284: Validation for selectors is sound but verbose.The namespace and pod selector validations (lines 256-258 and 282-284) correctly enforce that each selector must have at least one of
matchLabelsormatchExpressions. This is consistent and correct.
51-62: Scale subresource configuration looks correct.The scale subresource properly maps spec.replicas (write), status.replicas, and status.labelSelector (read). This enables kubectl scale and Horizontal Pod Autoscaler integration correctly.
docs/shared/crds/kubeovn.io_vpcs.yaml (2)
131-133: BFD port IP validation correctly enforces enablement constraint.The validation rule
"self.enabled == false || self.ip != ''"correctly ensures that when BFD Port is enabled, an IP must be set. This constraint is logically sound and appropriately enforced.
1-5: CRD structure and metadata are correct.The CRD uses proper apiVersion (apiextensions.k8s.io/v1), kind, metadata, and defines a cluster-scoped resource with v1 as the served and storage version. The names (Vpc, vpcs, vpc, VpcList) follow Kubernetes naming conventions.
Summary by CodeRabbit