XFS storage classes, allow per-provisioner settings
This relates to #4740 (closed)
What was introduced in !9285 (merged) isn't functional, at least for some provisioners.
Context: depending on the provisioner, the key under StorageClass.parameters to use to control the filesystem type may differ (some can't have the two fstype and csi.storage.k8s.io/fstype parameters both set).
This MR:
- changes the behavior:
- use
fsTypeif this is what the original StorageClass was using - use
csi.storage.k8s.io/fstypeif this is what the original StorageClass was using - look what to use in a per-provisioner map as fallback
- because at this time I'm not sure of which provisioner needs what, in particular for provisioners which aren't testable in CI (e.g. vSphere), I made the choice of making this mapping easily configurable via values; to achieve this and still keep the ability to easily test this policy with
kubectl apply -k, the per-provisioner mapping is stored in a ConfigMap
- because at this time I'm not sure of which provisioner needs what, in particular for provisioners which aren't testable in CI (e.g. vSphere), I made the choice of making this mapping easily configurable via values; to achieve this and still keep the ability to easily test this policy with
- given the change above, it does not really make sense to have special code to exempt some provisioners from this policy:
- a provisioner not supporting a filesystem choice will not have
fsType/csi.storage.k8s.io/fstypein the first place and will implicitly be exempted - exempting a provisioner which would have support for filesystem choice is feasible by providing empty parameters for this provisioner in the per-provisioner map
- a provisioner not supporting a filesystem choice will not have
- use
- adds a pytest to have proper testing that the produced storageclasses are functional
Test results
In the pipelines of this MR:
tests/storage/test_xfs_pvc.py::test_xfs_storage_classes SUBPASSED(storage_class='cinder-ceph-ssd-xfs') [ 46%]https://gitlab.com/sylva-projects/sylva-core/-/jobs/16898640789#L258
tests/storage/test_xfs_pvc.py::test_xfs_storage_classes SUBPASSED(storage_class='longhorn-xfs') [ 46%]
tests/storage/test_xfs_pvc.py::test_xfs_storage_classes SUBPASSED(storage_class='single-replica-storageclass-xfs') [ 46%]
tests/storage/test_xfs_pvc.py::test_xfs_storage_classes SUBPASSED(storage_class='two-replicas-storageclass-xfs') [ 46%]https://gitlab.com/sylva-projects/sylva-core/-/jobs/16898641322#L205
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 | |
| Pipeline control | autorun, manual or blocking. Can be used to override global config and start a deployment pipeline the required way |
-
🎬 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🎬 no-wkld -
☁️ capo🚀 rke2🐧 leapmicro -
☁️ capo🚀 kadm🐧 ubuntu -
☁️ capo🚀 kadm🐧 ubuntu🟢 neuvector,mgmt:harbor -
☁️ capo🚀 rke2🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capo🚀 kadm🎬 wkld-k8s-upgrade🐧 ubuntu -
☁️ capo🚀 rke2🎬 rolling-update-no-wkld🛠️ ha🐧 suse -
☁️ capo🚀 rke2🎬 sylva-upgrade🛠️ ha🐧 ubuntu -
☁️ capo🚀 rke2🎬 sylva-upgrade-from-1.6.x🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2🛠️ ha,misc🐧 ubuntu -
☁️ capo🚀 rke2|okd🎬 no-update🐧 ubuntu|na -
☁️ capo🚀 rke2🛠️ misc🐧 ubuntu🟢 mgmt:harbor🔴 neuvector -
☁️ capo🚀 rke2🛠️ ha,misc,openbao🐧 suse -
☁️ capo🚀 rke2🐧 suse🎬 upgrade-from-prev-tag -
☁️ capm3🚀 rke2🐧 suse🎬 no-wkld -
☁️ capm3🚀 kadm🐧 ubuntu -
☁️ capm3🚀 rke2🛠️ external-openbao-no-tls🐧 ubuntu -
☁️ capm3🚀 rke2🛠️ external-openbao🐧 suse -
☁️ capm3🚀 kadm🛠️ external-openbao,openbao-namespace🐧 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🎬 upgrade-from-prev-release-branch🛠️ ha🐧 suse -
☁️ capm3🚀 rke2🛠️ misc,ha🐧 suse -
☁️ capm3🚀 rke2🎬 sylva-upgrade🛠️ ha,misc🐧 suse -
☁️ capm3🚀 kadm🎬 rolling-update🛠️ ha🐧 suse -
☁️ capm3🚀 ck8s🎬 rolling-update🛠️ ha🐧 ubuntu -
☁️ capm3🚀 rke2|okd🎬 no-update🐧 ubuntu|na -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-from-release-1.5 -
☁️ capm3🚀 rke2🐧 suse🎬 upgrade-to-main
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.