Skip to content

Commit d233599

Browse files
committed
fix e2e - kind
1 parent cc3813a commit d233599

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

.mk/development.mk

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,32 +69,32 @@ undeploy-netflow-simulator: ## Undeploy netflow simulator
6969
##@ kind
7070

7171
.PHONY: create-kind-cluster
72-
create-kind-cluster: $(KIND) ## Create cluster
73-
$(KIND) create cluster --name $(KIND_CLUSTER_NAME) --config contrib/kubernetes/kind/kind.config.yaml
72+
create-kind-cluster: prereqs-kind ## Create cluster
73+
kind create cluster --name $(KIND_CLUSTER_NAME) --config contrib/kubernetes/kind/kind.config.yaml
7474
kubectl cluster-info --context kind-kind
7575

7676
.PHONY: delete-kind-cluster
77-
delete-kind-cluster: $(KIND) ## Delete cluster
78-
$(KIND) delete cluster --name $(KIND_CLUSTER_NAME)
77+
delete-kind-cluster: prereqs-kind ## Delete cluster
78+
kind delete cluster --name $(KIND_CLUSTER_NAME)
7979

8080
.PHONY: kind-load-image
8181
kind-load-image: ## Load image to kind
8282
ifeq ($(OCI_BIN),$(shell which docker 2>/dev/null))
8383
# This is an optimization for docker provider. "kind load docker-image" can load an image directly from docker's
8484
# local registry. For other providers (i.e. podman), we must use "kind load image-archive" instead.
85-
$(KIND) load --name $(KIND_CLUSTER_NAME) docker-image $(IMAGE)-${GOARCH}
85+
kind load --name $(KIND_CLUSTER_NAME) docker-image $(IMAGE)-${GOARCH}
8686
else
8787
$(eval tmpfile="/tmp/flp.tar")
8888
-rm $(tmpfile)
8989
$(OCI_BIN) save $(IMAGE)-$(GOARCH) -o $(tmpfile)
90-
$(KIND) load --name $(KIND_CLUSTER_NAME) image-archive $(tmpfile)
90+
kind load --name $(KIND_CLUSTER_NAME) image-archive $(tmpfile)
9191
-rm $(tmpfile)
9292
endif
9393

9494
##@ metrics
9595

9696
.PHONY: generate-configuration
97-
generate-configuration: $(KIND) ## Generate metrics configuration
97+
generate-configuration: prereqs-kind ## Generate metrics configuration
9898
go build "${CMD_DIR}${CG_BIN_FILE}"
9999
./${CG_BIN_FILE} --log-level debug --srcFolder network_definitions \
100100
--destConfFile $(FLP_CONF_FILE) \
@@ -104,19 +104,19 @@ generate-configuration: $(KIND) ## Generate metrics configuration
104104
##@ End2End
105105

106106
.PHONY: local-deployments-deploy
107-
local-deployments-deploy: $(KIND) deploy-prometheus deploy-loki deploy-grafana build-image kind-load-image deploy deploy-netflow-simulator
107+
local-deployments-deploy: prereqs-kind deploy-prometheus deploy-loki deploy-grafana build-image kind-load-image deploy deploy-netflow-simulator
108108
kubectl get pods
109109
kubectl rollout status -w deployment/flowlogs-pipeline
110110
kubectl logs -l app=flowlogs-pipeline
111111

112112
.PHONY: local-deploy
113-
local-deploy: $(KIND) local-cleanup create-kind-cluster local-deployments-deploy ## Deploy locally on kind (with simulated flowlogs)
113+
local-deploy: prereqs-kind local-cleanup create-kind-cluster local-deployments-deploy ## Deploy locally on kind (with simulated flowlogs)
114114

115115
.PHONY: local-deployments-cleanup
116-
local-deployments-cleanup: $(KIND) undeploy-netflow-simulator undeploy undeploy-grafana undeploy-loki undeploy-prometheus
116+
local-deployments-cleanup: prereqs-kind undeploy-netflow-simulator undeploy undeploy-grafana undeploy-loki undeploy-prometheus
117117

118118
.PHONY: local-cleanup
119-
local-cleanup: $(KIND) local-deployments-cleanup delete-kind-cluster ## Undeploy from local kind
119+
local-cleanup: prereqs-kind local-deployments-cleanup delete-kind-cluster ## Undeploy from local kind
120120

121121
.PHONY: local-redeploy
122122
local-redeploy: local-deployments-cleanup local-deployments-deploy ## Redeploy locally (on current kind)

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ifneq ($(CLEAN_BUILD),)
3838
LDFLAGS ?= -X 'main.buildVersion=${VERSION}-${BUILD_SHA}' -X 'main.buildDate=${BUILD_DATE}'
3939
endif
4040

41-
GOLANGCI_LINT_VERSION = v1.61.0
41+
GOLANGCI_LINT_VERSION = v1.56.2
4242

4343
FLP_BIN_FILE=flowlogs-pipeline
4444
CG_BIN_FILE=confgenerator
@@ -94,7 +94,7 @@ prereqs: ## Check if prerequisites are met, and install missing dependencies
9494
.PHONY: prereqs-kind
9595
prereqs-kind: ## Check if prerequisites are met for running kind, and install missing dependencies
9696
@echo "### Checking if KIND prerequisites are met, and installing missing dependencies"
97-
test -f $(shell go env GOPATH)/bin/kind || go install sigs.k8s.io/kind@latest
97+
test -f $(shell go env GOPATH)/bin/kind || GOFLAGS="" go install sigs.k8s.io/kind@latest
9898

9999
.PHONY: vendors
100100
vendors: ## Check go vendors
@@ -150,7 +150,7 @@ tests-fast: TEST_OPTS=
150150
tests-fast: tests-unit ## Fast unit tests (no race tests / coverage)
151151

152152
.PHONY: tests-e2e
153-
tests-e2e: $(KIND) ## End-to-end tests
153+
tests-e2e: prereqs-kind ## End-to-end tests
154154
go test -p 1 -v -timeout 20m $$(go list ./... | grep /e2e)
155155

156156
.PHONY: tests-all

0 commit comments

Comments
 (0)