Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuvaraj Kakaraparthi committed Jun 2, 2023
1 parent 8870d41 commit e69d62e
Showing 1 changed file with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

The `MachineSetPreflightChecks` feature can provide additional safety while creating new Machines and remediating existing unhealthy Machines of a MachineSet.

When a MachineSet creates machines under certain circumstances, the operation fails or leads to a new machine that will be deleted and recreated in a short timeframe,
leading to unwanted Machine churn. Some of these circumstances include, but not limited to, creating a new Machine when Kubernetes version skew could be violated or
joining a Machine when the Control Plane is upgrading leading to failure because of unclear kube-apiserver version.

Enabling `MachineSetPreflightChecks` provides safety in such circumstances by making sure that a Machine is only created when it is safe to do so.


**Feature gate name**: `MachineSetPreflightChecks`

**Variable name to enable/disable the feature gate**: `EXP_MACHINE_SET_PREFLIGHT_CHECKS`
Expand All @@ -10,33 +17,33 @@ The `MachineSetPreflightChecks` feature can provide additional safety while crea

### `ControlPlaneIsStable`

* This preflight check ensures that the ControlPlane is currently stable i.e. the ControlPlane is currently not provisioning or not upgrading.
* This preflight check ensures that the ControlPlane is currently stable i.e. the ControlPlane is currently neither provisioning nor upgrading.
* This preflight check is only performed if:
* The Cluster uses a ControlPlane provider.
* ControlPlane defines a version (`ControlPlane.Spec.Version` is defined).
* ControlPlane version is defined (`controlPlane.spec.version` is set).

### `KubernetesVersionSkew`

* This preflight check ensures that the MachineSet and ControlPlane conform to the Kubernetes version skew.
* This preflight check ensures that the MachineSet and the ControlPlane conform to the [Kubernetes version skew](https://kubernetes.io/releases/version-skew-policy/#kubelet).
* This preflight check is only performed if:
* The Cluster uses a ControlPlane provider.
* ControlPlane version is defined (`ControlPlane.Spec.Version` is set).
* MachineSet version is defined (`MachineSet.Spec.Template.Spec.Version` is set).
* ControlPlane version is defined (`controlPlane.spec.version` is set).
* MachineSet version is defined (`machineSet.spec.template.spec.version` is set).

### `KubeadmVersionSkew`

* This preflight check ensures that the MachineSet and the ControlPlane conform the the kubeadm version skew.
* This preflight check ensures that the MachineSet and the ControlPlane conform to the [kubeadm version skew](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/#kubeadm-s-skew-against-kubeadm).
* This preflight check is only performed if:
* Cluster uses a ControlPlane provider.
* ControlPlane version is defined (`ControlPlane.Spec.Version` is set).
* MachineSet version is defined (`MachineSet.Spec.Template.Spec.Version` is set).
* The Cluster uses a ControlPlane provider.
* ControlPlane version is defined (`controlPlane.spec.version` is set).
* MachineSet version is defined (`machineSet.spec.template.spec.version` is set).
* MachineSet uses the `Kubeadm` Bootstrap provider.


## Opting out of PreflightChecks

Once the feature flag is enabled the preflight checks are enabled for all the MachineSets including new and existing MachineSets.
It is possible to opt-out of one or all of the preflight checks on a per MachineSet basis by specifying a coma-separated list of the preflight checks on the
It is possible to opt-out of one or all of the preflight checks on a per MachineSet basis by specifying a comma-separated list of the preflight checks on the
`machineset.cluster.x-k8s.io/skip-preflight-checks` annotation on the MachineSet.

Examples:
Expand Down

0 comments on commit e69d62e

Please sign in to comment.