Skip to content

Commit

Permalink
update document
Browse files Browse the repository at this point in the history
  • Loading branch information
YZ775 committed Nov 21, 2024
1 parent f847d21 commit bd8d389
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,14 @@ The repair configurations control the [repair functionality](repair.md).

#### RepairOperation

| Name | Required | Type | Description |
| ------------------------- | -------- | -------------- | --------------------------------------------------------------- |
| `operation` | true | string | Name of repair operation. |
| `repair_steps` | true | `[]RepairStep` | Sequences of [repair steps](#repairstep). |
| `health_check_command` | true | array | A command to check repaired machine's health. List of strings. |
| `command_timeout_seconds` | false | \*int | Deadline for health retrieval. Zero means infinity. Default: 30 |
| Name | Required | Type | Description |
| ------------------------- | -------- | -------------- | ----------------------------------------------------------------------------- |
| `operation` | true | string | Name of repair operation. |
| `repair_steps` | true | `[]RepairStep` | Sequences of [repair steps](#repairstep). |
| `health_check_command` | true | array | A command to check repaired machine's health. List of strings. |
| `command_timeout_seconds` | false | \*int | Deadline for health retrieval. Zero means infinity. Default: 30 |
| `success_command` | false | array | A command executed when repair is succeeded. List of strings. |
| `success_command_timeout` | false | \*int | Deadline for execution of succcess_command. Zero means infinity. Default: 30 |

##### RepairStep

Expand Down Expand Up @@ -296,6 +298,4 @@ It should end with either `.conf` or `.conflist`.
Fields in `config` may have default values. Some fields are overwritten by CKE.
Please see the source code for more details.

[CRI]: https://github.com/kubernetes/kubernetes/blob/242a97307b34076d5d8f5bbeb154fa4d97c9ef1d/docs/devel/container-runtime-interface.md
[log rotation for CRI runtime]: https://github.com/kubernetes/kubernetes/issues/58823
[LabelSelector]: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors
6 changes: 6 additions & 0 deletions docs/repair.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ CKE decides to execute a repair operations if its `operation` matches `OPERATION
When CKE executes the check command, it appends the IP address of the target machine to the command.
The command should return a string `true` if it evaluates the machine as healthy.

`success_command` and its timeout are used when all of the repair steps are successfully finished.
When CKE executes the success command, it appends the IP address of the target machine to the command.
If the repair is failed, the command is not executed.
If the `success_command` fails, CKE changes the status of the queue entry to `failed`.
Users can use this command if they want to execute a command after the repair steps.

### Repair steps

A repair step is a combination of:
Expand Down

0 comments on commit bd8d389

Please sign in to comment.