Skip to content

Commit fcc0dda

Browse files
committed
Update Kubernetes dependencies to support v1.32
Signed-off-by: Todd Ekenstam <[email protected]>
1 parent e30970d commit fcc0dda

File tree

7 files changed

+199
-251
lines changed

7 files changed

+199
-251
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export GO111MODULE=on
22

3-
CONTROLLER_GEN_VERSION := v0.14.0
3+
CONTROLLER_GEN_VERSION := v0.17.2
44
GO_MIN_VERSION := 12000 # go1.20
55

66
define generate_int_from_semver

config/crd/bases/instancemgr.keikoproj.io_instancegroups.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.14.0
6+
controller-gen.kubebuilder.io/version: v0.17.2
77
name: instancegroups.instancemgr.keikoproj.io
88
spec:
99
group: instancemgr.keikoproj.io

config/rbac/role.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@ kind: ClusterRole
44
metadata:
55
name: instance-manager
66
rules:
7-
- apiGroups:
8-
- apiextensions.k8s.io
9-
resources:
10-
- customresourcedefinitions
11-
verbs:
12-
- create
13-
- delete
14-
- get
15-
- list
16-
- patch
17-
- update
18-
- watch
197
- apiGroups:
208
- ""
219
resources:
@@ -52,6 +40,18 @@ rules:
5240
- list
5341
- patch
5442
- watch
43+
- apiGroups:
44+
- apiextensions.k8s.io
45+
resources:
46+
- customresourcedefinitions
47+
verbs:
48+
- create
49+
- delete
50+
- get
51+
- list
52+
- patch
53+
- update
54+
- watch
5555
- apiGroups:
5656
- instancemgr.keikoproj.io
5757
resources:

controllers/reconcilers.go

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import (
3737
"sigs.k8s.io/controller-runtime/pkg/client"
3838
"sigs.k8s.io/controller-runtime/pkg/controller"
3939
"sigs.k8s.io/controller-runtime/pkg/handler"
40-
"sigs.k8s.io/controller-runtime/pkg/source"
4140
)
4241

4342
const (
@@ -49,18 +48,53 @@ func (r *InstanceGroupReconciler) SetupWithManager(mgr ctrl.Manager) error {
4948
case true:
5049
return ctrl.NewControllerManagedBy(mgr).
5150
For(&v1alpha1.InstanceGroup{}).
52-
Watches(&source.Kind{Type: &corev1.Event{}}, handler.EnqueueRequestsFromMapFunc(r.spotEventReconciler)).
53-
Watches(&source.Kind{Type: &corev1.Node{}}, handler.EnqueueRequestsFromMapFunc(r.nodeReconciler)).
54-
Watches(&source.Kind{Type: &corev1.ConfigMap{}}, handler.EnqueueRequestsFromMapFunc(r.configMapReconciler)).
55-
Watches(&source.Kind{Type: &corev1.Namespace{}}, handler.EnqueueRequestsFromMapFunc(r.namespaceReconciler)).
51+
Watches(
52+
&corev1.Event{},
53+
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []ctrl.Request {
54+
return r.spotEventReconciler(obj)
55+
}),
56+
).
57+
Watches(
58+
&corev1.Node{},
59+
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []ctrl.Request {
60+
return r.nodeReconciler(obj)
61+
}),
62+
).
63+
Watches(
64+
&corev1.ConfigMap{},
65+
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []ctrl.Request {
66+
return r.configMapReconciler(obj)
67+
}),
68+
).
69+
Watches(
70+
&corev1.Namespace{},
71+
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []ctrl.Request {
72+
return r.namespaceReconciler(obj)
73+
}),
74+
).
5675
WithOptions(controller.Options{MaxConcurrentReconciles: r.MaxParallel}).
5776
Complete(r)
5877
default:
5978
return ctrl.NewControllerManagedBy(mgr).
6079
For(&v1alpha1.InstanceGroup{}).
61-
Watches(&source.Kind{Type: &corev1.Event{}}, handler.EnqueueRequestsFromMapFunc(r.spotEventReconciler)).
62-
Watches(&source.Kind{Type: &corev1.ConfigMap{}}, handler.EnqueueRequestsFromMapFunc(r.configMapReconciler)).
63-
Watches(&source.Kind{Type: &corev1.Namespace{}}, handler.EnqueueRequestsFromMapFunc(r.namespaceReconciler)).
80+
Watches(
81+
&corev1.Event{},
82+
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []ctrl.Request {
83+
return r.spotEventReconciler(obj)
84+
}),
85+
).
86+
Watches(
87+
&corev1.ConfigMap{},
88+
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []ctrl.Request {
89+
return r.configMapReconciler(obj)
90+
}),
91+
).
92+
Watches(
93+
&corev1.Namespace{},
94+
handler.EnqueueRequestsFromMapFunc(func(ctx context.Context, obj client.Object) []ctrl.Request {
95+
return r.namespaceReconciler(obj)
96+
}),
97+
).
6498
WithOptions(controller.Options{MaxConcurrentReconciles: r.MaxParallel}).
6599
Complete(r)
66100
}

go.mod

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,40 @@ require (
1313
github.com/go-logr/logr v1.4.2
1414
github.com/keikoproj/aws-auth v0.5.0
1515
github.com/keikoproj/aws-sdk-go-cache v0.1.0
16-
github.com/onsi/gomega v1.33.1
16+
github.com/onsi/gomega v1.36.3
1717
github.com/pkg/errors v0.9.1
1818
github.com/prometheus/client_golang v1.21.1
1919
github.com/sirupsen/logrus v1.9.3
2020
golang.org/x/oauth2 v0.25.0 // indirect
21-
k8s.io/api v0.26.15
22-
k8s.io/apimachinery v0.26.15
23-
k8s.io/client-go v0.26.15
24-
k8s.io/code-generator v0.27.16
25-
sigs.k8s.io/controller-runtime v0.14.7
21+
k8s.io/api v0.32.3
22+
k8s.io/apimachinery v0.32.3
23+
k8s.io/client-go v0.32.3
24+
k8s.io/code-generator v0.32.3
25+
sigs.k8s.io/controller-runtime v0.20.4
2626
)
2727

28-
require golang.org/x/text v0.22.0
28+
require golang.org/x/text v0.23.0
2929

3030
require (
3131
github.com/beorn7/perks v1.0.1 // indirect
3232
github.com/cespare/xxhash/v2 v2.3.0 // indirect
33-
github.com/davecgh/go-spew v1.1.1 // indirect
34-
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
35-
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
36-
github.com/fsnotify/fsnotify v1.6.0 // indirect
37-
github.com/go-logr/zapr v1.2.3 // indirect
38-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
39-
github.com/go-openapi/jsonreference v0.20.1 // indirect
40-
github.com/go-openapi/swag v0.22.3 // indirect
33+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
34+
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
35+
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
36+
github.com/fsnotify/fsnotify v1.7.0 // indirect
37+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
38+
github.com/go-logr/zapr v1.3.0 // indirect
39+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
40+
github.com/go-openapi/jsonreference v0.20.2 // indirect
41+
github.com/go-openapi/swag v0.23.0 // indirect
4142
github.com/gogo/protobuf v1.3.2 // indirect
4243
github.com/golang/glog v1.2.4 // indirect
43-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
4444
github.com/golang/protobuf v1.5.4 // indirect
45-
github.com/google/gnostic v0.5.7-v3refs // indirect
45+
github.com/google/btree v1.1.3 // indirect
46+
github.com/google/gnostic-models v0.6.8 // indirect
4647
github.com/google/go-cmp v0.7.0 // indirect
47-
github.com/google/gofuzz v1.1.0 // indirect
48-
github.com/google/uuid v1.3.0 // indirect
49-
github.com/imdario/mergo v0.3.12 // indirect
48+
github.com/google/gofuzz v1.2.0 // indirect
49+
github.com/google/uuid v1.6.0 // indirect
5050
github.com/jmespath/go-jmespath v0.4.0 // indirect
5151
github.com/josharian/intern v1.0.0 // indirect
5252
github.com/jpillora/backoff v1.0.0 // indirect
@@ -60,29 +60,29 @@ require (
6060
github.com/prometheus/client_model v0.6.1 // indirect
6161
github.com/prometheus/common v0.63.0 // indirect
6262
github.com/prometheus/procfs v0.16.0 // indirect
63-
github.com/rogpeppe/go-internal v1.11.0 // indirect
6463
github.com/spf13/pflag v1.0.5 // indirect
65-
go.uber.org/atomic v1.7.0 // indirect
66-
go.uber.org/multierr v1.6.0 // indirect
67-
go.uber.org/zap v1.24.0 // indirect
68-
golang.org/x/mod v0.17.0 // indirect
69-
golang.org/x/net v0.36.0 // indirect
64+
github.com/x448/float16 v0.8.4 // indirect
65+
go.uber.org/multierr v1.11.0 // indirect
66+
go.uber.org/zap v1.27.0 // indirect
67+
golang.org/x/mod v0.23.0 // indirect
68+
golang.org/x/net v0.37.0 // indirect
69+
golang.org/x/sync v0.12.0 // indirect
7070
golang.org/x/sys v0.31.0 // indirect
71-
golang.org/x/term v0.29.0 // indirect
72-
golang.org/x/time v0.3.0 // indirect
73-
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
74-
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
71+
golang.org/x/term v0.30.0 // indirect
72+
golang.org/x/time v0.7.0 // indirect
73+
golang.org/x/tools v0.30.0 // indirect
74+
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
7575
google.golang.org/protobuf v1.36.6 // indirect
76+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
7677
gopkg.in/inf.v0 v0.9.1 // indirect
7778
gopkg.in/yaml.v2 v2.4.0 // indirect
7879
gopkg.in/yaml.v3 v3.0.1 // indirect
79-
k8s.io/apiextensions-apiserver v0.26.10 // indirect
80-
k8s.io/component-base v0.26.10 // indirect
81-
k8s.io/gengo v0.0.0-20220902162205-c0856e24416d // indirect
82-
k8s.io/klog/v2 v2.90.1 // indirect
83-
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
84-
k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect
85-
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
86-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
87-
sigs.k8s.io/yaml v1.3.0 // indirect
80+
k8s.io/apiextensions-apiserver v0.32.3 // indirect
81+
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect
82+
k8s.io/klog/v2 v2.130.1 // indirect
83+
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
84+
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
85+
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
86+
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
87+
sigs.k8s.io/yaml v1.4.0 // indirect
8888
)

0 commit comments

Comments
 (0)