Introduce deployment of workload clusters with workload cluster operator

What does this MR do and why?

This MR introduces significant changes to enable the deployment of workload clusters using the workload cluster operator in a GitOps-driven approach. The changes include updates to CI/CD pipelines, configuration files, and scripts to support this new deployment model.

Key Changes

  • New GitOps configuration:

Added a new directory structure under environment-values/workload-clusters-using-operator to define configurations for workload clusters producing SylvaWorkloadCluster resources. Introduced base configurations, high-availability settings, and specific configurations for different infrastructure providers (currently only kubeadm-capo and rke2-capm3-virt) including kustomization files and values.

  • Script updates:

Updated apply-workload-cluster.sh to detect and handle GitOps deployment mode (using SylvaWorkloadCluster) along side with current deployment mode (using SylvaUnitsRelease).
Added functions to manage and wait for resources created by the workload cluster operator.

  • Pipeline enhancements:

Updated .gitlab/ci/deployments-base.yml and .gitlab/ci/templates-deployments.yml to support workload cluster deployments via operator.
Introduced logic to handle wc-operator deployment options for generating WC from operator, including selecting appropriate values files and paths.
Enhanced cleanup logic for workload clusters in CI scripts.

  • Other improvements:

Refactored existing configurations and scripts to ensure compatibility with the new GitOps approach.
Renamed and reorganized some files for better clarity and alignment with the new structure.

Part of: #3148

Needs :

Next Steps (to do in other MRs)

CI configuration

Below you can choose test deployment variants to run in this MR's CI.

Click to open to CI configuration

Legend:

Icon Meaning Available values
☁️ Infra Provider capd, capo, capm3
🚀 Bootstrap Provider kubeadm (alias kadm), rke2, okd, ck8s
🐧 Node OS ubuntu, suse, na, leapmicro
🛠️ Deployment Options light-deploy, dev-sources, ha, misc, maxsurge-0, logging, no-logging, cilium
🎬 Pipeline Scenarios Available scenario list and description
  • 🎬 preview ☁️ capd 🚀 kadm 🐧 ubuntu

  • 🎬 preview ☁️ capo 🚀 rke2 🐧 suse

  • 🎬 preview ☁️ capm3 🚀 rke2 🐧 ubuntu

  • ☁️ capd 🚀 kadm 🛠️ light-deploy 🐧 ubuntu

  • ☁️ capd 🚀 rke2 🛠️ light-deploy 🐧 suse

  • ☁️ capo 🚀 rke2 🐧 suse

  • ☁️ capo 🚀 rke2 🐧 leapmicro

  • ☁️ capo 🚀 kadm 🛠️ wc-operator 🎬wkld-k8s-upgrade 🐧 ubuntu

  • ☁️ capo 🚀 kadm 🛠️ wc-operator,dev-sources 🐧 suse

  • ☁️ capm3 🚀 rke2 🐧 suse

  • ☁️ capm3 🚀 kadm 🐧 ubuntu

  • ☁️ capm3 🚀 ck8s 🐧 ubuntu

  • ☁️ capm3 🚀 kadm 🎬 rolling-update-no-wkld 🛠️ ha,misc 🐧 ubuntu

  • ☁️ capm3 🚀 rke2 🎬 wkld-k8s-upgrade 🛠️ ha 🐧 suse

  • ☁️ capm3 🚀 kadm 🎬 rolling-update 🛠️ ha 🐧 ubuntu

  • ☁️ capm3 🚀 rke2 🎬 sylva-upgrade-from-1.5.x 🛠️ ha 🐧 suse

  • ☁️ capm3 🚀 rke2 🛠️ misc,ha 🐧 suse

  • ☁️ capm3 🚀 rke2 🎬 sylva-upgrade-from-1.5.x 🛠️ ha,misc 🐧 suse

  • ☁️ capm3 🚀 kadm 🎬 rolling-update 🛠️ ha 🐧 suse

  • ☁️ capm3 🚀 ck8s 🎬 rolling-update 🛠️ ha 🐧 ubuntu

  • ☁️ capm3 🚀 rke2|okd 🎬 no-update 🐧 ubuntu|na

  • ☁️ capm3 🚀 rke2 🛠️ wc-operator 🎬wkld-k8s-upgrade 🐧 suse

  • ☁️ capm3 🚀 rke2 🛠️ wc-operator,dev-sources 🐧 ubuntu

Global config for deployment pipelines

  • autorun pipelines
  • allow failure on pipelines
  • record sylvactl events

Notes:

  • Enabling autorun will make deployment pipelines to be run automatically without human interaction
  • Disabling allow failure will make deployment pipelines mandatory for pipeline success.
  • if both autorun and allow failure are disabled, deployment pipelines will need manual triggering but will be blocking the pipeline

Be aware: after configuration change, pipeline is not triggered automatically. Please run it manually (by clicking the run pipeline button in Pipelines tab) or push new code.

Edited by Médéric de Verdilhac

Merge request reports

Loading