-
Notifications
You must be signed in to change notification settings - Fork 101
Route #263
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
Conversation
将分散的污点路由处理逻辑集中到 TaintController 中 移除 AllTaintList 函数并使用新的 List 方法替代 统一污点操作的路由注册方式
将原有的节点控制器功能拆分为多个子控制器(ActionController、ResourceController、MetadataController、ShellController) 并分别注册路由,提高代码可维护性和模块化程度
将OptionList、CreateResourceQuota和CreateLimitRange方法重构为Controller结构体的方法 统一通过RegisterRoutes注册路由,提高代码组织性
将原有的直接路由注册改为通过RegisterActionRoutes方法统一注册
将分散的路由注册逻辑集中到 ActionController 结构体中 通过 RegisterActionRoutes 方法统一注册所有部署相关路由
将main.go中分散的pod关联路由注册逻辑提取到独立的RegisterPodLinkRoutes方法中 统一管理所有pod关联路由,提高代码可维护性
将分散的容忍度路由处理函数重构为集中的 TolerationController 结构体 通过 RegisterTolerationRoutes 方法统一注册路由,提高代码可维护性
将分散的Pod亲和性路由注册逻辑重构为统一的RegisterAffinityRoutes方法 新增AffinityController结构体集中管理相关方法
将节点亲和性、Pod亲和性和Pod反亲和性的路由注册逻辑重构为控制器模式 统一路由注册方式,提高代码可维护性和一致性
将直接注册的路由函数改为通过控制器结构体方法注册 移除已废弃的CrdTree相关代码
将分散的容器相关路由集中注册到RegisterContainerRoutes 将容器相关函数重构为ContainerController的方法 提取getResourcePaths函数到单独文件
将原有的标签更新功能合并到新的metadata.go文件中,并添加注解的过滤逻辑 新增不可变键列表,防止修改系统关键注解 添加注解列表功能,返回过滤后的注解数据
将原有的直接路由处理函数重构为MetadataController结构体方法 通过RegisterMetadataRoutes统一注册元数据相关路由 提高代码组织性和可维护性
将动态路由的注册逻辑从直接注册改为通过ActionController统一管理 所有相关方法重构为ActionController的成员方法,提高代码组织性
将分散的路由注册集中到 RegisterRoutes 方法中
将原有的直接路由注册改为通过控制器结构体注册路由 统一管理路由相关方法,提高代码组织性和可维护性
将网关类的路由注册从直接调用改为通过控制器方法注册
将ingressclass的路由注册逻辑从main.go移出并重构为控制器模式 统一路由注册方式,提高代码可维护性
将storage_class的路由注册从main.go移至控制器内部,使用控制器结构体封装路由方法
将分散的路由注册集中到RegisterRoutes方法中,提高代码可维护性
将configmap的路由注册逻辑集中到RegisterRoutes方法中 引入Controller结构体来组织相关方法,提高代码可维护性
将分散的路由注册集中到RegisterRoutes方法中 统一控制器方法接收者为Controller结构体
将分散的路由注册代码重构为统一的RegisterRoutes方法 所有控制器方法改为Controller的成员方法
将分散的路由定义重构为通过RegisterRoutes方法集中注册 将独立函数重构为Controller结构体的方法
Caution Review failedThe pull request is closed. 📝 WalkthroughSummary by CodeRabbit
Walkthrough本次变更对主路由注册逻辑进行了大规模重构,将各类 Kubernetes 资源相关的 HTTP 路由注册,从原本在 Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Router
participant Controller
participant Service
Client->>Router: HTTP 请求 /k8s/cluster/:cluster/...
Router->>Controller: 路由分发到对应控制器方法
Controller->>Service: 调用业务逻辑
Service-->>Controller: 返回处理结果
Controller-->>Router: 返回 JSON 响应
Router-->>Client: 响应结果
Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (35)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
No description provided.