Skip to content

Commit d9d0668

Browse files
authored
Merge pull request #126 from elmiko/update-to-capi1.9
update to capi 1.9 and k8s 1.31
2 parents c47e47f + c02ff7b commit d9d0668

17 files changed

+255
-260
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
if: (github.repository == 'kubernetes-sigs/cluster-api-provider-kubemark')
66
strategy:
77
matrix:
8-
go-version: [1.21.x]
8+
go-version: [1.22.x]
99
os: [ubuntu-latest]
1010
runs-on: ${{ matrix.os }}
1111
steps:
@@ -23,7 +23,7 @@ jobs:
2323
pr-verify:
2424
strategy:
2525
matrix:
26-
go-version: [1.21.x]
26+
go-version: [1.22.x]
2727
os: [ubuntu-latest]
2828
runs-on: ${{ matrix.os }}
2929
steps:

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
run:
22
timeout: 10m
3-
go: "1.21"
3+
go: "1.22"
44
build-tags:
55
- tools
66
skip-files:

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# limitations under the License.
1616

1717
# Build the manager binary
18-
FROM golang:1.21 as builder
18+
FROM golang:1.22 as builder
1919

2020
WORKDIR /workspace
2121

config/crd/bases/infrastructure.cluster.x-k8s.io_kubemarkmachines.yaml

Lines changed: 5 additions & 6 deletions
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.15.0
6+
controller-gen.kubebuilder.io/version: v0.16.3
77
name: kubemarkmachines.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -99,7 +99,6 @@ spec:
9999
the event) or if no container name is specified "spec.containers[2]" (container with
100100
index 2 in this pod). This syntax is chosen only to have some well-defined way of
101101
referencing a part of an object.
102-
TODO: this design is not final and this field is subject to change in the future.
103102
type: string
104103
kind:
105104
description: |-
@@ -177,20 +176,20 @@ spec:
177176
description: |-
178177
The reason for the condition's last transition in CamelCase.
179178
The specific API may choose whether or not this field is considered a guaranteed API.
180-
This field may not be empty.
179+
This field may be empty.
181180
type: string
182181
severity:
183182
description: |-
184-
Severity provides an explicit classification of Reason code, so the users or machines can immediately
183+
severity provides an explicit classification of Reason code, so the users or machines can immediately
185184
understand the current situation and act accordingly.
186185
The Severity field MUST be set only when Status=False.
187186
type: string
188187
status:
189-
description: Status of the condition, one of True, False, Unknown.
188+
description: status of the condition, one of True, False, Unknown.
190189
type: string
191190
type:
192191
description: |-
193-
Type of condition in CamelCase or in foo.example.com/CamelCase.
192+
type of condition in CamelCase or in foo.example.com/CamelCase.
194193
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
195194
can be useful (see .node.status.conditions), the ability to deconflict is important.
196195
type: string

config/crd/bases/infrastructure.cluster.x-k8s.io_kubemarkmachinetemplates.yaml

Lines changed: 1 addition & 2 deletions
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.15.0
6+
controller-gen.kubebuilder.io/version: v0.16.3
77
name: kubemarkmachinetemplates.infrastructure.cluster.x-k8s.io
88
spec:
99
group: infrastructure.cluster.x-k8s.io
@@ -109,7 +109,6 @@ spec:
109109
the event) or if no container name is specified "spec.containers[2]" (container with
110110
index 2 in this pod). This syntax is chosen only to have some well-defined way of
111111
referencing a part of an object.
112-
TODO: this design is not final and this field is subject to change in the future.
113112
type: string
114113
kind:
115114
description: |-

config/rbac/role.yaml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,6 @@ rules:
5353
- infrastructure.cluster.x-k8s.io
5454
resources:
5555
- kubemarkmachines
56-
verbs:
57-
- create
58-
- delete
59-
- get
60-
- list
61-
- patch
62-
- update
63-
- watch
64-
- apiGroups:
65-
- infrastructure.cluster.x-k8s.io
66-
resources:
67-
- kubemarkmachines/status
68-
verbs:
69-
- get
70-
- patch
71-
- update
72-
- apiGroups:
73-
- infrastructure.cluster.x-k8s.io
74-
resources:
7556
- kubemarkmachinetemplates
7657
verbs:
7758
- create
@@ -84,6 +65,7 @@ rules:
8465
- apiGroups:
8566
- infrastructure.cluster.x-k8s.io
8667
resources:
68+
- kubemarkmachines/status
8769
- kubemarkmachinetemplates/status
8870
verbs:
8971
- get

controllers/kubemarkmachine_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (r *KubemarkMachineReconciler) SetupWithManager(ctx context.Context, mgr ct
8787
&clusterv1.Machine{},
8888
handler.EnqueueRequestsFromMapFunc(util.MachineToInfrastructureMapFunc(infrav1.GroupVersion.WithKind("KubemarkMachine"))),
8989
).
90-
WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), r.WatchFilterValue)).
90+
WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(r.Scheme, ctrl.LoggerFrom(ctx), r.WatchFilterValue)).
9191
Build(r)
9292
if err != nil {
9393
return errors.Wrap(err, "failed setting up with a controller manager")
@@ -98,7 +98,7 @@ func (r *KubemarkMachineReconciler) SetupWithManager(ctx context.Context, mgr ct
9898
return errors.Wrap(err, "failed create MapFunc for Watch for Clusters to KubemarkMachines")
9999
}
100100
err = c.Watch(
101-
source.Kind[client.Object](mgr.GetCache(), &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(clusterToKubemarkMachines), predicates.ClusterUnpausedAndInfrastructureReady(ctrl.LoggerFrom(ctx))),
101+
source.Kind[client.Object](mgr.GetCache(), &clusterv1.Cluster{}, handler.EnqueueRequestsFromMapFunc(clusterToKubemarkMachines), predicates.ClusterUnpausedAndInfrastructureReady(r.Scheme, ctrl.LoggerFrom(ctx))),
102102
)
103103
if err != nil {
104104
return errors.Wrap(err, "failed adding Watch for Clusters to KubemarkMachines")

controllers/kubemarkmachinetemplate_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (r *KubemarkMachineTemplateReconciler) SetupWithManager(ctx context.Context
4646
return ctrl.NewControllerManagedBy(mgr).
4747
For(&infrav1.KubemarkMachineTemplate{}).
4848
WithOptions(options).
49-
WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(ctrl.LoggerFrom(ctx), r.WatchFilterValue)).
49+
WithEventFilter(predicates.ResourceNotPausedAndHasFilterLabel(r.Scheme, ctrl.LoggerFrom(ctx), r.WatchFilterValue)).
5050
Complete(r)
5151
}
5252

go.mod

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -8,91 +8,93 @@ require (
88
github.com/Masterminds/semver v1.5.0
99
github.com/pkg/errors v0.9.1
1010
github.com/spf13/pflag v1.0.6
11-
k8s.io/api v0.30.3
12-
k8s.io/apimachinery v0.30.3
13-
k8s.io/client-go v0.30.3
14-
k8s.io/component-base v0.30.3
15-
k8s.io/klog/v2 v2.120.1
16-
k8s.io/utils v0.0.0-20231127182322-b307cd553661
17-
sigs.k8s.io/cluster-api v1.8.8
18-
sigs.k8s.io/controller-runtime v0.18.7
11+
k8s.io/api v0.31.3
12+
k8s.io/apimachinery v0.31.3
13+
k8s.io/client-go v0.31.3
14+
k8s.io/component-base v0.31.3
15+
k8s.io/klog/v2 v2.130.1
16+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
17+
sigs.k8s.io/cluster-api v1.9.7
18+
sigs.k8s.io/controller-runtime v0.19.6
1919
)
2020

2121
require (
2222
github.com/NYTimes/gziphandler v1.1.1 // indirect
23-
github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
23+
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
24+
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a // indirect
2425
github.com/beorn7/perks v1.0.1 // indirect
2526
github.com/blang/semver/v4 v4.0.0 // indirect
26-
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
27-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
27+
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
28+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2829
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
2930
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
3031
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
3132
github.com/felixge/httpsnoop v1.0.4 // indirect
3233
github.com/fsnotify/fsnotify v1.7.0 // indirect
34+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
3335
github.com/go-logr/logr v1.4.2 // indirect
3436
github.com/go-logr/stdr v1.2.2 // indirect
3537
github.com/go-logr/zapr v1.3.0 // indirect
3638
github.com/go-openapi/jsonpointer v0.19.6 // indirect
3739
github.com/go-openapi/jsonreference v0.20.2 // indirect
38-
github.com/go-openapi/swag v0.22.3 // indirect
39-
github.com/gobuffalo/flect v1.0.2 // indirect
40+
github.com/go-openapi/swag v0.22.4 // indirect
41+
github.com/gobuffalo/flect v1.0.3 // indirect
4042
github.com/gogo/protobuf v1.3.2 // indirect
4143
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
4244
github.com/golang/protobuf v1.5.4 // indirect
43-
github.com/google/cel-go v0.17.8 // indirect
45+
github.com/google/cel-go v0.20.1 // indirect
4446
github.com/google/gnostic-models v0.6.8 // indirect
4547
github.com/google/go-cmp v0.6.0 // indirect
4648
github.com/google/gofuzz v1.2.0 // indirect
4749
github.com/google/uuid v1.6.0 // indirect
48-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
50+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
4951
github.com/imdario/mergo v0.3.13 // indirect
5052
github.com/inconshreveable/mousetrap v1.1.0 // indirect
5153
github.com/josharian/intern v1.0.0 // indirect
5254
github.com/json-iterator/go v1.1.12 // indirect
5355
github.com/mailru/easyjson v0.7.7 // indirect
54-
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
5556
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5657
github.com/modern-go/reflect2 v1.0.2 // indirect
5758
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
58-
github.com/onsi/gomega v1.34.0 // indirect
59-
github.com/prometheus/client_golang v1.18.0 // indirect
60-
github.com/prometheus/client_model v0.6.0 // indirect
61-
github.com/prometheus/common v0.45.0 // indirect
62-
github.com/prometheus/procfs v0.12.0 // indirect
59+
github.com/onsi/gomega v1.36.0 // indirect
60+
github.com/prometheus/client_golang v1.19.1 // indirect
61+
github.com/prometheus/client_model v0.6.1 // indirect
62+
github.com/prometheus/common v0.55.0 // indirect
63+
github.com/prometheus/procfs v0.15.1 // indirect
6364
github.com/spf13/cobra v1.8.1 // indirect
6465
github.com/stoewer/go-strcase v1.2.0 // indirect
65-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
66-
go.opentelemetry.io/otel v1.24.0 // indirect
67-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect
68-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect
69-
go.opentelemetry.io/otel/metric v1.24.0 // indirect
70-
go.opentelemetry.io/otel/sdk v1.20.0 // indirect
71-
go.opentelemetry.io/otel/trace v1.24.0 // indirect
72-
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
66+
github.com/x448/float16 v0.8.4 // indirect
67+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
68+
go.opentelemetry.io/otel v1.28.0 // indirect
69+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
70+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 // indirect
71+
go.opentelemetry.io/otel/metric v1.28.0 // indirect
72+
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
73+
go.opentelemetry.io/otel/trace v1.28.0 // indirect
74+
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
7375
go.uber.org/multierr v1.11.0 // indirect
7476
go.uber.org/zap v1.27.0 // indirect
75-
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
77+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
7678
golang.org/x/net v0.33.0 // indirect
77-
golang.org/x/oauth2 v0.21.0 // indirect
79+
golang.org/x/oauth2 v0.24.0 // indirect
7880
golang.org/x/sync v0.10.0 // indirect
7981
golang.org/x/sys v0.28.0 // indirect
8082
golang.org/x/term v0.27.0 // indirect
8183
golang.org/x/text v0.21.0 // indirect
8284
golang.org/x/time v0.5.0 // indirect
8385
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
84-
google.golang.org/genproto/googleapis/api v0.0.0-20240311132316-a219d84964c2 // indirect
85-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240314234333-6e1732d8331c // indirect
86-
google.golang.org/grpc v1.62.2 // indirect
87-
google.golang.org/protobuf v1.34.1 // indirect
86+
google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect
87+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
88+
google.golang.org/grpc v1.65.1 // indirect
89+
google.golang.org/protobuf v1.35.1 // indirect
8890
gopkg.in/inf.v0 v0.9.1 // indirect
8991
gopkg.in/yaml.v2 v2.4.0 // indirect
9092
gopkg.in/yaml.v3 v3.0.1 // indirect
91-
k8s.io/apiextensions-apiserver v0.30.3 // indirect
92-
k8s.io/apiserver v0.30.3 // indirect
93-
k8s.io/cluster-bootstrap v0.30.3 // indirect
93+
k8s.io/apiextensions-apiserver v0.31.3 // indirect
94+
k8s.io/apiserver v0.31.3 // indirect
95+
k8s.io/cluster-bootstrap v0.31.3 // indirect
9496
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
95-
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.0 // indirect
97+
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.30.3 // indirect
9698
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
9799
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
98100
sigs.k8s.io/yaml v1.4.0 // indirect

0 commit comments

Comments
 (0)