Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/Dockerfile-ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16-stretch
FROM golang:1.18-stretch

RUN mkdir /helm && \
cd /helm && \
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipeline-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ steps:
command: make clean test-e2e
env:
CGO_ENABLED: 0
GIMME_GO_VERSION: 1.16.x
GIMME_GO_VERSION: 1.18.x
plugins:
gopath-checkout#v1.0.1:
import: github.com/m3db/m3db-operator
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ linters:
- gomoddirectives
# Returning an interface should not be a crime.
- ireturn
# Allow structs to be not completely specified.
- exhaustruct
disable-all: false
presets:
# bodyclose, errcheck, gosec, govet, scopelint, staticcheck, typecheck
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# stage 1: build
FROM golang:1.16-alpine3.13 AS builder
FROM golang:1.18-alpine3.16 AS builder
LABEL maintainer="The m3db-operator Authors <[email protected]>"

# Install CA certs for curl
Expand Down
273 changes: 252 additions & 21 deletions go.mod

Large diffs are not rendered by default.

594 changes: 297 additions & 297 deletions go.sum

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pkg/apis/m3dboperator/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/apis/m3dboperator/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,9 @@ func (c *M3DBController) handleClusterUpdate(
// strategy, then move to the next statefulset. When using the OnDelete update
// strategy, we still may want to restart nodes for this particular statefulset,
// so don't continue yet.
onDeleteUpdateStrategy :=
actual.Spec.UpdateStrategy.Type == appsv1.OnDeleteStatefulSetStrategyType
onDeleteUpdateStrategy := actual.Spec.UpdateStrategy.Type ==
appsv1.OnDeleteStatefulSetStrategyType

if !update && !onDeleteUpdateStrategy {
continue
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/controller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ func waitForStatefulSets(
ctx = context.Background()
)

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

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