diff --git a/docs/cluster.md b/docs/cluster.md index 30f0f96a..6dfc7dc0 100644 --- a/docs/cluster.md +++ b/docs/cluster.md @@ -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 @@ -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 diff --git a/docs/repair.md b/docs/repair.md index 906399b5..2696d4cb 100644 --- a/docs/repair.md +++ b/docs/repair.md @@ -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: