Skip to content

Commit dff8696

Browse files
authored
changes due to controller-runtime v0.11.0 upgrade (#63)
Issue #, if available: aws-controllers-k8s/community#1112 Description of changes: * Upgrade of controller-runtime to v0.11.0 * Upgrade of go.mod to 1.17 because that is minimal go version for controller-runtime library * Keeping the indirect import in go.mod file because removing them causes the error "go.mod needs changes. Run go mod tidy" during local development > At go 1.17 and above, the go command adds an indirect requirement for each module that provides any package imported (even indirectly) by a package or test in the main module or passed as an argument to go get. These more comprehensive requirements enable module graph pruning and lazy module loading. * `Reconcile` method in reconcilers now accepts a `context.Context` parameter * Replace `ACK RuntimeMetaObject` with `controller-runtime Object` * Replace `desired.RuntimeObject().DeepCopyObject()` with `desired.DeepCopy().RuntimeObject()` because the former does not return implementation of `controller-runtime Object` * Remove `RuntimeMetaObject()` method from AWSResource interface * Use `controller-runtime client Object` instead of `apimachinery runtime Object` ------ * Tested locally by running e2e tests for ecr-controller * Validated that newly generated image has no golang security vulnerabilities. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent cb8a3ab commit dff8696

21 files changed

+1470
-391
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mocks: install-mockery ## Build mocks
3333
@bin/mockery --quiet --name=ObjectKind --case=underscore --output=mocks/apimachinery/pkg/runtime/schema --dir="$(K8S_APIMACHINERY_DIR)/pkg/runtime/schema"
3434
@echo "ok."
3535
@echo -n "building mocks for sigs.k8s.io/controller-runtime/pkg/client ... "
36-
@bin/mockery --quiet --name="(Client|Status|Reader)" --case=underscore --output=mocks/controller-runtime/pkg/client --dir="$(CONTROLLER_RUNTIME_DIR)/pkg/client"
36+
@bin/mockery --quiet --name="(Object|Client|Status|Reader)" --case=underscore --output=mocks/controller-runtime/pkg/client --dir="$(CONTROLLER_RUNTIME_DIR)/pkg/client"
3737
@echo "ok."
3838

3939
help: ## Show this help.

go.mod

Lines changed: 58 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,67 @@
11
module github.com/aws-controllers-k8s/runtime
22

3-
go 1.14
3+
go 1.17
44

55
require (
66
github.com/aws/aws-sdk-go v1.37.10
7-
github.com/go-logr/logr v0.1.0
8-
github.com/google/go-cmp v0.3.1
7+
github.com/go-logr/logr v1.2.0
8+
github.com/google/go-cmp v0.5.5
99
github.com/jaypipes/envutil v1.0.0
1010
github.com/pkg/errors v0.9.1
11-
github.com/prometheus/client_golang v1.1.0
11+
github.com/prometheus/client_golang v1.11.0
1212
github.com/spf13/pflag v1.0.5
13-
github.com/stretchr/testify v1.5.1
14-
go.uber.org/zap v1.10.0
15-
k8s.io/api v0.18.2
16-
k8s.io/apimachinery v0.18.6
17-
k8s.io/client-go v0.18.2
18-
sigs.k8s.io/controller-runtime v0.6.0
13+
github.com/stretchr/testify v1.7.0
14+
go.uber.org/zap v1.19.1
15+
k8s.io/api v0.23.0
16+
k8s.io/apimachinery v0.23.0
17+
k8s.io/client-go v0.23.0
18+
sigs.k8s.io/controller-runtime v0.11.0
19+
)
20+
21+
require (
22+
github.com/beorn7/perks v1.0.1 // indirect
23+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
24+
github.com/davecgh/go-spew v1.1.1 // indirect
25+
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
26+
github.com/fsnotify/fsnotify v1.5.1 // indirect
27+
github.com/go-logr/zapr v1.2.0 // indirect
28+
github.com/gogo/protobuf v1.3.2 // indirect
29+
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
30+
github.com/golang/protobuf v1.5.2 // indirect
31+
github.com/google/gofuzz v1.1.0 // indirect
32+
github.com/google/uuid v1.1.2 // indirect
33+
github.com/googleapis/gnostic v0.5.5 // indirect
34+
github.com/imdario/mergo v0.3.12 // indirect
35+
github.com/jmespath/go-jmespath v0.4.0 // indirect
36+
github.com/json-iterator/go v1.1.12 // indirect
37+
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
38+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
39+
github.com/modern-go/reflect2 v1.0.2 // indirect
40+
github.com/pmezard/go-difflib v1.0.0 // indirect
41+
github.com/prometheus/client_model v0.2.0 // indirect
42+
github.com/prometheus/common v0.28.0 // indirect
43+
github.com/prometheus/procfs v0.6.0 // indirect
44+
github.com/stretchr/objx v0.1.1 // indirect
45+
go.uber.org/atomic v1.7.0 // indirect
46+
go.uber.org/multierr v1.6.0 // indirect
47+
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
48+
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
49+
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
50+
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
51+
golang.org/x/text v0.3.7 // indirect
52+
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
53+
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
54+
google.golang.org/appengine v1.6.7 // indirect
55+
google.golang.org/protobuf v1.27.1 // indirect
56+
gopkg.in/inf.v0 v0.9.1 // indirect
57+
gopkg.in/yaml.v2 v2.4.0 // indirect
58+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
59+
k8s.io/apiextensions-apiserver v0.23.0 // indirect
60+
k8s.io/component-base v0.23.0 // indirect
61+
k8s.io/klog/v2 v2.30.0 // indirect
62+
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
63+
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
64+
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
65+
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
66+
sigs.k8s.io/yaml v1.3.0 // indirect
1967
)

go.sum

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

mocks/controller-runtime/pkg/client/client.go

Lines changed: 48 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)