{"id":18637299,"url":"https://github.com/openshift/machine-api-operator","last_synced_at":"2025-05-15T12:00:31.717Z","repository":{"id":37475597,"uuid":"141598983","full_name":"openshift/machine-api-operator","owner":"openshift","description":"Machine API operator","archived":false,"fork":false,"pushed_at":"2025-05-09T19:10:27.000Z","size":66074,"stargazers_count":174,"open_issues_count":6,"forks_count":214,"subscribers_count":19,"default_branch":"main","last_synced_at":"2025-05-09T19:43:05.293Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openshift.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-07-19T15:32:44.000Z","updated_at":"2025-05-09T18:35:47.000Z","dependencies_parsed_at":"2023-09-29T19:56:22.809Z","dependency_job_id":"93609f62-6e64-4df9-bd57-4fbe3411ae74","html_url":"https://github.com/openshift/machine-api-operator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fmachine-api-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fmachine-api-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fmachine-api-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openshift%2Fmachine-api-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openshift","download_url":"https://codeload.github.com/openshift/machine-api-operator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254337612,"owners_count":22054253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T05:35:01.758Z","updated_at":"2025-05-15T12:00:26.680Z","avatar_url":"https://github.com/openshift.png","language":"Go","readme":"# Machine API Operator\n\nThe Machine API Operator manages the lifecycle of specific purpose CRDs, controllers and RBAC objects that extend the Kubernetes API.\nThis allows to convey desired state of machines in a cluster in a declarative fashion.\n\nSee https://github.com/openshift/enhancements/tree/master/enhancements/machine-api for more details.\n\nHave a question? See our [Frequently Asked Questions](FAQ.md) for common inquiries.\n\n## Architecture\n\n![Machine API Operator overview](machine-api-operator.png)\n\n## CRDs\n\n- MachineSet\n- Machine\n- MachineHealthCheck\n\n## Controllers\n\n- MachineSet Controller\n\n  Ensure presence of expected number of replicas and a given provider config for a set of machines.\n\n- Machine Controller\n\n  Ensure that a provider instance is created for a Machine object in a given provider.\n\n  - [machine-api-provider-aws](https://github.com/openshift/machine-api-provider-aws)\n\n  - [machine-api-provider-gcp](https://github.com/openshift/machine-api-provider-gcp)\n\n  - [machine-api-provider-azure](https://github.com/openshift/machine-api-provider-azure)\n\n  - [cluster-api-provider-libvirt](https://github.com/openshift/cluster-api-provider-libvirt)\n\n  - [cluster-api-provider-openstack](https://github.com/openshift/cluster-api-provider-openstack)\n\n  - [cluster-api-provider-baremetal](https://github.com/openshift/cluster-api-provider-baremetal)\n  \n  - [cluster-api-provider-ibmcloud](https://github.com/openshift/cluster-api-provider-ibmcloud)\n\n- Nodelink Controller\n\n  Ensure machines have a nodeRef based on IPs or providerID matching.\n  Annotate nodes with a label containing the machine name.\n\n- MachineHealthCheck Controller\n\n  Ensure machines targeted by MachineHealthCheck objects satisfy a healthiness criteria or are remediated otherwise.\n\n## Creating machines\n\nYou can create a new machine by [applying a manifest representing an instance of the machine CRD](docs/examples/machine.yaml)\n\nThe `machine.openshift.io/cluster-api-cluster` label will be used by the controllers to lookup for the right cloud instance.\n\nYou can set other labels to provide a convenient way for users and consumers to retrieve groups of machines:\n```\nmachine.openshift.io/cluster-api-machine-role: worker\nmachine.openshift.io/cluster-api-machine-type: worker\n```\n\n## Dev\n\n- Generate code (if needed):\n\n  ```sh\n  $ make generate\n  ```\n\n- Build:\n\n  ```sh\n  $ make build\n  ```\n\n- Run:\n\n  Extract images.json to a file from\n  `install/0000_30_machine-api-operator_01_images.configmap.yaml` and run:\n\n  ```sh\n  $ ./bin/machine-api-operator start --kubeconfig ${HOME}/.kube/config --images-json=path/to/images.json\n  ```\n\n- Image:\n\n  ```\n  $ make image\n  ```\n\nThe Machine API Operator is designed to work in conjunction with the [Cluster Version Operator](https://github.com/openshift/cluster-version-operator).\nYou can see it in action by running an [OpenShift Cluster deployed by the Installer](https://github.com/openshift/installer).\n\nHowever you can run it in a vanilla Kubernetes cluster by precreating some assets:\n\n- Create a `openshift-machine-api` namespace\n- Create a [CRD Status definition](config/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml)\n- Create a [CRD Machine definition](install/0000_30_machine-api-operator_02_machine.crd.yaml)\n- Create a [CRD MachineSet definition](install/0000_30_machine-api-operator_03_machineset.crd.yaml)\n- Create a [Installer config](config/kubemark-config-infra.yaml)\n- Then you can run it as a [deployment](install/0000_30_machine-api-operator_11_deployment.yaml)\n- You should then be able to deploy a [machineSet](config/machineset.yaml) object\n\nFor more information see [hacking-guide](docs/dev/hacking-guide.md).\n\n## Machine API operator with Kubemark over Kubernetes\n\nINFO: For development and testing purposes only\n\n1. Deploy MAO over Kubernetes:\n  ```sh\n   $ kustomize build | kubectl apply -f -\n   ```\n\n2. Deploy [Kubemark actuator](https://github.com/openshift/cluster-api-provider-kubemark) prerequisities:\n   ```sh\n   $ kustomize build config | kubectl apply -f -\n   ```\n\n3. Create `cluster` `infrastructure.config.openshift.io` to tell the MAO to deploy `kubemark` provider:\n   ```yaml\n   apiVersion: apiextensions.k8s.io/v1beta1\n   kind: CustomResourceDefinition\n   metadata:\n     name: infrastructures.config.openshift.io\n   spec:\n     group: config.openshift.io\n     names:\n       kind: Infrastructure\n       listKind: InfrastructureList\n       plural: infrastructures\n       singular: infrastructure\n     scope: Cluster\n     versions:\n     - name: v1\n       served: true\n   storage: true\n   ---\n   apiVersion: config.openshift.io/v1\n   kind: Infrastructure\n   metadata:\n     name: cluster\n   status:\n     platform: kubemark\n   ```\n\n   The file is already present under `config/kubemark-config-infra.yaml` so it's sufficient to run:\n   ```sh\n   $ kubectl apply -f config/kubemark-config-infra.yaml\n   ```\n\n## OpenShift Bugzilla\n\nThe Bugzilla product for this repository is \"Cloud Compute\" under [OpenShift Container Platform](https://bugzilla.redhat.com/enter_bug.cgi?product=OpenShift%20Container%20Platform).\n\n## CI \u0026 tests\n\nRun unit test:\n\n```\n$ make test\n```\n\nRun 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:\n\n```\n$ make test-e2e\n```\n\nTests are located under [machine-api-operator repository][1] 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.\n\nCI configuration is stored under [openshift/release][2] repository and is split into 4 files:\n  - [cluster/ci/config/prow/plugins.yaml][3] - says which prow plugins are available and where job config is stored\n  - [ci-operator/config/openshift/machine-api-operator/master.yaml][4] - configuration for machine-api-operator component repository\n  - [ci-operator/jobs/openshift/machine-api-operator/openshift-machine-api-operator-master-presubmits.yaml][5] - prow jobs configuration for presubmits\n  - [ci-operator/jobs/openshift/machine-api-operator/openshift-machine-api-operator-master-postsubmits.yaml][6] - prow jobs configuration for postsubmits\n\nMore information about those files can be found in [ci-operator onboarding file][7].\n\n[1]: https://github.com/openshift/machine-api-operator\n[2]: https://github.com/openshift/release\n[3]: https://github.com/openshift/release/blob/master/cluster/ci/config/prow/plugins.yaml\n[4]: https://github.com/openshift/release/blob/master/ci-operator/config/openshift/machine-api-operator/openshift-machine-api-operator-master.yaml\n[5]: https://github.com/openshift/release/blob/master/ci-operator/jobs/openshift/machine-api-operator/openshift-machine-api-operator-master-presubmits.yaml\n[6]: https://github.com/openshift/release/blob/master/ci-operator/jobs/openshift/machine-api-operator/openshift-machine-api-operator-master-postsubmits.yaml\n[7]: https://github.com/openshift/ci-operator/blob/master/ONBOARD.md\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshift%2Fmachine-api-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenshift%2Fmachine-api-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenshift%2Fmachine-api-operator/lists"}