NOTE: this is a work in progress. The project is looking for more contributors.
Cluster API Add-on Provider for Fleet (CAAPF) is a Cluster API (CAPI) provider that provides integration with Fleet to enable the easy deployment of applications to a CAPI provisioned cluster.
It provides the following functionality:
- Addon provider automatically installs
Fleet
in your management cluster. - The provider will register a newly provisioned CAPI cluster with
Fleet
so that applications can be automatically deployed to the created cluster via GitOps,Bundle
orHelmApp
. - The provider will automatically create a Fleet Cluster Group for every CAPI ClusterClass. This enables you to deploy the same applications to all clusters created from the same ClusterClass.
CAPI
Cluster
,ControlPlane
resources are automatically added to theFleet
Cluster
resource templates, allowing to perform per-cluster configuration templating forHelm
based installations.
You can refer to the provider documentation here.
You can install production instance of CAAPF
in your cluster with CAPI Operator
.
kubectl apply -f https://github.com/jetstack/cert-manager/releases/latest/download/cert-manager.yaml
helm repo add capi-operator https://kubernetes-sigs.github.io/cluster-api-operator
helm repo update
helm upgrade --install capi-operator capi-operator/cluster-api-operator --create-namespace -n capi-operator-system --set infrastructure=docker --set addon=fleet
# Apply CAAPF URL patch
kubectl patch addonprovider fleet -n fleet-addon-system --type='merge' -p '{"spec": {"fetchConfig": {"url": "https://github.com/rancher-sandbox/cluster-api-addon-provider-fleet/releases/latest/addon-components.yaml"}}}'
By default CAAPF
expects your cluster to have fleet pre-installed and configured, but it can manage installation via FleetAddonConfig
:
apiversion: addons.cluster.x-k8s.io/v1alpha1
kind: FleetAddonConfig
metadata:
name: fleet-addon-config
spec:
config:
server:
inferLocal: true # Uses default `kuberenetes` endpoint and secret for APIServerURL configuration
install:
version: v0.12.0-alpha.14 # We will install alpha for helmapp support
You can also define your API
server URL
and certificates ConfigMap
or Secret
, which has a ca.crt
data key:
apiversion: addons.cluster.x-k8s.io/v1alpha1
kind: FleetAddonConfig
metadata:
name: fleet-addon-config
spec:
config:
server:
apiServerUrl: "https://public-url.io"
apiServerCaConfigRef:
apiVersion: v1
kind: ConfigMap
name: kube-root-ca.crt
namespace: default
install:
followLatest: true # Installs current latest version of fleet from https://github.com/rancher/fleet-helm-charts
You can get in contact with us via the #cluster-api channel on the Rancher Users Slack.