Skip to content

Commit 1fa0449

Browse files
Merge pull request #2584 from NikhilSharmaWe/scaffoldsUpdate
✨ (go/v3) : Upgrade controller-runtime from v0.11.0 to v0.11.2 (k8s api dependencies consequently upgraded from 1.23.0 to 1.23.5)
2 parents 657e296 + 25af98b commit 1fa0449

27 files changed

+66
-66
lines changed

pkg/plugins/golang/v3/commons.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,39 +94,39 @@ manifests: controller-gen`
9494
}
9595

9696
if err := util.ReplaceInFile("go.mod",
97-
"k8s.io/api v0.23.0",
97+
"k8s.io/api v0.23.5",
9898
"k8s.io/api v0.21.2"); err != nil {
9999
log.Warnf("unable to update the go.mod with k8s.io/api v0.21.2: %s", err)
100100
}
101101

102102
if err := util.ReplaceInFile("go.mod",
103-
"k8s.io/apimachinery v0.23.0",
103+
"k8s.io/apimachinery v0.23.5",
104104
"k8s.io/apimachinery v0.21.2"); err != nil {
105105
log.Warnf("unable to update the go.mod with k8s.io/apimachinery v0.21.2: %s", err)
106106
}
107107

108108
if err := util.ReplaceInFile("go.mod",
109-
"k8s.io/client-go v0.23.0",
109+
"k8s.io/client-go v0.23.5",
110110
"k8s.io/client-go v0.21.2"); err != nil {
111111
log.Warnf("unable to update the go.mod with k8s.io/client-go v0.21.2: %s", err)
112112
}
113113

114114
// During the scaffolding phase, this gets added to go.mod file, running go mod tidy bumps back
115115
// the version from 21.2 to the latest
116116
if err := util.ReplaceInFile("go.mod",
117-
"k8s.io/api v0.23.0",
117+
"k8s.io/api v0.23.5",
118118
"k8s.io/api v0.21.2"); err != nil {
119119
log.Warnf("unable to update the go.mod with k8s.io/api v0.21.2: %s", err)
120120
}
121121

122122
if err := util.ReplaceInFile("go.mod",
123-
"k8s.io/apiextensions-apiserver v0.23.0",
123+
"k8s.io/apiextensions-apiserver v0.23.5",
124124
"k8s.io/apiextensions-apiserver v0.21.2"); err != nil {
125125
log.Warnf("unable to update the go.mod with k8s.io/apiextensions-apiserver v0.21.2: %s", err)
126126
}
127127

128128
if err := util.ReplaceInFile("go.mod",
129-
"k8s.io/component-base v0.23.0",
129+
"k8s.io/component-base v0.23.5",
130130
"k8s.io/component-base v0.21.2"); err != nil {
131131
log.Warnf("unable to update the go.mod with k8s.io/component-base v0.21.2: %s", err)
132132
}

pkg/plugins/golang/v3/scaffolds/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030

3131
const (
3232
// ControllerRuntimeVersion is the kubernetes-sigs/controller-runtime version to be used in the project
33-
ControllerRuntimeVersion = "v0.11.0"
33+
ControllerRuntimeVersion = "v0.11.2"
3434
// ControllerToolsVersion is the kubernetes-sigs/controller-tools version to be used in the project
3535
ControllerToolsVersion = "v0.8.0"
3636
// KustomizeVersion is the kubernetes-sigs/kustomize version to be used in the project

testdata/project-v3-addon/go.mod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ require (
66
github.com/go-logr/logr v1.2.0
77
github.com/onsi/ginkgo v1.16.5
88
github.com/onsi/gomega v1.17.0
9-
k8s.io/apimachinery v0.23.0
10-
k8s.io/client-go v0.23.0
11-
sigs.k8s.io/controller-runtime v0.11.0
9+
k8s.io/apimachinery v0.23.5
10+
k8s.io/client-go v0.23.5
11+
sigs.k8s.io/controller-runtime v0.11.2
1212
sigs.k8s.io/kubebuilder-declarative-pattern v0.0.0-20220110041111-fea7e5cc7012
1313
)
1414

@@ -91,7 +91,7 @@ require (
9191
go.uber.org/multierr v1.6.0 // indirect
9292
go.uber.org/zap v1.19.1 // indirect
9393
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
94-
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
94+
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
9595
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
9696
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
9797
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
@@ -105,18 +105,18 @@ require (
105105
gopkg.in/warnings.v0 v0.1.2 // indirect
106106
gopkg.in/yaml.v2 v2.4.0 // indirect
107107
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
108-
k8s.io/api v0.23.0 // indirect
109-
k8s.io/apiextensions-apiserver v0.23.0 // indirect
108+
k8s.io/api v0.23.5 // indirect
109+
k8s.io/apiextensions-apiserver v0.23.5 // indirect
110110
k8s.io/cli-runtime v0.23.0 // indirect
111-
k8s.io/component-base v0.23.0 // indirect
111+
k8s.io/component-base v0.23.5 // indirect
112112
k8s.io/klog/v2 v2.30.0 // indirect
113113
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
114114
k8s.io/kubectl v0.22.2 // indirect
115-
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
115+
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
116116
sigs.k8s.io/cli-utils v0.26.1 // indirect
117117
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
118118
sigs.k8s.io/kustomize/api v0.10.1 // indirect
119119
sigs.k8s.io/kustomize/kyaml v0.13.0 // indirect
120-
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
120+
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
121121
sigs.k8s.io/yaml v1.3.0 // indirect
122122
)

testdata/project-v3-config/controllers/admiral_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type AdmiralReconciler struct {
4545
// the user.
4646
//
4747
// For more details, check Reconcile and its Result here:
48-
// - https://pkg.go.dev/sigs.k8s.io/[email protected].0/pkg/reconcile
48+
// - https://pkg.go.dev/sigs.k8s.io/[email protected].2/pkg/reconcile
4949
func (r *AdmiralReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
5050
_ = log.FromContext(ctx)
5151

testdata/project-v3-config/controllers/captain_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type CaptainReconciler struct {
4545
// the user.
4646
//
4747
// For more details, check Reconcile and its Result here:
48-
// - https://pkg.go.dev/sigs.k8s.io/[email protected].0/pkg/reconcile
48+
// - https://pkg.go.dev/sigs.k8s.io/[email protected].2/pkg/reconcile
4949
func (r *CaptainReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
5050
_ = log.FromContext(ctx)
5151

testdata/project-v3-config/controllers/firstmate_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type FirstMateReconciler struct {
4545
// the user.
4646
//
4747
// For more details, check Reconcile and its Result here:
48-
// - https://pkg.go.dev/sigs.k8s.io/[email protected].0/pkg/reconcile
48+
// - https://pkg.go.dev/sigs.k8s.io/[email protected].2/pkg/reconcile
4949
func (r *FirstMateReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
5050
_ = log.FromContext(ctx)
5151

testdata/project-v3-config/controllers/laker_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type LakerReconciler struct {
4343
// the user.
4444
//
4545
// For more details, check Reconcile and its Result here:
46-
// - https://pkg.go.dev/sigs.k8s.io/[email protected].0/pkg/reconcile
46+
// - https://pkg.go.dev/sigs.k8s.io/[email protected].2/pkg/reconcile
4747
func (r *LakerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
4848
_ = log.FromContext(ctx)
4949

testdata/project-v3-config/go.mod

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ go 1.17
55
require (
66
github.com/onsi/ginkgo v1.16.5
77
github.com/onsi/gomega v1.17.0
8-
k8s.io/api v0.23.0
9-
k8s.io/apimachinery v0.23.0
10-
k8s.io/client-go v0.23.0
11-
sigs.k8s.io/controller-runtime v0.11.0
8+
k8s.io/api v0.23.5
9+
k8s.io/apimachinery v0.23.5
10+
k8s.io/client-go v0.23.5
11+
sigs.k8s.io/controller-runtime v0.11.2
1212
)
1313

1414
require (
@@ -50,7 +50,7 @@ require (
5050
go.uber.org/multierr v1.6.0 // indirect
5151
go.uber.org/zap v1.19.1 // indirect
5252
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect
53-
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
53+
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
5454
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
5555
golang.org/x/sys v0.0.0-20211029165221-6e7872819dc8 // indirect
5656
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
@@ -63,12 +63,12 @@ require (
6363
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
6464
gopkg.in/yaml.v2 v2.4.0 // indirect
6565
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
66-
k8s.io/apiextensions-apiserver v0.23.0 // indirect
67-
k8s.io/component-base v0.23.0 // indirect
66+
k8s.io/apiextensions-apiserver v0.23.5 // indirect
67+
k8s.io/component-base v0.23.5 // indirect
6868
k8s.io/klog/v2 v2.30.0 // indirect
6969
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
70-
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b // indirect
70+
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
7171
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
72-
sigs.k8s.io/structured-merge-diff/v4 v4.2.0 // indirect
72+
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
7373
sigs.k8s.io/yaml v1.3.0 // indirect
7474
)

testdata/project-v3-multigroup/controllers/apps/deployment_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type DeploymentReconciler struct {
4444
// the user.
4545
//
4646
// For more details, check Reconcile and its Result here:
47-
// - https://pkg.go.dev/sigs.k8s.io/[email protected].0/pkg/reconcile
47+
// - https://pkg.go.dev/sigs.k8s.io/[email protected].2/pkg/reconcile
4848
func (r *DeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
4949
_ = log.FromContext(ctx)
5050

testdata/project-v3-multigroup/controllers/crew/captain_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type CaptainReconciler struct {
4545
// the user.
4646
//
4747
// For more details, check Reconcile and its Result here:
48-
// - https://pkg.go.dev/sigs.k8s.io/[email protected].0/pkg/reconcile
48+
// - https://pkg.go.dev/sigs.k8s.io/[email protected].2/pkg/reconcile
4949
func (r *CaptainReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
5050
_ = log.FromContext(ctx)
5151

0 commit comments

Comments
 (0)