In order to onboard a new CAPI provider, the following steps are required.
- Create a provider fork in OpenShift github organization. Provider fork for reference - https://github.com/openshift/cluster-api-provider-azure/
- Remove all upstream OWNERS and replace with downstream OWNERS.
- Create vendor directory in provider repository.
- Create an
openshift/directory in the provider repository and make sure it includes:- A script for running unit tests, it's required because of issue with $HOME in CI container.
Dockerfile.openshiftthis Dockerfile will be used for downstream builds. Provider controller binary must be calledcluster-api-provider-$providername-controller-managerand be located in/bin/directory.
After provider fork is set up, you should onboard it to Openshift CI and make appropriate ART requests for downstream builds.
- Add your provider to
provider-list.yamllocated in root of the operator. For example:- name: aws type: InfrastructureProvider branch: release-4.11 # Openshift release branch to be used version: v1.3.0 # Version of the provider in your fork - Run
make assets - Include your provider image to
manifests/image-referencesandmanifests/0000_30_cluster-api_capi-operator_01_images.configmap.yaml
At this point your provider will have CRDs and RBAC resources automatically imported to the manifests/ directory and
managed by the CVO, all other resources will be imported to the assets directory and managed by the upstream operator.
If you wish to make development of your provider easier, you can include a public provider image to the dev-images.json.
Cluster API requires an infrastructure cluster object to be present. In order to support the provider, you need to infrastructure cluster reconciliation for your provider. See controllers/cluster/aws.go for reference. It's important to
note that the cluster must have externally managed annotation "cluster.x-k8s.io/managed-by"(clusterv1.ManagedByAnnotation)
and Status.Ready=true to indicate that cluster object is managed by this controller and not by the
CAPI infrastructure provider.