Loading
CI: use the right workload cluster kubeconfig for both CLI and GitOps tests
What does this MR do and why?
Ensure the selected workload cluster kubeconfig for CI tests is correct whatever the workload cluster deployment method
- If the legacy way is used, the preferred namespace is the one without swct- prefix (hence the legacy one)
- Else, there is no such namespace (), only the one with swct- which is the fallback namespace
Another possibility would have been to modify the gitops deployed cluster definition to add a label and exclude the label in the label selector. It would have required to distinguish which mathod has been used to deploy workload cluster
Related reference(s)
Closes #4931 (closed)
Technical details
- The code has been factorized in a function refered when needed
- Listing the correct namespace is relying on a awk one liner instead of a simpler grep -v because grep -v is failing with set -e
Test coverage
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 | Deployment option list and description | |
| Pipeline Scenarios | Available scenario list and description | |
| Enabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
|
| Disabled units | Any available units name, by default apply to management and workload cluster. Can be prefixed by mgmt: or wkld: to be applied only to a specific cluster type |
|
| Target platform | Can be used to select specific deployment environment Available platform list and description | |
| Workload deployment workflow | legacy (default; direct workload-cluster apply) or gitops (deploy workload cluster through the GitOps-managed flow) |
|
| Pipeline control | autorun, manual or blocking. Can be used to override global config and start a deployment pipeline the required way |
-
☁️ capd🚀 kadm🐧 ubuntu🛠️ light-deploy -
☁️ capo🚀 kadm🐧 ubuntu🔴 thanos,loki,harbor,monitoring,kepler,neuvector,capm3,nvidia-gpu-operator -
☁️ capo🚀 kadm🐧 ubuntu🔀 gitops🔴 thanos,loki,harbor,monitoring,kepler,neuvector,capm3,nvidia-gpu-operator
Global config for deployment pipelines
- autorun pipelines
- allow failure on pipelines
- record sylvactl events
Notes:
- Enabling
autorunwill make deployment pipelines to be run automatically without human interaction - Disabling
allow failurewill make deployment pipelines mandatory for pipeline success. - if both
autorunandallow failureare 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 vladimir braquet