mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 10:49:15 +00:00
Add Gateway API CRDs to controller test data (#340)
The PR #335 is adding controller tests for the HTTP route which means it needs the CRDs. So simplify future testing work we will vendor the CRDs from the release inside of the testdata directory. This is setup so that changes to the GW API version will force generate to be run again. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated the generated Gateway API artifacts used in the build pipeline to ensure the latest `standard-install.yaml` content is bundled. * Kept the bundled Gateway API version synchronized automatically by deriving it from the project’s module version and regenerating the asset when dependencies change. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -15,7 +15,7 @@ IMG_TAG ?= dev
|
|||||||
IMG_REF := $(IMG_REGISTRY)/$(IMG_REPOSITORY):$(IMG_TAG)
|
IMG_REF := $(IMG_REGISTRY)/$(IMG_REPOSITORY):$(IMG_TAG)
|
||||||
|
|
||||||
.PHONY: generate
|
.PHONY: generate
|
||||||
generate: api/v1/zz_generated.deepcopy.go api/v1alpha1/zz_generated.deepcopy.go pkg/applyconfigurations config/crd/bases charts/netbird-operator/crds docs/api-reference.md
|
generate: api/v1/zz_generated.deepcopy.go api/v1alpha1/zz_generated.deepcopy.go pkg/applyconfigurations config/crd/bases charts/netbird-operator/crds docs/api-reference.md internal/controller/testdata/crd/gateway-api.yaml
|
||||||
|
|
||||||
api/v1/zz_generated.deepcopy.go api/v1alpha1/zz_generated.deepcopy.go: $(shell find api -not -name 'zz_generated*') hack/boilerplate.go.txt
|
api/v1/zz_generated.deepcopy.go api/v1alpha1/zz_generated.deepcopy.go: $(shell find api -not -name 'zz_generated*') hack/boilerplate.go.txt
|
||||||
@go tool controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
|
@go tool controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
|
||||||
@@ -36,6 +36,10 @@ charts/netbird-operator/crds: $(GENERATED_CRDS)
|
|||||||
docs/api-reference.md: $(shell find api) docs/.crd-ref-docs.yaml
|
docs/api-reference.md: $(shell find api) docs/.crd-ref-docs.yaml
|
||||||
@go tool crd-ref-docs --log-level error --output-path docs/api-reference.md --renderer markdown --source-path api/v1alpha1 --config docs/.crd-ref-docs.yaml
|
@go tool crd-ref-docs --log-level error --output-path docs/api-reference.md --renderer markdown --source-path api/v1alpha1 --config docs/.crd-ref-docs.yaml
|
||||||
|
|
||||||
|
GATEWAY_API_VERSION = $(shell go list -m -f '{{.Version}}' sigs.k8s.io/gateway-api)
|
||||||
|
internal/controller/testdata/crd/gateway-api.yaml: go.mod
|
||||||
|
@curl -L https://github.com/kubernetes-sigs/gateway-api/releases/download/$(GATEWAY_API_VERSION)/standard-install.yaml -o internal/controller/testdata/crd/gateway-api.yaml
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint:
|
lint:
|
||||||
@golangci-lint run ./...
|
@golangci-lint run ./...
|
||||||
|
|||||||
+17527
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user