Skip to content

Commit 392e509

Browse files
authored
Update go version to 1.18 (#322)
1 parent 9758b96 commit 392e509

File tree

10 files changed

+561
-323
lines changed

10 files changed

+561
-323
lines changed

.buildkite/Dockerfile-ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16-stretch
1+
FROM golang:1.18-stretch
22

33
RUN mkdir /helm && \
44
cd /helm && \

.buildkite/pipeline-test-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ steps:
33
command: make clean test-e2e
44
env:
55
CGO_ENABLED: 0
6-
GIMME_GO_VERSION: 1.16.x
6+
GIMME_GO_VERSION: 1.18.x
77
plugins:
88
gopath-checkout#v1.0.1:
99
import: github.com/m3db/m3db-operator

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ linters:
221221
- gomoddirectives
222222
# Returning an interface should not be a crime.
223223
- ireturn
224+
# Allow structs to be not completely specified.
225+
- exhaustruct
224226
disable-all: false
225227
presets:
226228
# bodyclose, errcheck, gosec, govet, scopelint, staticcheck, typecheck

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# stage 1: build
2-
FROM golang:1.16-alpine3.13 AS builder
2+
FROM golang:1.18-alpine3.16 AS builder
33
LABEL maintainer="The m3db-operator Authors <[email protected]>"
44

55
# Install CA certs for curl

go.mod

Lines changed: 252 additions & 21 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 297 additions & 297 deletions
Large diffs are not rendered by default.

pkg/apis/m3dboperator/v1alpha1/openapi_generated.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/m3dboperator/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/controller/controller.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,9 @@ func (c *M3DBController) handleClusterUpdate(
579579
// strategy, then move to the next statefulset. When using the OnDelete update
580580
// strategy, we still may want to restart nodes for this particular statefulset,
581581
// so don't continue yet.
582-
onDeleteUpdateStrategy :=
583-
actual.Spec.UpdateStrategy.Type == appsv1.OnDeleteStatefulSetStrategyType
582+
onDeleteUpdateStrategy := actual.Spec.UpdateStrategy.Type ==
583+
appsv1.OnDeleteStatefulSetStrategyType
584+
584585
if !update && !onDeleteUpdateStrategy {
585586
continue
586587
}

pkg/controller/controller_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ func waitForStatefulSets(
180180
ctx = context.Background()
181181
)
182182

183+
//nolint:forcetypeassert
183184
controller.kubeClient.(*kubefake.Clientset).PrependReactor(verb, "statefulsets", func(action ktesting.Action) (bool, runtime.Object, error) {
184185
var sts *appsv1.StatefulSet
185186
switch verb {
@@ -220,6 +221,7 @@ func waitForStatefulSets(
220221
return false, nil, nil
221222
})
222223

224+
//nolint:forcetypeassert
223225
controller.kubeClient.(*kubefake.Clientset).PrependReactor(
224226
"delete", "pods", func(action ktesting.Action) (bool, runtime.Object, error) {
225227
podName := action.(kubetesting.DeleteActionImpl).GetName()

0 commit comments

Comments
 (0)