Machine API Operator
The Machine API Operator manages the lifecycle of specific purpose CRDs, controllers and RBAC objects that extend the Kubernetes API.
This allows to convey desired state of machines in a cluster in a declarative fashion.
Architecture
CRDs
- MachineSet
- Machine
- Cluster
- MachineHealthCheck
Controllers
Cluster API controllers
-
MachineSet Controller
- Reconciles desired state for MachineSets by ensuring presence of specified number of replicas and config for a set of machines.
-
Machine Controller
-
Node Controller
- Reconciles desired state of machines by matching IP addresses of machine objects with IP addresses of node objects. Annotating node with a special label containing machine name that the cluster-api node controller interprets and sets corresponding nodeRef field of each relevant machine.
Nodelink controller
$ make nodelink-controller
Machine healthcheck controller
Dev
The Machine API Operator is designed to work in conjunction with the Cluster Version Operator.
You can see it in action by running an OpenShift Cluster deployed by the Installer.
However you can run it in a vanilla Kubernetes cluster by precreating some assets:
CI & tests
Run unit test:
$ make test
Run e2e-aws-operator tests. This tests assume that a cluster deployed by the Installer is up and running and a KUBECONFIG
environment variable is set:
$ make test-e2e
Tests are located under machine-api-operator repository and executed in prow CI system. A link to failing tests is published as a comment in PR by @openshift-ci-robot
. Current test status for all OpenShift components can be found in https://deck-ci.svc.ci.openshift.org.
CI configuration is stored under openshift/release repository and is split into 4 files:
More information about those files can be found in ci-operator onboarding file.