Skip to content

Commit e38b637

Browse files
committed
Update to go1.21 and alpine 3.18
1 parent eab0211 commit e38b637

File tree

10 files changed

+111
-92
lines changed

10 files changed

+111
-92
lines changed

.golangci.toml

+5-1
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,9 @@
7878
max-same-issues = 0
7979
exclude = [
8080
"Error return value of .((os\\.)?std(out|err)\\..*|.*Close|.*Flush|os\\.Remove(All)?|.*printf?|os\\.(Un)?Setenv). is not checked",
81-
"should have a package comment, unless it's in another file for this package",
81+
"package-comments: should have a package comment",
82+
"import '[^']+' is not allowed from list 'Main'",
83+
"if-return: redundant if ...; err != nil check, just return error instead.",
84+
"unused-parameter: parameter '[^']+' seems to be unused, consider removing or renaming it as _",
85+
"tag is not aligned, should be: description:",
8286
]

.semaphore/semaphore.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Traefik Mesh Pipeline
44
agent:
55
machine:
66
type: e1-standard-4
7-
os_image: ubuntu1804
7+
os_image: ubuntu2004
88

99
auto_cancel:
1010
running:
@@ -20,7 +20,7 @@ global_job_config:
2020
prologue:
2121
commands:
2222
- curl -sSfL https://raw.githubusercontent.com/ldez/semgo/master/godownloader.sh | sudo sh -s -- -b "/usr/local/bin"
23-
- sudo semgo go1.19
23+
- sudo semgo go1.21
2424
- echo "${DOCKERHUB_PASSWORD}" | docker login -u "${DOCKERHUB_USERNAME}" --password-stdin
2525
- checkout
2626

Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.19-alpine AS base-image
1+
FROM golang:1.21-alpine AS base-image
22

33
# Package dependencies
44
RUN apk --no-cache --no-progress add \
@@ -21,21 +21,21 @@ WORKDIR /go/src/github.com/traefik/mesh
2121
RUN curl -sfL https://gist.githubusercontent.com/traefiker/6d7ac019c11d011e4f131bb2cca8900e/raw/goreleaser.sh | sh
2222

2323
# Download golangci-lint binary to bin folder in $GOPATH
24-
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.48.0
24+
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$GOPATH/bin" v1.54.2
2525

2626
ENV GO111MODULE on
2727
COPY go.mod go.sum ./
2828
RUN go mod download
2929
COPY . .
3030

31-
FROM base-image as maker
31+
FROM base-image AS maker
3232

3333
ARG MAKE_TARGET=local-build
3434

3535
RUN make ${MAKE_TARGET}
3636

3737
## IMAGE
38-
FROM alpine:3.15
38+
FROM alpine:3.18
3939

4040
RUN addgroup -g 1000 -S app && \
4141
adduser -u 1000 -S app -G app

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ check: $(DIST_DIR)
7070
"$(DOCKER_IMAGE_NAME):check" golangci-lint run --config .golangci.toml
7171

7272
publish-images: build
73-
seihon publish -v "$(VERSION)" -v "latest" --image-name ${DOCKER_IMAGE_NAME} --dry-run=false --base-runtime-image=alpine:3.15
73+
seihon publish -v "$(VERSION)" -v "latest" --image-name ${DOCKER_IMAGE_NAME} --dry-run=false --base-runtime-image=alpine:3.18
7474

7575
## Create packages for the release
7676
release-packages: vendor build

docs/check.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.15
1+
FROM alpine:3.18
22

33
# The "build-dependencies" virtual package provides build tools for html-proofer installation.
44
# It compile ruby-nokogiri, because alpine native version is always out of date

docs/content/contributing/building-testing.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ $ make
2323
Successfully tagged traefik/mesh:latest
2424
docker run --name=build -t "traefik/mesh:latest" version
2525
version:
26-
version : d6947526
27-
commit : d6947526
28-
build date : 2022-03-16_03:19:22PM
29-
go version : go1.19
26+
version : 019a39d
27+
commit : 019a39d
28+
build date : 2023-10-14_02:17:49PM
29+
go version : go1.21.3
3030
go compiler : gc
3131
platform : linux/amd64
3232
#[...]
@@ -55,7 +55,7 @@ version:
5555
version : dev
5656
commit : I don't remember exactly
5757
build date : I don't remember exactly
58-
go version : go1.19
58+
go version : go1.21
5959
go compiler : gc
6060
platform : linux/amd64
6161
```

docs/docs.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.15
1+
FROM alpine:3.18
22

33
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin
44

go.mod

+26-24
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
module github.com/traefik/mesh
22

3-
go 1.19
3+
go 1.21
4+
5+
toolchain go1.21.3
46

57
require (
6-
github.com/cenkalti/backoff/v4 v4.1.1
7-
github.com/go-check/check v0.0.0-20180628173108-788fd7840127
8-
github.com/google/uuid v1.3.0
8+
github.com/cenkalti/backoff/v4 v4.2.1
9+
github.com/go-check/check v0.0.0-20201130134442-10cb98267c6c
10+
github.com/google/uuid v1.3.1
911
github.com/gorilla/mux v1.8.0
10-
github.com/hashicorp/go-version v1.3.0
11-
github.com/servicemeshinterface/smi-sdk-go v0.4.1
12-
github.com/sirupsen/logrus v1.8.1
13-
github.com/stretchr/testify v1.8.0
14-
github.com/traefik/paerser v0.1.8
15-
github.com/traefik/traefik/v2 v2.8.3
12+
github.com/hashicorp/go-version v1.6.0
13+
github.com/servicemeshinterface/smi-sdk-go v0.5.0
14+
github.com/sirupsen/logrus v1.9.3
15+
github.com/stretchr/testify v1.8.4
16+
github.com/traefik/paerser v0.2.0
17+
github.com/traefik/traefik/v2 v2.8.8
1618
github.com/vdemeester/shakers v0.1.0
17-
k8s.io/api v0.22.5
18-
k8s.io/apimachinery v0.22.5
19-
k8s.io/client-go v0.22.5
19+
k8s.io/api v0.22.17
20+
k8s.io/apimachinery v0.22.17
21+
k8s.io/client-go v0.22.17
2022
)
2123

2224
require (
23-
github.com/BurntSushi/toml v1.1.0 // indirect
25+
github.com/BurntSushi/toml v1.2.1 // indirect
2426
github.com/Masterminds/goutils v1.1.1 // indirect
25-
github.com/Masterminds/semver/v3 v3.1.1 // indirect
26-
github.com/Masterminds/sprig/v3 v3.2.2 // indirect
27+
github.com/Masterminds/semver/v3 v3.2.0 // indirect
28+
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
2729
github.com/davecgh/go-spew v1.1.1 // indirect
2830
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
2931
github.com/go-acme/lego/v4 v4.7.0 // indirect
@@ -33,7 +35,7 @@ require (
3335
github.com/google/go-cmp v0.5.7 // indirect
3436
github.com/google/gofuzz v1.2.0 // indirect
3537
github.com/googleapis/gnostic v0.5.5 // indirect
36-
github.com/huandu/xstrings v1.3.1 // indirect
38+
github.com/huandu/xstrings v1.3.3 // indirect
3739
github.com/imdario/mergo v0.3.12 // indirect
3840
github.com/json-iterator/go v1.1.12 // indirect
3941
github.com/mitchellh/copystructure v1.0.0 // indirect
@@ -46,12 +48,12 @@ require (
4648
github.com/shopspring/decimal v1.2.0 // indirect
4749
github.com/spf13/cast v1.3.1 // indirect
4850
github.com/spf13/pflag v1.0.5 // indirect
49-
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect
50-
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e // indirect
51+
golang.org/x/crypto v0.3.0 // indirect
52+
golang.org/x/net v0.2.0 // indirect
5153
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
52-
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e // indirect
53-
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
54-
golang.org/x/text v0.3.7 // indirect
54+
golang.org/x/sys v0.2.0 // indirect
55+
golang.org/x/term v0.2.0 // indirect
56+
golang.org/x/text v0.4.0 // indirect
5557
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
5658
google.golang.org/appengine v1.6.7 // indirect
5759
google.golang.org/protobuf v1.28.0 // indirect
@@ -61,8 +63,8 @@ require (
6163
gopkg.in/yaml.v3 v3.0.1 // indirect
6264
k8s.io/klog/v2 v2.10.0 // indirect
6365
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c // indirect
64-
k8s.io/utils v0.0.0-20210820185131-d34e5cb4466e // indirect
65-
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
66+
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
67+
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
6668
sigs.k8s.io/yaml v1.2.0 // indirect
6769
)
6870

0 commit comments

Comments
 (0)