move duplicate code for testing plugins using operator to
operator module
replace the code for deploying operator webhook in operator module
with the code using utils.Kubectl to make simple for undeploying
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
k8s 1.27.x triggers build errors on controller-runtime 0.14.x
so we will need to update to 0.15.x at the same time.
Changes include:
* k8s e2e framework moved to use Ginkgo context so we add
test context to all our test nodes.
* adapt Ginkgo parameter modifications.
* adapt SGX admissionwebhook to InjectDecoder removal.
* adapt deviceplugins and FPGA CRDs to controller-runtime
API changes.
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
'AfterEach' was made to prevent the failure of a plugin pod that
occurs due to 'BeforeEach' that deploys a plugin pod. If it is
inside a 'Context' it will still occur the same problem. Since
current e2e tests have one 'Context' in general, problems were not
visible, but it still have problem in logic and would cause the
same problems if more 'Contexts' are made. So, this commit fixes
'AfterEach' to be in the correct location.
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Though namespace is deleted after each It(), it does not ensure
that it is deleted. Because of this reason, device plugin did not
get deleted before the next one is deployed. This can cause a
temporary crash of the new plugin and sometimes becomes the cause
of e2e test's failure. This commit fixes it by ensuring previous
device plugin gets deleted after each run.
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>
Structure is as follows:
Describe("DSA plugin")
Describe("without using operator")
BeforeEach("deploys plugin")
Context("When device resources are available")
BeforeEach("checks if resources are available")
It("runs a pod requesting resources")
Describe("with using operator")
It("deploys with operator")
Signed-off-by: Hyeongju Johannes Lee <hyeongju.lee@intel.com>