-
Notifications
You must be signed in to change notification settings - Fork 113
Description
User Story
As a developer, I would like to reuse CAPI (Cluster API) e2e tests such as kcp_remediation test in CAPM3 (Cluster API Provider Metal3) however CAPI randomly generates the namespaces hosting the cluster in the BeforeEach of the test, and in CAPM3, the cluster expect the BMH resources to be pre-created that namespace. I want to find a solution that allows us to make BMH (BareMetalHost) resources available in the namespace that hosts the cluster.
Detailed Description
Currently, when reusing CAPI e2e test in CAPM3, we encounter difficulties because CAPI creates clusters in randomly generated namespaces. However, in CAPM3, we pre-create the BMH resources in a fixed namespace where we expect the cluster to be created. This misalignment prevents us from reusing CAPI e2e tests.
To overcome this challenge, we need to find a way to synchronize the creation of namespaces and BMH resources, ensuring that the required BMHs are available in the namespace hosting the cluster at the time of the creation of this cluster. This will enable us to reuse many CAPI tests in CAPM3 instead of reimplimenting them.
We have explored potential workarounds, the best option seems to include BMH resources in the cluster template in a new CI cluster template dedicated for testing only, but this approach is not be suitable for official cluster templates and could potentially confuse developers and users regarding the intended production usage of Metal3.
Additionally, creating BMHs for each test poses challenges in terms of time and resource consumption. We need to consider the trade-off between running tests in parallel, skipping inspection, or finding alternative solutions to maintain efficiency without compromising the integrity of tests.
Overall, we aim to find a solution that allows us to reuse CAPI tests in CAPM3, ensuring the availability of BMH resources in the namespace generated by CAPI tests when creating a cluster.
Anything else you would like to add:
I believe addressing this issue will improve the testability of CAPM3, reusing more e2e tests that are maintained by CAPI community. This enhancement will facilitate the adoption of new e2e test created on CAPI.
/kind feature
Metadata
Metadata
Assignees
Labels
Type
Projects
Status