Skip to content

[draft] restructured the failover document#1005

Draft
XiShanYongYe-Chang wants to merge 1 commit into
karmada-io:mainfrom
XiShanYongYe-Chang:refactor-failover-doc
Draft

[draft] restructured the failover document#1005
XiShanYongYe-Chang wants to merge 1 commit into
karmada-io:mainfrom
XiShanYongYe-Chang:refactor-failover-doc

Conversation

@XiShanYongYe-Chang

Copy link
Copy Markdown
Member

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.

  1. Lack of an overall overview page
    After users enter the failover directory, 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.

  2. 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 after cluster-failover, while it is actually a prerequisite for understanding cluster failover.
    • failover-analysis is sandwiched between cluster failover and application failover, leaving readers unclear whether it is an in-depth analysis of cluster failover.
    • cluster-status-maintenance is displayed directly without contextual explanation, so readers cannot figure out its relationship with failover.
  3. Content duplication and fragmentation

  • StatePreservation is explained in both application-failover.md and cluster-failover.md. The content is presented separately in each document without comparative clarification.
  • Feature Gate information is scattered across multiple documents (Failover, GracefulEviction, PropagateDeps, StatefulFailoverInjection). Users have to browse multiple pages to confirm which feature gates need to be enabled.
  1. Undifferentiated concepts and operational procedures
    cluster-failover.md mixes multiple layers of content together: background motivation, enabling methods, configuration guidance, and state preservation. The bloated structure makes it inconvenient for quick lookup.

  2. 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:

Signed-off-by: changzhen <changzhen5@huawei.com>
@karmada-bot karmada-bot added the kind/documentation Categorizes issue or PR as related to documentation. label May 12, 2026
@karmada-bot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign windsonsea for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@XiShanYongYe-Chang XiShanYongYe-Chang marked this pull request as draft May 12, 2026 03:11
@karmada-bot karmada-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

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 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) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The Required Feature Gates row in this comparison table is slightly misleading.

  1. Application Failover primarily relies on PropagateDeps (to ensure dependencies move with the app) and GracefulEviction (if using Graciously mode).
  2. Cluster Failover primarily relies on Failover and GracefulEviction (if using Gracefully mode).

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.

Suggested change
| **Required Feature Gates** | `Failover` (Beta, off by default) | `GracefulEviction` (Beta, on by default) |
| **Required Feature Gates** | Failover (See reference below) | PropagateDeps & GracefulEviction |

Comment on lines +51 to +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. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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.

Suggested change
| `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. |

Comment on lines +129 to +134
下面来介绍一些多集群故障迁移的场景:

- 管理员在 Karmada 控制面部署了一个离线业务,并将业务 Pod 实例分发到了多个集群。突然某个集群发生故障,管理员希望 Karmada 能够把故障集群上的 Pod 实例迁移到其他条件适合的集群中去。
- 普通用户通过 Karmada 控制面在某一个集群上部署了一个在线业务,业务包括数据库实例、服务器实例、配置文件等,服务通过控制面上的ELB对外暴露,此时某一集群发生故障,用户希望把整个业务能迁移到另一个情况较适合的集群上,业务迁移期间需要保证服务不断服。
- 管理员将某个集群进行升级,作为基础设施的容器网络、存储等发生了改变,管理员希望在集群升级之前把当前集群上的应用迁移到其他适合的集群中去,业务迁移期间需要保证服务不断服。
- ......

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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.

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

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/documentation Categorizes issue or PR as related to documentation. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants