The Multiarch Manager Operator (MMO) operator aims to address problems and usability issues encountered when working with Openshift clusters with multi-architecture compute nodes.
The development work is still ongoing and there is no official, general available, release of it yet.
- Architecture aware Pod Placement: The pod placement operand aims to automate the
inspection of the container images, derive a set of architectures supported by a pod and use it to
automatically define strong predicates based on the
kubernetes.io/archlabel in the pod's nodeAffinity. This operand is based on the KEP-3521 and KEP-3838, as described in the Openshift EP introducing it. When a pod is created, the mutating webhook will add themultiarch.openshift.io/scheduling-gatescheduling gate, that will prevent the pod from being scheduled until the controller computes a predicated for thekubernetes.io/archlabel, adds it as node affinity requirement to the pod spec, and remove the scheduling gate.
The aim of this operator will be to run on any Kubernetes cluster, although the main focus of development and testing will be carried out on Openshift clusters.
# Multi-arch image build
make docker-buildx IMG=<some-registry>/multiarch-manager-operator:tag
# Single arch image build
make docker-build IMG=<some-registry>/multiarch-manager-operator:tag
# Local build
make buildIf you aim to use the multi-arch build and would avoid the deletion of the buildx instance, you can
create an empty .persistent-buildx file in the root of the repository.
touch .persistent-buildx
make docker-buildx IMG=<some-registry>/multiarch-manager-operator:tag# Deploy the operator on the cluster
make deploy IMG=<some-registry>/multiarch-manager-operator:tagTo delete the CRDs from the cluster:
make uninstallUnDeploy the controller from the cluster:
make undeployIf you are editing the API definitions, generate the manifests such as CRs or CRDs using:
make manifestsNOTE: Run make --help for more information on all potential make targets
More information can be found via the Kubebuilder Documentation
The following units are available as Makefile targets:
# Lint
make lint
# gosec (SAST)
make gosec
# vet
make vet
# goimports
make goimports
# gofmt
make fmt
# Run unit tests
make testAll the checks run on a containerized environment by default.
You can run them locally by setting the NO_DOCKER variable to 1:
NO_DOCKER=1 make testor adding the NO_DOCKER=1 row in the .env file.
See the dotenv.example file for other available settings.
See Openshift Enhancement Proposal.
// TODO(user): Add detailed information on how you would like others to contribute to this project
Copyright 2023 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.