Skip to content

Commit

Permalink
adressed nits in proposal
Browse files Browse the repository at this point in the history
  • Loading branch information
killianmuldoon committed Dec 1, 2021
1 parent 3e11d9b commit b1e509e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/proposals/202105256-cluster-class-and-managed-topologies.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ As a cluster operator I want a simple way to define checks to manage the health
Instead of defining MachineHealthChecks each time a Cluster is created, there should be a mechanism for creating the same type of health check for each Cluster stamped by a ClusterClass.

**Examples**:
- A cluster operator would like to create a single MachineHealthCheck that applies across each machineDeployment and controlPlane created for Clusters stamped by a ClusterClass.
- A cluster operator would like to have individual MachineHealthChecks for each machineDeployment in Clusters stamped from a ClusterClass.
- A cluster operator would like to create a single MachineHealthCheck that applies across each MachineDeployment and ControlPlane created for Clusters stamped by a ClusterClass.
- A cluster operator would like to have individual MachineHealthChecks for each MachineDeployment in Clusters stamped from a ClusterClass.

### Implementation Details/Notes/Constraints

Expand Down Expand Up @@ -315,7 +315,7 @@ type LocalObjectTemplate struct {
// MachineHealthCheckClass defines a MachineHealthCheck for a group of Machines.
type MachineHealthCheckClass struct {
// UnhealthyConditions contains a list of the conditions that determine
// whether a node is considered unhealthy. The conditions are combined in a
// whether a node is considered unhealthy. The conditions are combined in a
// logical OR, i.e. if any of the conditions is met, the node is unhealthy.
// If not set this field will default to an array of two values:
// - type: Ready
Expand Down Expand Up @@ -700,7 +700,6 @@ Builtin variables are available under the `builtin.` prefix. Some examples:
to provider templates. **It’s the responsibility of the ClusterClass author to ensure the patches are semantically valid**.
- `MachineHealthCheck`
- If defined at `ClusterClass.spec.machineHealthCheck` must not be defined in `ClusterClass.spec.workers.machineDeployments[i].machineHealthCheck` or `ClusterClass.spec.controlPlane.machineHealthCheck`
- (defaulting) All fields required for MachineHealthChecks, including UnhealthyConditions, are defaulted as described in the API definition.
- For object updates:
- all the reference must be in the same namespace of `metadata.Namespace`
- `spec.workers.machineDeployments[i].class` field must be unique within a ClusterClass.
Expand Down Expand Up @@ -771,7 +770,7 @@ intentionally use resources without patches and variables to focus on the simple
apiVersion: controlplane.cluster.x-k8s.io/v1alpha4
kind: KubeadmControlPlaneTemplate
name: vsphere-prod-cluster-template-kcp
# This will create a health check for each deployment created with the "linux-worker" MachineDeploymentClass
# This will create a MachineHealthCheck for ControlPlane machines.
# The machineHealthCheck fields not defined below will be defaulted.
machineHealthCheck:
nodeStartupTimeout: 3m
Expand Down Expand Up @@ -883,8 +882,9 @@ intentionally use resources without patches and variables to focus on the simple
1. If `ClusterClass.spec.machineHealthCheck` is set:
1. For each `Cluster.spec.topology.workers.machineDeployments` item in the list create a MachineHealthCheck with the label `topology.cluster.x-k8s.io/deployment-name: <machine-deployment-topology-name>` as the selector and set the `clusterName` field from the cluster.
2. For the Cluster.spec.topology.controlPlane create a MachineHealthCheck with the label `cluster.x-k8s.io/control-plane` as the selector and set the `clusterName` field from the cluster.
2. For each `Cluster.spec.topology.workers.machineDeployments` with `ClusterClass.spec.workers.machineDeployments[i].machineDeploymentClass` defined create a MachineHealthCheck with the label `topology.cluster.x-k8s.io/deployment-name: <machine-deployment-topology-name>` as the selector and set the `clusterName` field from the cluster.
3. If `Cluster.spec.topology.controlPlane.machineHealthCheckClass` is set create a MachineHealthCheck with the label `cluster.x-k8s.io/control-plane` as the selector and set the `clusterName` field from the cluster.
2. If `ClusterClass.spec.machineHealthCheck` is NOT set:
1. For each `Cluster.spec.topology.workers.machineDeployments` with `ClusterClass.spec.workers.machineDeployments[i].machineDeploymentClass` defined create a MachineHealthCheck with the label `topology.cluster.x-k8s.io/deployment-name: <machine-deployment-topology-name>` as the selector and set the `clusterName` field from the cluster.
2. If `Cluster.spec.topology.controlPlane.machineHealthCheckClass` is set create a MachineHealthCheck with the label `cluster.x-k8s.io/control-plane` as the selector and set the `clusterName` field from the cluster.

**Note** `ClusterClass.spec.workers.machineDeployments[i].machineDeploymentClass` and `Cluster.spec.topology.controlPlane.machineHealthCheckClass` can not be set if `Cluster.spec.topology.workers.machineDeployments` is set.

Expand Down

0 comments on commit b1e509e

Please sign in to comment.