[draft] restructured the failover document#1005
Conversation
Signed-off-by: changzhen <changzhen5@huawei.com>
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Code Review
This pull request restructures the Karmada failover documentation by introducing a comprehensive overview page and standardizing the presentation of prerequisites and feature gates across both English and Chinese versions. The changes improve the logical flow by linking health monitoring, taint management, and failover internals more effectively. Review feedback suggests refining the feature gate requirements table for accuracy, ensuring consistent formatting in documentation tables, and removing redundant sections in the Chinese translation to maintain alignment with the English source.
| | **Typical Scenarios** | Cluster outage, network partition, infrastructure upgrade | Resource preemption, spot instance reclamation, application-level errors | | ||
| | **Mechanism** | `NoExecute` taint on cluster → workload eviction → rescheduling | `interpretHealth` check fails → application eviction → rescheduling | | ||
| | **Configuration Field** | `.spec.failover.cluster` in PropagationPolicy | `.spec.failover.application` in PropagationPolicy | | ||
| | **Required Feature Gates** | `Failover` (Beta, off by default) | `GracefulEviction` (Beta, on by default) | |
There was a problem hiding this comment.
The Required Feature Gates row in this comparison table is slightly misleading.
- Application Failover primarily relies on
PropagateDeps(to ensure dependencies move with the app) andGracefulEviction(if usingGraciouslymode). - Cluster Failover primarily relies on
FailoverandGracefulEviction(if usingGracefullymode).
Listing only one gate per column oversimplifies the requirements. It would be better to list the primary gates or refer to the Feature Gates Reference table below for complete details.
| | **Required Feature Gates** | `Failover` (Beta, off by default) | `GracefulEviction` (Beta, on by default) | | |
| | **Required Feature Gates** | Failover (See reference below) | PropagateDeps & GracefulEviction | |
| | `Failover` | Beta | **Off** | Required for cluster failover. Enables taint-based workload eviction and rescheduling. | | ||
| | `GracefulEviction` | Beta | On | Required for graceful eviction during both cluster and application failover. Delays removal of old workloads until new cluster is ready. | | ||
| | `PropagateDeps` | Beta | On | Required for application failover. Ensures application dependencies are migrated together. | | ||
| | `StatefulFailoverInjection` | Alpha | **Off** | Required for stateful application failover. Enables state data injection via JSONPath rules. | |
There was a problem hiding this comment.
For consistency in the Default column, please apply bolding to both Off and On states, or remove it from Off. Currently, only Off is bolded in lines 51 and 54.
| | `Failover` | Beta | **Off** | Required for cluster failover. Enables taint-based workload eviction and rescheduling. | | |
| | `GracefulEviction` | Beta | On | Required for graceful eviction during both cluster and application failover. Delays removal of old workloads until new cluster is ready. | | |
| | `PropagateDeps` | Beta | On | Required for application failover. Ensures application dependencies are migrated together. | | |
| | `StatefulFailoverInjection` | Alpha | **Off** | Required for stateful application failover. Enables state data injection via JSONPath rules. | | |
| | Failover | Beta | **Off** | Required for cluster failover. Enables taint-based workload eviction and rescheduling. | | |
| | GracefulEviction | Beta | **On** | Required for graceful eviction during both cluster and application failover. Delays removal of old workloads until new cluster is ready. | | |
| | PropagateDeps | Beta | **On** | Required for application failover. Ensures application dependencies are migrated together. | | |
| | StatefulFailoverInjection | Alpha | **Off** | Required for stateful application failover. Enables state data injection via JSONPath rules. | |
| 下面来介绍一些多集群故障迁移的场景: | ||
|
|
||
| - 管理员在 Karmada 控制面部署了一个离线业务,并将业务 Pod 实例分发到了多个集群。突然某个集群发生故障,管理员希望 Karmada 能够把故障集群上的 Pod 实例迁移到其他条件适合的集群中去。 | ||
| - 普通用户通过 Karmada 控制面在某一个集群上部署了一个在线业务,业务包括数据库实例、服务器实例、配置文件等,服务通过控制面上的ELB对外暴露,此时某一集群发生故障,用户希望把整个业务能迁移到另一个情况较适合的集群上,业务迁移期间需要保证服务不断服。 | ||
| - 管理员将某个集群进行升级,作为基础设施的容器网络、存储等发生了改变,管理员希望在集群升级之前把当前集群上的应用迁移到其他适合的集群中去,业务迁移期间需要保证服务不断服。 | ||
| - ...... |
There was a problem hiding this comment.
This section "Why Cluster Failover Is Required" (为何需要集群故障迁移) was removed from the top of the file to reduce bloat and move overview content to the new overview.md. However, it was added back at the end of this Chinese version, which is inconsistent with the English version and the PR's stated goal of restructuring. Please remove these lines to maintain consistency.
What type of PR is this?
/kind documentation
What this PR does / why we need it:
The existing documentation on failover has the following problems and needs to be restructured.
Lack of an overall overview page
After users enter the
failoverdirectory, there is no introductory Overview page for guidance. Users are directed straight to detailed technical documents, with no entry point to understand what it is, why it exists, and how to make choices.Sidebar order inconsistent with cognitive logic
Current order:
cluster-status-maintenance → cluster-failover → cluster-taint-management → failover-analysis → application-failover
Problems:
cluster-taint-management(Taint is the core mechanism that triggers failover) is placed aftercluster-failover, while it is actually a prerequisite for understanding cluster failover.failover-analysisis sandwiched between cluster failover and application failover, leaving readers unclear whether it is an in-depth analysis of cluster failover.cluster-status-maintenanceis displayed directly without contextual explanation, so readers cannot figure out its relationship with failover.Content duplication and fragmentation
StatePreservationis explained in bothapplication-failover.mdandcluster-failover.md. The content is presented separately in each document without comparative clarification.Undifferentiated concepts and operational procedures
cluster-failover.mdmixes multiple layers of content together: background motivation, enabling methods, configuration guidance, and state preservation. The bloated structure makes it inconvenient for quick lookup.Ambiguous positioning of failover-analysis.md
The title "Analysis" does not clearly indicate that this is an in-depth reference document. As a result, users are unsure whether they need to read it and at which stage it should be reviewed.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: