CAPO upgrade to 0.10.3, with v1alpha8 fix

The primary goal of this MR is to upgrade CAPO to 0.10.3 to fix #1227 (closed).

This MR was prepared based on discussion and exploration with @feleouet to allow us to upgrade to CAPO 0.10.x (to fix #1227 (closed)), which is non-trivial because in Sylva 1.0.0 we used a custom build of intermediate version of CAPO, somewhere between 0.9.x and 0.10.x, to include an important fix, but we didn't realize that we would implicitly upgrade all CAPO resources to v1alpha8 and because v1alpha8 is not present anymore in the final 0.10.x, we can't upgrade to 0.10.x without first fixing our CAPO resources to have them be stored into v1alpha7 (which exists in 0.9.x and 0.10.x)

here is how this fix works :

  • we introduce the community kube-storage-version-migrator tool
  • we run a job that fixes the CRDs to indicate that the desired storage version is v1alpha7 (instead of v1alpha8) note that this does not change any CAPO resource, only the CRDs
  • (the capo unit won't reconcile in the background, because it's got a dependsOn on capo-v1alpha8-fix)
  • we install a kube-storage-version-migrator resource to tell that tool to migrate all CAPO resources to v1alpha7
  • we run another job to remove v1lapha8 from the status.storedVersions of the CAPO CRDs (this is necessary or else k8s will prevent us from installing the update of the CRD resource from CAPO 0.12.3 that does not include v1alpha8 anymore)
  • the capo unit will then reconcile and install CAPO 0.10.x, including the new CRDs

these units will be removed when not relevant anymore (e.g in the sylva release following the one in which they'll have been released)

💡 This MR will be more easily reviewed one commit at a time

related issue #1227 (closed)

Edited by Thomas Morin

Merge request reports

Loading