Skip to content

Commit cf97b10

Browse files
committed
HYPERFLEET-1406 - feat: Define the HyperFleetConfig CRD (v1alpha1)
1 parent 921cb47 commit cf97b10

17 files changed

Lines changed: 1172 additions & 115 deletions

Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# GOTOOLCHAIN pins the Go toolchain for all build/generate/test targets.
2+
# The tooling module (tools/go.mod) requires Go >= 1.26, while the root module
3+
# keeps its language level at `go 1.24` so the pinned golangci-lint (built with
4+
# go1.24) still accepts go.mod. Forcing one toolchain here — rather than a
5+
# go.mod `toolchain` directive — avoids GOTOOLCHAIN=auto switching mid-build,
6+
# which breaks coverage ("go: no such tool covdata"). go1.26.5 is the first
7+
# release carrying the fixes for CVE-2026-39822 and CVE-2026-42505.
8+
export GOTOOLCHAIN ?= go1.26.5
9+
110
# VERSION defines the project version for the bundle.
211
# Update this value when you upgrade the version of your project.
312
# To re-generate a bundle for another specific version without changing the standard setup, you can:
@@ -131,7 +140,11 @@ KIND_CLUSTER ?= hyperfleet-operator-test-e2e
131140

132141
.PHONY: test
133142
test: manifests generate fmt vet ## Run tests.
134-
KUBEBUILDER_ASSETS="$(shell $(SETUP_ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out
143+
# Resolve envtest assets in the recipe shell (via $$(...)) rather than make's
144+
# $(shell ...): the latter runs at parse time and does not inherit the
145+
# exported GOTOOLCHAIN, so setup-envtest (a tools/go.mod tool needing Go 1.26)
146+
# would run under the wrong toolchain and yield an empty KUBEBUILDER_ASSETS.
147+
KUBEBUILDER_ASSETS="$$($(SETUP_ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out
135148

136149
.PHONY: setup-test-e2e
137150
setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist

PROJECT

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ repo: github.com/openshift-hyperfleet/hyperfleet-operator
1313
resources:
1414
- api:
1515
crdVersion: v1
16-
namespaced: true
16+
namespaced: false
1717
controller: true
1818
domain: redhat.com
1919
group: hyperfleet
2020
kind: HyperFleetConfig
21-
path: github.com/openshift-hyperfleet/hyperfleet-operator/api/v1alpha
22-
version: v1alpha
21+
path: github.com/openshift-hyperfleet/hyperfleet-operator/api/v1alpha1
22+
version: v1alpha1
2323
version: "3"

api/v1alpha/hyperfleetconfig_types.go

Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// Package v1alpha contains API Schema definitions for the hyperfleet v1alpha API group.
17+
// Package v1alpha1 contains API Schema definitions for the hyperfleet v1alpha1 API group.
1818
// +kubebuilder:object:generate=true
1919
// +groupName=hyperfleet.redhat.com
20-
package v1alpha
20+
package v1alpha1
2121

2222
import (
2323
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -26,7 +26,7 @@ import (
2626

2727
var (
2828
// GroupVersion is group version used to register these objects.
29-
GroupVersion = schema.GroupVersion{Group: "hyperfleet.redhat.com", Version: "v1alpha"}
29+
GroupVersion = schema.GroupVersion{Group: "hyperfleet.redhat.com", Version: "v1alpha1"}
3030

3131
// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
3232
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

0 commit comments

Comments
 (0)