Skip to content

Commit bed9de0

Browse files
authored
Merge pull request #108 from gold-kou/update_go_revenge_2
Update go version to 1.21
2 parents a445a5d + 16ba9de commit bed9de0

File tree

7 files changed

+22
-24
lines changed

7 files changed

+22
-24
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Go
3030
uses: actions/setup-go@v2
3131
with:
32-
go-version: '1.17'
32+
go-version: '1.21'
3333

3434
- run: go version
3535

@@ -67,7 +67,7 @@ jobs:
6767
- name: Setup Go
6868
uses: actions/setup-go@v2
6969
with:
70-
go-version: '1.17'
70+
go-version: '1.21'
7171

7272
- name: Login to GitHub Container Registry
7373
uses: docker/login-action@v1

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.17 as builder
2+
FROM golang:1.21-bullseye as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests

Dockerfile.dev

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ubuntu:22.04
22

3-
ENV GO_VERSION 1.17.13
3+
ENV GO_VERSION 1.21.7
44
ENV KUBECTL_VERSION v1.21.10
55

66
# KEEP the value as arm64.
@@ -12,26 +12,26 @@ ENV ETCD_UNSUPPORTED_ARCH arm64
1212

1313
# Development tools
1414
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
15-
wget \
16-
git \
17-
make \
18-
gcc
15+
wget \
16+
git \
17+
make \
18+
gcc
1919

2020
# Docker CLI
2121
# Referring to https://docs.docker.com/engine/install/ubuntu/#installation-methods
2222
RUN apt-get install -y \
23-
ca-certificates \
24-
curl \
25-
gnupg \
23+
ca-certificates \
24+
curl \
25+
gnupg \
2626
&& install -m 0755 -d /etc/apt/keyrings \
2727
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
28-
| gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
28+
| gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
2929
&& chmod a+r /etc/apt/keyrings/docker.gpg \
3030
&& echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
31-
"$(. /etc/os-release && echo "${VERSION_CODENAME}")" stable" \
32-
| tee /etc/apt/sources.list.d/docker.list > /dev/null \
31+
"$(. /etc/os-release && echo "${VERSION_CODENAME}")" stable" \
32+
| tee /etc/apt/sources.list.d/docker.list > /dev/null \
3333
&& apt-get update && apt-get install -y \
34-
docker-ce-cli
34+
docker-ce-cli
3535

3636
# kubectl
3737
# Referring to https://kubernetes.io/ja/docs/tasks/tools/install-kubectl/

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,26 +138,26 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
138138

139139
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
140140
controller-gen: ## Download controller-gen locally if necessary.
141-
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1)
141+
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1)
142142

143143
KUSTOMIZE = $(shell pwd)/bin/kustomize
144144
kustomize: ## Download kustomize locally if necessary.
145-
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7)
145+
$(call go-install-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v5@v5.3.0)
146146

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

151-
# go-get-tool will 'go get' any package $2 and install it to $1.
151+
# go-install-tool will 'go get' any package $2 and install it to $1.
152152
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
153-
define go-get-tool
153+
define go-install-tool
154154
@[ -f $(1) ] || { \
155155
set -e ;\
156156
TMP_DIR=$$(mktemp -d) ;\
157157
cd $$TMP_DIR ;\
158158
go mod init tmp ;\
159159
echo "Downloading $(2)" ;\
160-
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
160+
GOBIN=$(PROJECT_DIR)/bin go install $(2) ;\
161161
rm -rf $$TMP_DIR ;\
162162
}
163163
endef

docs/build-guide.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ git clone https://github.com/st-tech/gatling-operator
2727
- [kubectl](https://kubernetes.io/docs/tasks/tools/)
2828
- [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
2929
- [go](https://go.dev/doc/install)
30-
- go version must be 1.17
3130

3231
## Create a Kubernetes cluster
3332

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/st-tech/gatling-operator
22

3-
go 1.17
3+
go 1.21
44

55
require (
66
github.com/go-logr/logr v1.2.0

go.sum

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2y
8787
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
8888
github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
8989
github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
90-
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
9190
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
9291
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
9392
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=

0 commit comments

Comments
 (0)