From 554404e7090f6b236b87bd61aa9da90372c1ea18 Mon Sep 17 00:00:00 2001 From: kane8n Date: Fri, 24 May 2024 21:26:59 +0900 Subject: [PATCH 1/6] update gatling version --- gatling/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gatling/Dockerfile b/gatling/Dockerfile index f57fb50..7d6d58c 100644 --- a/gatling/Dockerfile +++ b/gatling/Dockerfile @@ -3,13 +3,13 @@ # # Gatling is a highly capable load testing tool. -FROM openjdk:17-jdk-slim-bullseye +FROM openjdk:21-jdk-slim-bullseye # working directory for gatling WORKDIR /opt # gating version -ENV GATLING_VERSION 3.9.5 +ENV GATLING_VERSION 3.11.3 # create directory for gatling install RUN mkdir -p gatling From 541193bcfaa09e5bef1a0836ca1b30f5c2372f40 Mon Sep 17 00:00:00 2001 From: kane8n Date: Fri, 24 May 2024 21:27:21 +0900 Subject: [PATCH 2/6] fix setup-envtest to latest --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ee91c39..541bc36 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ VERSION := latest CRD_OPTIONS ?= "crd:trivialVersions=true,preserveUnknownFields=false" KIND_CLUSTER_NAME ?= "gatling-cluster" K8S_NODE_IMAGE ?= v1.21.10 +ENVTEST_K8S_VERSION ?= 1.30.0 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -25,7 +26,6 @@ endif SHELL = /usr/bin/env bash -o pipefail .SHELLFLAGS = -ec -ENVTEST_ASSETS_DIR=$(shell pwd)/testbin KIND_CLUSTER_CONFIG_DIR=$(shell pwd)/config/kind KUBECONFIG_BACKUP_DIR=$(shell pwd)/.kube @@ -82,9 +82,9 @@ vet: ## Run go vet against code. go vet ./... test: manifests generate fmt vet ## Run tests. - mkdir -p ${ENVTEST_ASSETS_DIR} - test -f ${ENVTEST_ASSETS_DIR}/setup-envtest.sh || curl -sSLo ${ENVTEST_ASSETS_DIR}/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.8.3/hack/setup-envtest.sh - source ${ENVTEST_ASSETS_DIR}/setup-envtest.sh; fetch_envtest_tools $(ENVTEST_ASSETS_DIR); setup_envtest_env $(ENVTEST_ASSETS_DIR); go test ./... -coverprofile cover.out + $(ENVTEST) use $(ENVTEST_K8S_VERSION) + source <(setup-envtest use -i -p env $(ENVTEST_K8S_VERSION)) + go test ./... -coverprofile cover.out ##@ Build @@ -148,6 +148,11 @@ CRD_REF_DOCS = $(shell pwd)/bin/crd-ref-docs crd-ref-docs: ## Download crd-ref-docs locally if necessary. $(call go-install-tool,$(CRD_REF_DOCS),github.com/elastic/crd-ref-docs@master) +ENVTEST = $(shell pwd)/bin/setup-envtest +setup-envtest: ## Download setup-envtest locally if necessary. + $(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest) + + # go-install-tool will 'go get' any package $2 and install it to $1. PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) define go-install-tool From 0f65d92c7b696046a8f393e30113f7f5e1ed2d02 Mon Sep 17 00:00:00 2001 From: kane8n Date: Fri, 24 May 2024 22:05:36 +0900 Subject: [PATCH 3/6] fix jdk image & gatling zip file path --- gatling/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gatling/Dockerfile b/gatling/Dockerfile index 7d6d58c..68391a1 100644 --- a/gatling/Dockerfile +++ b/gatling/Dockerfile @@ -3,7 +3,8 @@ # # Gatling is a highly capable load testing tool. -FROM openjdk:21-jdk-slim-bullseye +#FROM openjdk:21-jdk-slim-bullseye +FROM eclipse-temurin:21 # working directory for gatling WORKDIR /opt @@ -18,7 +19,7 @@ RUN mkdir -p gatling RUN apt-get update && apt-get upgrade -y && apt-get install -y wget unzip && \ mkdir -p /tmp/downloads && \ wget -q -O /tmp/downloads/gatling-$GATLING_VERSION.zip \ - https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION-bundle.zip && \ + https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION.zip && \ mkdir -p /tmp/archive && cd /tmp/archive && \ unzip /tmp/downloads/gatling-$GATLING_VERSION.zip && \ mv /tmp/archive/gatling-charts-highcharts-bundle-$GATLING_VERSION/* /opt/gatling/ && \ From 0504073b5c1cb8098e979e85e24ce564844ac40f Mon Sep 17 00:00:00 2001 From: kane8n Date: Mon, 27 May 2024 13:54:43 +0900 Subject: [PATCH 4/6] fix make test --- Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 541bc36..827ca3f 100644 --- a/Makefile +++ b/Makefile @@ -81,10 +81,8 @@ fmt: ## Run go fmt against code. vet: ## Run go vet against code. go vet ./... -test: manifests generate fmt vet ## Run tests. - $(ENVTEST) use $(ENVTEST_K8S_VERSION) - source <(setup-envtest use -i -p env $(ENVTEST_K8S_VERSION)) - go test ./... -coverprofile cover.out +test: manifests generate fmt vet setup-envtest ## Run tests. + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use -i -p path $(ENVTEST_K8S_VERSION))" go test ./... -coverprofile cover.out ##@ Build @@ -150,8 +148,7 @@ crd-ref-docs: ## Download crd-ref-docs locally if necessary. ENVTEST = $(shell pwd)/bin/setup-envtest setup-envtest: ## Download setup-envtest locally if necessary. - $(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest) - + $(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest@latest) # go-install-tool will 'go get' any package $2 and install it to $1. PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) From 824e2c5286bf80dfcd6949236a40367400eeb049 Mon Sep 17 00:00:00 2001 From: kane8n Date: Mon, 27 May 2024 14:02:21 +0900 Subject: [PATCH 5/6] gatling version -> 3.10.5 openjdk -> 21-jdk-slim-bullseye --- gatling/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gatling/Dockerfile b/gatling/Dockerfile index 68391a1..dee31cf 100644 --- a/gatling/Dockerfile +++ b/gatling/Dockerfile @@ -3,14 +3,13 @@ # # Gatling is a highly capable load testing tool. -#FROM openjdk:21-jdk-slim-bullseye -FROM eclipse-temurin:21 +FROM openjdk:21-jdk-slim-bullseye # working directory for gatling WORKDIR /opt # gating version -ENV GATLING_VERSION 3.11.3 +ENV GATLING_VERSION 3.10.5 # create directory for gatling install RUN mkdir -p gatling @@ -19,7 +18,7 @@ RUN mkdir -p gatling RUN apt-get update && apt-get upgrade -y && apt-get install -y wget unzip && \ mkdir -p /tmp/downloads && \ wget -q -O /tmp/downloads/gatling-$GATLING_VERSION.zip \ - https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION.zip && \ + https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION-bundle.zip && \ mkdir -p /tmp/archive && cd /tmp/archive && \ unzip /tmp/downloads/gatling-$GATLING_VERSION.zip && \ mv /tmp/archive/gatling-charts-highcharts-bundle-$GATLING_VERSION/* /opt/gatling/ && \ From 4738acfe082efa4760a26d9d44184fa756b848a4 Mon Sep 17 00:00:00 2001 From: kane8n Date: Mon, 27 May 2024 15:59:34 +0900 Subject: [PATCH 6/6] fix test --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 827ca3f..61d9385 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ vet: ## Run go vet against code. go vet ./... test: manifests generate fmt vet setup-envtest ## Run tests. - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use -i -p path $(ENVTEST_K8S_VERSION))" go test ./... -coverprofile cover.out + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use -p path $(ENVTEST_K8S_VERSION))" go test ./... -coverprofile cover.out ##@ Build