Skip to content

Commit

Permalink
Merge pull request #103 from gold-kou/update_go
Browse files Browse the repository at this point in the history
Update go version to 1.21
  • Loading branch information
gold-kou authored Feb 7, 2024
2 parents 4b89ab8 + ae615c8 commit a2ad969
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.17 as builder
FROM golang:1.21-bullseye as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,26 +138,26 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi

CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected])
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected])

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
$(call go-install-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])

CRD_REF_DOCS = $(shell pwd)/bin/crd-ref-docs
crd-ref-docs: ## Download crd-ref-docs locally if necessary.
$(call go-get-tool,$(CRD_REF_DOCS),github.com/elastic/crd-ref-docs@master)
$(call go-install-tool,$(CRD_REF_DOCS),github.com/elastic/crd-ref-docs@master)

# go-get-tool will 'go get' any package $2 and install it to $1.
# go-install-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
define go-get-tool
define go-install-tool
@[ -f $(1) ] || { \
set -e ;\
TMP_DIR=$$(mktemp -d) ;\
cd $$TMP_DIR ;\
go mod init tmp ;\
echo "Downloading $(2)" ;\
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
rm -rf $$TMP_DIR ;\
}
endef
8 changes: 4 additions & 4 deletions controllers/gatling_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,8 @@ func (r *GatlingReconciler) newGatlingRunnerJobForCR(gatling *gatlingv1alpha1.Ga
},
Spec: batchv1.JobSpec{
BackoffLimit: &noRestarts,
Parallelism: r.getGatlingRunnerJobParallelism(gatling),
Completions: r.getGatlingRunnerJobParallelism(gatling),
Parallelism: r.getGatlingRunnerJobParallelism(gatling),
Completions: r.getGatlingRunnerJobParallelism(gatling),
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Name: r.getObjectMeta(gatling).Name,
Expand Down Expand Up @@ -531,8 +531,8 @@ func (r *GatlingReconciler) newGatlingRunnerJobForCR(gatling *gatlingv1alpha1.Ga
},
Spec: batchv1.JobSpec{
BackoffLimit: &noRestarts,
Parallelism: &gatling.Spec.TestScenarioSpec.Parallelism,
Completions: &gatling.Spec.TestScenarioSpec.Parallelism,
Parallelism: &gatling.Spec.TestScenarioSpec.Parallelism,
Completions: &gatling.Spec.TestScenarioSpec.Parallelism,
Template: corev1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Name: r.getObjectMeta(gatling).Name,
Expand Down

0 comments on commit a2ad969

Please sign in to comment.