From a23a46176743669e242fa003a884e715218ebdb8 Mon Sep 17 00:00:00 2001 From: Andrew Karpow Date: Thu, 23 Apr 2026 10:08:13 -0400 Subject: [PATCH] Move external hypervisor CRD out of helm chart The hypervisor CRD is managed by openstack-hypervisor-operator and should not be deployed by this helm chart. Move it to hack/crds/ for envtest usage only. Update both controller and evacuation test suites to load CRDs from both the helm chart directory and hack/crds/. --- Makefile.maker.yaml | 1 + REUSE.toml | 1 + {charts/kvm-node-agent => hack}/crds/hypervisor-crd.yaml | 0 internal/controller/suite_test.go | 5 ++++- internal/evacuation/suite_test.go | 5 ++++- 5 files changed, 10 insertions(+), 2 deletions(-) rename {charts/kvm-node-agent => hack}/crds/hypervisor-crd.yaml (100%) diff --git a/Makefile.maker.yaml b/Makefile.maker.yaml index faa44e4..1bfb3b0 100644 --- a/Makefile.maker.yaml +++ b/Makefile.maker.yaml @@ -69,6 +69,7 @@ reuse: - PROJECT - config/** - charts/** + - hack/crds/** - internal/**/*_mock.go - build/** SPDX-FileCopyrightText: 'SAP SE or an SAP affiliate company and cobaltcore-dev contributors' diff --git a/REUSE.toml b/REUSE.toml index df1ecef..64ba36a 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -30,6 +30,7 @@ path = [ "PROJECT", "config/**", "charts/**", + "hack/crds/**", "internal/**/*_mock.go", "build/**", ] diff --git a/charts/kvm-node-agent/crds/hypervisor-crd.yaml b/hack/crds/hypervisor-crd.yaml similarity index 100% rename from charts/kvm-node-agent/crds/hypervisor-crd.yaml rename to hack/crds/hypervisor-crd.yaml diff --git a/internal/controller/suite_test.go b/internal/controller/suite_test.go index d12d5bf..55b3038 100644 --- a/internal/controller/suite_test.go +++ b/internal/controller/suite_test.go @@ -54,7 +54,10 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "charts", "kvm-node-agent", "crds")}, + CRDDirectoryPaths: []string{ + filepath.Join("..", "..", "charts", "kvm-node-agent", "crds"), + filepath.Join("..", "..", "hack", "crds"), + }, ErrorIfCRDPathMissing: true, // The BinaryAssetsDirectory is only required if you want to run the tests directly diff --git a/internal/evacuation/suite_test.go b/internal/evacuation/suite_test.go index b5a97bf..273773a 100644 --- a/internal/evacuation/suite_test.go +++ b/internal/evacuation/suite_test.go @@ -54,7 +54,10 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "charts", "kvm-node-agent", "crds")}, + CRDDirectoryPaths: []string{ + filepath.Join("..", "..", "charts", "kvm-node-agent", "crds"), + filepath.Join("..", "..", "hack", "crds"), + }, ErrorIfCRDPathMissing: true, // The BinaryAssetsDirectory is only required if you want to run the tests directly