Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit 5595f74

Browse files
authored
CLOUDP-80154: Update operator-sdk version to v0.19.4 (#297)
* CLOUDP-80154: Update operator-sdk version to v0.19.4 * Update operator SDK in missing places
1 parent f7d2f9a commit 5595f74

File tree

7 files changed

+407
-360
lines changed

7 files changed

+407
-360
lines changed

.evergreen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ functions:
3535
working_dir: mongodb-kubernetes-operator/scripts/ci
3636
command: go run download.go
3737
env:
38-
URL: https://github.com/operator-framework/operator-sdk/releases/download/v0.18.2/operator-sdk-v0.18.2-x86_64-linux-gnu
38+
URL: https://github.com/operator-framework/operator-sdk/releases/download/v0.19.4/operator-sdk-v0.19.4-s390x-linux-gnu
3939
FILENAME: operator-sdk
4040
DIR: ${workdir}/bin
4141

go.mod

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,31 @@ module github.com/mongodb/mongodb-kubernetes-operator
33
go 1.14
44

55
require (
6-
github.com/Azure/go-autorest v14.0.1+incompatible // indirect
7-
github.com/cespare/xxhash/v2 v2.1.1 // indirect
86
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
9-
github.com/gobuffalo/envy v1.7.1 // indirect
10-
github.com/golang/protobuf v1.3.5 // indirect
117
github.com/hashicorp/go-multierror v1.0.0
128
github.com/hashicorp/golang-lru v0.5.4 // indirect
139
github.com/imdario/mergo v0.3.9
14-
github.com/json-iterator/go v1.1.9 // indirect
1510
github.com/klauspost/compress v1.9.8 // indirect
1611
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
17-
github.com/operator-framework/operator-sdk v0.17.0
12+
github.com/operator-framework/operator-sdk v0.19.4
1813
github.com/pkg/errors v0.9.1
1914
github.com/prometheus/procfs v0.0.11 // indirect
2015
github.com/rogpeppe/go-internal v1.5.2 // indirect
21-
github.com/spf13/cobra v0.0.7 // indirect
2216
github.com/stretchr/objx v0.3.0
23-
github.com/stretchr/testify v1.4.0
17+
github.com/stretchr/testify v1.5.1
2418
github.com/xdg/stringprep v1.0.0
2519
go.mongodb.org/mongo-driver v1.3.2
2620
go.uber.org/zap v1.14.1
2721
google.golang.org/appengine v1.6.6 // indirect
28-
k8s.io/api v0.17.5
29-
k8s.io/apiextensions-apiserver v0.17.5
30-
k8s.io/apimachinery v0.17.5
22+
k8s.io/api v0.18.2
23+
k8s.io/apimachinery v0.18.2
3124
k8s.io/client-go v12.0.0+incompatible
32-
sigs.k8s.io/controller-runtime v0.5.2
25+
sigs.k8s.io/controller-runtime v0.6.0
3326
sigs.k8s.io/yaml v1.2.0
3427
)
3528

3629
replace github.com/docker/docker => github.com/moby/moby v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+incompatible // Required by Helm
3730

38-
replace k8s.io/client-go => k8s.io/client-go v0.17.5 // Required by controller-runtime
31+
replace k8s.io/client-go => k8s.io/client-go v0.18.2 // Required by controller-runtime
32+
33+
replace github.com/Azure/go-autorest => github.com/Azure/go-autorest v13.3.2+incompatible // Required by OLM

go.sum

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

pkg/kube/client/mocked_manager.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package client
22

33
import (
44
"context"
5+
"net/http"
56

67
"k8s.io/apimachinery/pkg/api/meta"
78
"k8s.io/apimachinery/pkg/runtime"
@@ -32,6 +33,10 @@ func (m *MockedManager) Add(_ manager.Runnable) error {
3233
return nil
3334
}
3435

36+
func (m *MockedManager) Elected() <-chan struct{} {
37+
return nil
38+
}
39+
3540
// SetFields will set any dependencies on an object for which the object has implemented the inject
3641
// interface - e.g. inject.Client.
3742
func (m *MockedManager) SetFields(interface{}) error {
@@ -99,6 +104,10 @@ func (m *MockedManager) GetWebhookServer() *webhook.Server {
99104
return nil
100105
}
101106

107+
func (m *MockedManager) AddMetricsExtraHandler(path string, handler http.Handler) error {
108+
return nil
109+
}
110+
102111
// AddHealthzCheck allows you to add Healthz checker
103112
func (m *MockedManager) AddHealthzCheck(name string, check healthz.Checker) error {
104113
return nil

pkg/kube/pod/pod.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
)
1919

2020
type Streamer interface {
21-
Stream() (io.ReadCloser, error)
21+
Stream(ctx context.Context) (io.ReadCloser, error)
2222
}
2323

2424
// CoreV1FollowStreamer returns a Streamer that will stream the logs to
@@ -34,7 +34,7 @@ func CoreV1FollowStreamer(pod corev1.Pod, corev1Interface typedCorev1.CoreV1Inte
3434
// GetLogs will follow the logs of the provided pod to the given io.Writer until the pod has
3535
// been terminated or has completed.
3636
func GetLogs(writer io.Writer, streamer Streamer) error {
37-
podLogs, err := streamer.Stream()
37+
podLogs, err := streamer.Stream(context.TODO())
3838

3939
if err != nil {
4040
return errors.Errorf("could not open stream: %s", err)

pkg/kube/pod/pod_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ type mockStreamer struct {
8181
logs string
8282
}
8383

84-
func (m mockStreamer) Stream() (io.ReadCloser, error) {
84+
func (m mockStreamer) Stream(ctx context.Context) (io.ReadCloser, error) {
8585
return ioutil.NopCloser(strings.NewReader(m.logs)), nil
8686
}
8787

scripts/dev/templates/Dockerfile.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ FROM {{base_image}}
88
{% block packages -%}
99
{% endblock -%}
1010

11-
ENV OPERATOR_SDK_VERSION v0.18.2
11+
ENV OPERATOR_SDK_VERSION v0.19.4
1212
ENV GO111MODULE=on
1313
ENV GOPATH ""
1414

0 commit comments

Comments
 (0)