Skip to content

Commit b394e34

Browse files
authored
Update golang & k8s dependencies (#167)
* Update golang & k8s dependencies * Updated golang version to 1.21 * Updated k8s dependencies to v0.29.2 * Updated operator-framework/api to v0.23.0 * Copy test fixes. * Fix lint issues Update golangci-lint to 1.57 Apply lint fixes * Fix lint issues
1 parent 3bfabe0 commit b394e34

File tree

8 files changed

+229
-144
lines changed

8 files changed

+229
-144
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
go-version-file: "go.mod"
3434
- uses: golangci/golangci-lint-action@v4
3535
with:
36-
version: v1.51
36+
version: v1.57
3737
args: --timeout 5m
3838

3939
go-apidiff:

go.mod

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
module github.com/operator-framework/operator-lib
22

3-
go 1.20
3+
go 1.21
44

55
require (
66
github.com/go-logr/logr v1.4.1
77
github.com/onsi/ginkgo/v2 v2.17.1
88
github.com/onsi/gomega v1.32.0
9-
github.com/operator-framework/api v0.21.0
9+
github.com/operator-framework/api v0.23.0
1010
github.com/prometheus/client_golang v1.19.0
1111
github.com/prometheus/client_model v0.6.1
12-
k8s.io/api v0.28.5
13-
k8s.io/apimachinery v0.28.5
14-
k8s.io/client-go v0.28.5
15-
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
16-
sigs.k8s.io/controller-runtime v0.16.3
12+
k8s.io/api v0.29.2
13+
k8s.io/apimachinery v0.29.2
14+
k8s.io/client-go v0.29.2
15+
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
16+
sigs.k8s.io/controller-runtime v0.17.2
1717
)
1818

1919
require (
2020
github.com/beorn7/perks v1.0.1 // indirect
2121
github.com/cespare/xxhash/v2 v2.2.0 // indirect
2222
github.com/davecgh/go-spew v1.1.1 // indirect
23-
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
23+
github.com/emicklei/go-restful/v3 v3.11.2 // indirect
2424
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
25-
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
26-
github.com/fsnotify/fsnotify v1.6.0 // indirect
27-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
28-
github.com/go-openapi/jsonreference v0.20.2 // indirect
29-
github.com/go-openapi/swag v0.22.3 // indirect
25+
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
26+
github.com/fsnotify/fsnotify v1.7.0 // indirect
27+
github.com/go-openapi/jsonpointer v0.20.2 // indirect
28+
github.com/go-openapi/jsonreference v0.20.4 // indirect
29+
github.com/go-openapi/swag v0.22.9 // indirect
3030
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
3131
github.com/gogo/protobuf v1.3.2 // indirect
3232
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
@@ -35,8 +35,8 @@ require (
3535
github.com/google/go-cmp v0.6.0 // indirect
3636
github.com/google/gofuzz v1.2.0 // indirect
3737
github.com/google/pprof v0.0.0-20230510103437-eeec1cb781c3 // indirect
38-
github.com/google/uuid v1.3.1 // indirect
39-
github.com/imdario/mergo v0.3.12 // indirect
38+
github.com/google/uuid v1.6.0 // indirect
39+
github.com/imdario/mergo v0.3.16 // indirect
4040
github.com/josharian/intern v1.0.0 // indirect
4141
github.com/json-iterator/go v1.1.12 // indirect
4242
github.com/mailru/easyjson v0.7.7 // indirect
@@ -47,25 +47,25 @@ require (
4747
github.com/prometheus/common v0.48.0 // indirect
4848
github.com/prometheus/procfs v0.12.0 // indirect
4949
github.com/spf13/pflag v1.0.5 // indirect
50-
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
51-
golang.org/x/net v0.20.0 // indirect
52-
golang.org/x/oauth2 v0.16.0 // indirect
53-
golang.org/x/sys v0.16.0 // indirect
54-
golang.org/x/term v0.16.0 // indirect
50+
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
51+
golang.org/x/net v0.21.0 // indirect
52+
golang.org/x/oauth2 v0.17.0 // indirect
53+
golang.org/x/sys v0.17.0 // indirect
54+
golang.org/x/term v0.17.0 // indirect
5555
golang.org/x/text v0.14.0 // indirect
56-
golang.org/x/time v0.3.0 // indirect
57-
golang.org/x/tools v0.17.0 // indirect
56+
golang.org/x/time v0.5.0 // indirect
57+
golang.org/x/tools v0.18.0 // indirect
5858
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
59-
google.golang.org/appengine v1.6.7 // indirect
59+
google.golang.org/appengine v1.6.8 // indirect
6060
google.golang.org/protobuf v1.33.0 // indirect
6161
gopkg.in/inf.v0 v0.9.1 // indirect
6262
gopkg.in/yaml.v2 v2.4.0 // indirect
6363
gopkg.in/yaml.v3 v3.0.1 // indirect
64-
k8s.io/apiextensions-apiserver v0.28.5 // indirect
65-
k8s.io/component-base v0.28.5 // indirect
66-
k8s.io/klog/v2 v2.100.1 // indirect
67-
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
64+
k8s.io/apiextensions-apiserver v0.29.2 // indirect
65+
k8s.io/component-base v0.29.2 // indirect
66+
k8s.io/klog/v2 v2.120.1 // indirect
67+
k8s.io/kube-openapi v0.0.0-20240221221325-2ac9dc51f3f1 // indirect
6868
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
69-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
70-
sigs.k8s.io/yaml v1.3.0 // indirect
69+
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
70+
sigs.k8s.io/yaml v1.4.0 // indirect
7171
)

go.sum

Lines changed: 84 additions & 77 deletions
Large diffs are not rendered by default.

leader/leader.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ func Become(ctx context.Context, lockName string, opts ...Option) error {
199199
log.Info("the status of the node where operator pod with leader lock was running has been 'notReady'")
200200
log.Info("Deleting the leader.")
201201

202-
//Mark the termainating status to the leaderPod and Delete the configmap lock
202+
// Mark the termainating status to the leaderPod and Delete the configmap lock
203203
if err := deleteLeader(ctx, config.Client, leaderPod, existing); err != nil {
204204
return err
205205
}
@@ -274,11 +274,6 @@ func getPod(ctx context.Context, client crclient.Client, ns string) (*corev1.Pod
274274
return nil, err
275275
}
276276

277-
// .Get() clears the APIVersion and Kind,
278-
// so we need to set them before returning the object.
279-
pod.TypeMeta.APIVersion = "v1"
280-
pod.TypeMeta.Kind = "Pod"
281-
282277
log.V(1).Info("Found Pod", "Pod.Namespace", ns, "Pod.Name", pod.Name)
283278

284279
return pod, nil

0 commit comments

Comments
 (0)