Make CAPI infra and bootstrap/controlplane provider optional and add related tests
What it does
This merge request enables one to use providers (infra and crontrol plane) which are not explicitley supported by the operator by making these providers optional.
- Explicitely supported providers are passed through CR fields (spec.Infrastructure or spec.ControlPlaneConfig.Provider) as before. Supported providers are currently:
- "openstack" maps to the Cluster API Provider OpenStack (capo), "vsphere" maps to the Cluster API Provider vSphere (capv), "docker" maps to the Cluster API Provider Docker (capd), "metal3" maps to the Cluster API Provider Metal3 (capm3).
- "kubeadm" for Kubeadm ("cabpk" CAPI provider), "rke2" for Rancher RKE2.
- Other ones are passed through presets. An example would be
apiVersion: unitsoperator.sylva/v1alpha1
kind: SylvaUnitsReleasePreset
metadata:
(..)
name: base-infra
annotations:
workload-cluster-operator.sylva-project.org/surp-base: "true"
spec:
(...)
valuesFrom:
- name: managed-workload-clusters-settings
type: ConfigMap
valuesKey: values
values:
cluster:
infra_provider: capo
bootstrap_provider: cabpkIn order to allow this feature, the present MR is
- Making the infrastructure field optional
- Making the bootstrap provider field optional
- Adding related tests
- API Tests showing that the providrers are realy optional
- E2E Tests showing that w/o providers passed in the CR nor in preset, the HelmRelease fails. The error message is taken from a real and local Openstack deployment w/o provider
- E2E Tests showing that w/o providers passed in the CR and with providers set in a preset, the HelmRelease is correctly deployed
References
Closes #62 (closed)
Edited by vladimir braquet