Skip to content

Commit b6b191f

Browse files
committed
go 1.20; controller-runtime v0.14.6
1 parent beaa93e commit b6b191f

File tree

12 files changed

+113
-81
lines changed

12 files changed

+113
-81
lines changed

.github/workflows/build-images-base.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ jobs:
7676
name: Build Bundle
7777
runs-on: ubuntu-latest
7878
steps:
79-
- name: Set up Go 1.19.x
79+
- name: Set up Go 1.20.x
8080
uses: actions/setup-go@v4
8181
with:
82-
go-version: 1.19.x
82+
go-version: 1.20.x
8383
id: go
8484
- name: Check out code
8585
uses: actions/checkout@v3
@@ -119,10 +119,10 @@ jobs:
119119
needs: [build, build-bundle]
120120
runs-on: ubuntu-latest
121121
steps:
122-
- name: Set up Go 1.19.x
122+
- name: Set up Go 1.20.x
123123
uses: actions/setup-go@v4
124124
with:
125-
go-version: 1.19.x
125+
go-version: 1.20.x
126126
id: go
127127
- name: Check out code
128128
uses: actions/checkout@v3

.github/workflows/test.yaml

+10-10
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
name: Test
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Set up Go 1.19.x
16+
- name: Set up Go 1.20.x
1717
uses: actions/setup-go@v4
1818
with:
19-
go-version: 1.19.x
19+
go-version: 1.20.x
2020
id: go
2121
- uses: actions/checkout@v3
2222
- name: Run the tests
@@ -32,10 +32,10 @@ jobs:
3232
name: Verify manifests
3333
runs-on: ubuntu-latest
3434
steps:
35-
- name: Set up Go 1.19.x
35+
- name: Set up Go 1.20.x
3636
uses: actions/setup-go@v4
3737
with:
38-
go-version: 1.19.x
38+
go-version: 1.20.x
3939
id: go
4040
- uses: actions/checkout@v3
4141
- name: Verify manifests
@@ -44,10 +44,10 @@ jobs:
4444
name: Verify bundle
4545
runs-on: ubuntu-latest
4646
steps:
47-
- name: Set up Go 1.19.x
47+
- name: Set up Go 1.20.x
4848
uses: actions/setup-go@v4
4949
with:
50-
go-version: 1.19.x
50+
go-version: 1.20.x
5151
id: go
5252
- name: Check out code
5353
uses: actions/checkout@v3
@@ -58,10 +58,10 @@ jobs:
5858
name: Verify fmt
5959
runs-on: ubuntu-latest
6060
steps:
61-
- name: Set up Go 1.19.x
61+
- name: Set up Go 1.20.x
6262
uses: actions/setup-go@v4
6363
with:
64-
go-version: 1.19.x
64+
go-version: 1.20.x
6565
id: go
6666
- name: Check out code
6767
uses: actions/checkout@v3
@@ -72,10 +72,10 @@ jobs:
7272
name: Lint
7373
runs-on: ubuntu-latest
7474
steps:
75-
- name: Set up Go 1.19.x
75+
- name: Set up Go 1.20.x
7676
uses: actions/setup-go@v4
7777
with:
78-
go-version: 1.19.x
78+
go-version: 1.20.x
7979
id: go
8080
- name: Check out code
8181
uses: actions/checkout@v3

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.19 as builder
2+
FROM golang:1.20 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ all: build
104104
##@ Tools
105105

106106
OPERATOR_SDK = $(PROJECT_PATH)/bin/operator-sdk
107-
OPERATOR_SDK_VERSION = v1.22.0
107+
OPERATOR_SDK_VERSION = v1.28.0
108108
$(OPERATOR_SDK):
109109
./utils/install-operator-sdk.sh $(OPERATOR_SDK) $(OPERATOR_SDK_VERSION)
110110

@@ -163,7 +163,7 @@ act: $(ACT) ## Download act locally if necessary.
163163

164164
GOLANGCI-LINT = $(PROJECT_PATH)/bin/golangci-lint
165165
$(GOLANGCI-LINT):
166-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(PROJECT_PATH)/bin v1.50.1
166+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(PROJECT_PATH)/bin v1.54.2
167167

168168
.PHONY: golangci-lint
169169
golangci-lint: $(GOLANGCI-LINT) ## Download golangci-lint locally if necessary.

controllers/limitador_controller.go

+6-14
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,7 @@ func (r *LimitadorReconciler) Reconcile(eventCtx context.Context, req ctrl.Reque
8080
return ctrl.Result{}, nil
8181
}
8282

83-
specResult, specErr := r.reconcileSpec(ctx, limitadorObj)
84-
if specErr == nil && specResult.Requeue {
85-
logger.V(1).Info("Reconciling spec not finished. Requeueing.")
86-
return specResult, nil
87-
}
83+
specErr := r.reconcileSpec(ctx, limitadorObj)
8884

8985
statusResult, statusErr := r.reconcileStatus(ctx, limitadorObj, specErr)
9086

@@ -105,24 +101,20 @@ func (r *LimitadorReconciler) Reconcile(eventCtx context.Context, req ctrl.Reque
105101
return ctrl.Result{}, nil
106102
}
107103

108-
func (r *LimitadorReconciler) reconcileSpec(ctx context.Context, limitadorObj *limitadorv1alpha1.Limitador) (ctrl.Result, error) {
104+
func (r *LimitadorReconciler) reconcileSpec(ctx context.Context, limitadorObj *limitadorv1alpha1.Limitador) error {
109105
if err := r.reconcileService(ctx, limitadorObj); err != nil {
110-
return ctrl.Result{}, err
106+
return err
111107
}
112108

113109
if err := r.reconcileDeployment(ctx, limitadorObj); err != nil {
114-
return ctrl.Result{}, err
110+
return err
115111
}
116112

117113
if err := r.reconcileLimitsConfigMap(ctx, limitadorObj); err != nil {
118-
return ctrl.Result{}, err
119-
}
120-
121-
if err := r.reconcilePdb(ctx, limitadorObj); err != nil {
122-
return ctrl.Result{}, err
114+
return err
123115
}
124116

125-
return ctrl.Result{}, nil
117+
return r.reconcilePdb(ctx, limitadorObj)
126118
}
127119

128120
func (r *LimitadorReconciler) reconcilePdb(ctx context.Context, limitadorObj *limitadorv1alpha1.Limitador) error {

go.mod

+27-25
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
module github.com/kuadrant/limitador-operator
22

3-
go 1.19
3+
go 1.20
44

55
require (
66
github.com/go-logr/logr v1.2.4
77
github.com/google/go-cmp v0.5.9
88
github.com/onsi/ginkgo/v2 v2.11.0
99
github.com/onsi/gomega v1.27.8
10-
go.uber.org/zap v1.19.1
10+
go.uber.org/zap v1.24.0
1111
gotest.tools v2.2.0+incompatible
12-
k8s.io/api v0.24.2
13-
k8s.io/apimachinery v0.24.2
14-
k8s.io/client-go v0.24.2
15-
k8s.io/klog/v2 v2.60.1
16-
sigs.k8s.io/controller-runtime v0.12.2
12+
k8s.io/api v0.26.1
13+
k8s.io/apimachinery v0.26.1
14+
k8s.io/client-go v0.26.1
15+
k8s.io/klog/v2 v2.80.1
16+
sigs.k8s.io/controller-runtime v0.14.6
1717
sigs.k8s.io/yaml v1.3.0
1818
)
1919

@@ -31,12 +31,14 @@ require (
3131
github.com/cespare/xxhash/v2 v2.1.2 // indirect
3232
github.com/davecgh/go-spew v1.1.1 // indirect
3333
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
34+
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
3435
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
36+
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
3537
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
36-
github.com/fsnotify/fsnotify v1.5.1 // indirect
37-
github.com/go-logr/zapr v1.2.0 // indirect
38+
github.com/fsnotify/fsnotify v1.6.0 // indirect
39+
github.com/go-logr/zapr v1.2.3 // indirect
3840
github.com/go-openapi/jsonpointer v0.19.5 // indirect
39-
github.com/go-openapi/jsonreference v0.19.5 // indirect
41+
github.com/go-openapi/jsonreference v0.20.0 // indirect
4042
github.com/go-openapi/swag v0.19.14 // indirect
4143
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
4244
github.com/gogo/protobuf v1.3.2 // indirect
@@ -50,39 +52,39 @@ require (
5052
github.com/josharian/intern v1.0.0 // indirect
5153
github.com/json-iterator/go v1.1.12 // indirect
5254
github.com/mailru/easyjson v0.7.6 // indirect
53-
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
55+
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
5456
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5557
github.com/modern-go/reflect2 v1.0.2 // indirect
5658
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
5759
github.com/nxadm/tail v1.4.8 // indirect
5860
github.com/onsi/ginkgo v1.16.5 // indirect
5961
github.com/pkg/errors v0.9.1 // indirect
60-
github.com/prometheus/client_golang v1.12.1 // indirect
61-
github.com/prometheus/client_model v0.2.0 // indirect
62-
github.com/prometheus/common v0.32.1 // indirect
63-
github.com/prometheus/procfs v0.7.3 // indirect
62+
github.com/prometheus/client_golang v1.14.0 // indirect
63+
github.com/prometheus/client_model v0.3.0 // indirect
64+
github.com/prometheus/common v0.37.0 // indirect
65+
github.com/prometheus/procfs v0.8.0 // indirect
6466
github.com/spf13/pflag v1.0.5 // indirect
6567
go.uber.org/atomic v1.7.0 // indirect
6668
go.uber.org/multierr v1.6.0 // indirect
67-
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
69+
golang.org/x/crypto v0.1.0 // indirect
6870
golang.org/x/net v0.10.0 // indirect
69-
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
71+
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
7072
golang.org/x/sys v0.9.0 // indirect
7173
golang.org/x/term v0.8.0 // indirect
7274
golang.org/x/text v0.9.0 // indirect
73-
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
75+
golang.org/x/time v0.3.0 // indirect
7476
golang.org/x/tools v0.9.3 // indirect
7577
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
7678
google.golang.org/appengine v1.6.7 // indirect
77-
google.golang.org/protobuf v1.28.0 // indirect
79+
google.golang.org/protobuf v1.28.1 // indirect
7880
gopkg.in/inf.v0 v0.9.1 // indirect
7981
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
8082
gopkg.in/yaml.v2 v2.4.0 // indirect
8183
gopkg.in/yaml.v3 v3.0.1 // indirect
82-
k8s.io/apiextensions-apiserver v0.24.2 // indirect
83-
k8s.io/component-base v0.24.2 // indirect
84-
k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect
85-
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
86-
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
87-
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
84+
k8s.io/apiextensions-apiserver v0.26.1 // indirect
85+
k8s.io/component-base v0.26.1 // indirect
86+
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
87+
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
88+
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
89+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
8890
)

0 commit comments

Comments
 (0)