kudobuilder / kuttl

KUbernetes Test TooL (kuttl)
https://kuttl.dev
Apache License 2.0
672 stars 86 forks source link

Support lazy-loading of Kubeconfig in the Test Steps #539

Closed kumar-mallikarjuna closed 3 months ago

kumar-mallikarjuna commented 3 months ago

What would you like to be added: Enable Kuttl to load the Kubeconfig for the test-step when the test runs.

Why is this needed: Currently, Kuttl creates clients for each Test Step when the Test Case starts running. Although this allows early detection of erroneous Kubeconfigs in the Steps, this prevents lazy-loading of Kubeconfigs.

We have a use-case where the Kubeconfig for a Test Step is "created by an earlier Test Step." Because the Kubeconfig doesn't exist before the older Test Step is completed, the Test Case itself fails.