/cluster-capi-operator

Openshift Cluster CAPI Operator

Primary LanguageGoApache License 2.0Apache-2.0

Cluster CAPI Operator

The Cluster CAPI Operator manages the installation and lifecycle of the Cluster API Components on Openshift clusters.

Note: This operator only runs on TechPreview clusters.

Managed resources

  • CoreProvider - an object that represents core Cluster API and is later reconciled by the upstream operator.
  • InfrastructureProvider - an object that represents Cluster API infrastructure provider(AWS, GCP, Azure, etc.) and is later reconciled by the upstream operator.
  • Cluster - CAPI Cluster CR that represents current cluster, it is treated as management and workload cluster at the same time.
  • InfrastructureCluster - CAPI Infrastructure Cluster CR that represents the infrastructure cluster.
  • Worker userdata secret - a secret that contains ignition configuration to be used by the worker nodes.
  • Kubeconfig secret - a secret that contains kubeconfig for the cluster.

Controllers

Controllers design can be found here:

New infrastructure provider onboarding

Steps for infrastructure provider onboarding are documented here.

Running operator locally

Downscale cluster version operator deployment;

kubectl scale deployment cluster-version-operator -nopenshift-cluster-version --replicas=0

Downscale cluster CAPI operator deployment:

kubectl scale deployment cluster-capi-operator -nopenshift-cluster-api --replicas=0

Compile and run operator:

make build && ./bin/cluster-capi-operator

Unit tests

make test

Enabling technical preview featureset

kubectl edit featuregate

Set the spec to the following

spec:
  featureSet: TechPreviewNoUpgrade