{{- $clustername := .Values.cluster.name -}} {{- range .Values.nodepools }} {{- if eq .controlplane true }} --- apiVersion: cluster.x-k8s.io/v1beta1 kind: MachineHealthCheck metadata: name: {{ $clustername }}-controlplane-healthcheck namespace: fleet-default spec: clusterName: {{ $clustername }} selector: matchLabels: cluster.x-k8s.io/control-plane: 'true' cluster.x-k8s.io/cluster-name: {{ $clustername }} # SAFETY FUSE: # "40%" prevents a 1-node CP from trying to self-heal (which would kill it). # If you have 3 nodes, this allows 1 to fail. maxUnhealthy: 40% # TIMEOUTS (v1beta1 uses duration strings like "10m", not integers) nodeStartupTimeout: 600s unhealthyConditions: - type: Ready status: Unknown timeout: 300s - type: Ready status: "False" timeout: 300s {{- end }} {{- end }}