Skip to content

Commit 9946451

Browse files
committed
1 parent cefd711 commit 9946451

File tree

52 files changed

+3081
-1165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3081
-1165
lines changed

.github/workflows/test-e2e.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ jobs:
2626
- name: Verify kind installation
2727
run: kind version
2828

29-
- name: Create kind cluster
30-
run: kind create cluster
31-
3229
- name: Running Test e2e
3330
run: |
3431
go mod tidy

Makefile

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ARCH ?= arm64
1919

2020
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
2121
CRD_OPTIONS ?= crd:generateEmbeddedObjectMeta=true,allowDangerousTypes=true
22-
OPERATOR_SDK_VERSION ?= v1.40.0
22+
OPERATOR_SDK_VERSION ?= v1.41.1
2323

2424
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
2525
ifeq (,$(shell go env GOBIN))
@@ -79,7 +79,7 @@ test: manifests generate fmt vet setup-envtest ## Run tests.
7979
# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
8080
.PHONY: test-e2e # Run the e2e tests against a Kind k8s instance that is spun up.
8181
test-e2e:
82-
go test ./test/e2e/ -v -ginkgo.v
82+
go test ./tests/e2e/ -v -ginkgo.v
8383

8484
.PHONY: lint
8585
lint: golangci-lint ## Run golangci-lint linter
@@ -190,12 +190,12 @@ KIND = $(LOCALBIN)/kind
190190

191191
## Tool Versions
192192
KUSTOMIZE_VERSION ?= v5.6.0
193-
CONTROLLER_TOOLS_VERSION ?= v0.17.2
193+
CONTROLLER_TOOLS_VERSION ?= v0.18.0
194194
#ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20)
195195
ENVTEST_VERSION ?= $(shell go list -m -f "{{ .Version }}" sigs.k8s.io/controller-runtime | awk -F'[v.]' '{printf "release-%d.%d", $$2, $$3}')
196196
#ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31)
197197
ENVTEST_K8S_VERSION ?= $(shell go list -m -f "{{ .Version }}" k8s.io/api | awk -F'[v.]' '{printf "1.%d", $$3}')
198-
GOLANGCI_LINT_VERSION ?= v2.0.1
198+
GOLANGCI_LINT_VERSION ?= v2.1.0
199199
GINKGO_VERSION ?= v2.23.4
200200
CODE_GENERATOR_VERSION ?= v0.32.3
201201
KIND_VERSION ?= v0.17.0
@@ -238,6 +238,26 @@ code-generator: $(CODE_GENERATOR) ## Download code-generator locally if necessar
238238
$(CODE_GENERATOR): $(LOCALBIN)
239239
$(call go-install-tool,$(CODE_GENERATOR),k8s.io/code-generator,$(CODE_GENERATOR_VERSION))
240240

241+
KIND_CLUSTER ?= fluent-operator-test-e2e
242+
243+
.PHONY: setup-test-e2e
244+
setup-test-e2e: ## Set up a Kind cluster for e2e tests if it does not exist
245+
@command -v $(KIND) >/dev/null 2>&1 || { \
246+
echo "Kind is not installed. Please install Kind manually."; \
247+
exit 1; \
248+
}
249+
@case "$$($(KIND) get clusters)" in \
250+
*"$(KIND_CLUSTER)"*) \
251+
echo "Kind cluster '$(KIND_CLUSTER)' already exists. Skipping creation." ;; \
252+
*) \
253+
echo "Creating Kind cluster '$(KIND_CLUSTER)'..."; \
254+
$(KIND) create cluster --name $(KIND_CLUSTER) ;; \
255+
esac
256+
257+
.PHONY: cleanup-test-e2e
258+
cleanup-test-e2e:
259+
$(KIND) delete cluster --name $(KIND_CLUSTER)
260+
241261
.PHONY: kind
242262
kind: $(KIND) ## Download code-generator locally if necessary.
243263
$(KIND): $(LOCALBIN)

PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
domain: fluent.io
22
layout:
3-
- go.kubebuilder.io/v3
3+
- go.kubebuilder.io/v4
44
multigroup: true
55
projectName: fluent-operator
66
repo: github.com/fluent/fluent-operator

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfilters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: clusterfilters.fluentbit.fluent.io
88
spec:
99
group: fluentbit.fluent.io

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterfluentbitconfigs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: clusterfluentbitconfigs.fluentbit.fluent.io
88
spec:
99
group: fluentbit.fluent.io

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterinputs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: clusterinputs.fluentbit.fluent.io
88
spec:
99
group: fluentbit.fluent.io

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clustermultilineparsers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: clustermultilineparsers.fluentbit.fluent.io
88
spec:
99
group: fluentbit.fluent.io

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusteroutputs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: clusteroutputs.fluentbit.fluent.io
88
spec:
99
group: fluentbit.fluent.io

charts/fluent-operator/charts/fluent-bit-crds/crds/fluentbit.fluent.io_clusterparsers.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.15.0
6+
controller-gen.kubebuilder.io/version: v0.18.0
77
name: clusterparsers.fluentbit.fluent.io
88
spec:
99
group: fluentbit.fluent.io

0 commit comments

Comments
 (0)