cluster-api-provider-baremetal

module
v0.0.0-...-44569c6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2024 License: Apache-2.0

README

Cluster API Provider for Managed Bare Metal Hardware

This repository contains a Machine actuator implementation for the Kubernetes Cluster API.

For more information about this actuator and related repositories, see metal3.io.

Development Environment

API

See the API Documentation for details about the providerSpec API used with this cluster-api provider.

MachineSet Scaling

If you would like a MachineSet to be automatically scaled to the number of matching BareMetalHosts, annotate that MachineSet with key metal3.io/autoscale-to-hosts and any value.

When reconciling a MachineSet, the controller will count all of the BareMetalHosts that either:

  • match the MachineSet's Spec.Template.Spec.ProviderSpec.HostSelector and have a ConsumerRef that is nil
  • has a ConsumerRef that references a Machine that is part of the MachineSet

This ensures that in case a BareMetalHost has previously been consumed by a Machine, but either labels or selectors have since been changed, it will continue to get counted with the MachineSet that its Machine belongs to.

Machine Remediation

MachineHealthCheck Controller in Machine-API operator is checking Node's health. If you would like to remediate unhealthy Machines you should add the following to MachineHealthCheck CR:

annotations:
   machine.openshift.io/remediation-strategy: external-baremetal

Remediation is done by power-cycling the Host associated with the unhealthy Machine, using BMO reboot API

Remediation steps (triggered by the annotation mentioned above):

  1. Power off the host
  2. Add poweredOffForRemediation annotation to the unhealthy Machine
  3. Delete the node
  4. Power on the host
  5. Wait for the node the come up (by waiting for the node to be registered in the cluster)
  6. Remove poweredOffForRemediation annotation and the MAO's machine unhealthy annotation

Directories

Path Synopsis
cmd
pkg
apis
Package apis contains Kubernetes API groups.
Package apis contains Kubernetes API groups.
apis/baremetal
Package baremetal contains baremetal API versions
Package baremetal contains baremetal API versions
apis/baremetal/v1alpha1
Package v1alpha1 contains API Schema definitions for the baremetal v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openshift/cluster-api-provider-baremetal/pkg/apis/baremetal +k8s:defaulter-gen=TypeMeta +groupName=baremetal.cluster.k8s.io
Package v1alpha1 contains API Schema definitions for the baremetal v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/openshift/cluster-api-provider-baremetal/pkg/apis/baremetal +k8s:defaulter-gen=TypeMeta +groupName=baremetal.cluster.k8s.io
baremetal/mocks
Package baremetal_mocks is a generated GoMock package.
Package baremetal_mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL