Introduce bootstrap and cleanup commands

Introduce bootstrap and cleanup commands that

  • Deploy and configure a kind cluster
  • Install flux, external-secrets-operator and sylva-units-operator in that cluster

The look and feel is similar to what we have now, but without cloning sylva-core and pulling sylva-toolbox:

$ ./sylvactl bootstrap 
Creating cluster "sylva" ...
 ✓ Ensuring node image (kindest/node:v1.32.2) 🖼
 ✓ Preparing nodes 📦  
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹 
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
 ✓ Installing core controllers 📥
 ✓ Waiting for controllers to be ready ⏳
 ✓ Bootstrap cluster is ready!

All kind configuration options that we're currently using in tools/kind/bootstrap-cluster.sh have not yet been implemented (I've just added ports mapping as an example), but this can easily be achieved later on.

The intent of this initial MR is to provide a simple/convenient/unified way to bootstrap all the components required to perform end-to-end tests in sylva-units-operator and workload-cluster-operator projects as explained in sylva-units-operator#39 (closed)

In order to ensure that these manifests remain in sync with sylva-core (in terms of versions and configuration), we should reuse the same kustomisation to build these manifests. For that purpose I've raised a related MR to adapt flux-system kustomizations: sylva-projects/sylva-core!4612 (merged)

In order to avoid having to maintain the manifests in git, the controllers manifests are only included at build-time. In order to keep the versions and configuration in sync, the manifests are built from sylva-core/kustomize-units (except for eso for now, as we're using an helmrelease)

Relates-to #79 (not closing it since it isn't yet usable in bootstrap)

Edited by Francois Eleouet

Merge request reports

Loading