Skip to content

Commit 6180ef3

Browse files
Merge pull request #253 from jacobweinstock/update-bmclib-virtualmedia
Update dependencies: ## Description <!--- Please describe what this PR is going to change --> The impetus for this change is that there is a bug fix in bmclib for ISO mounting against some Supermicro systems. ## Why is this needed <!--- Link to issue you have raised --> Fixes: # ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
2 parents a0d1600 + 1cb7c9d commit 6180ef3

10 files changed

+128
-163
lines changed

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Image URL to use all building/pushing image targets
33
IMG ?= quay.io/tinkerbell/rufio:latest
44
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
5-
ENVTEST_K8S_VERSION = 1.28
5+
ENVTEST_K8S_VERSION = 1.31.0
66

77
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
88
ifeq (,$(shell go env GOBIN))
@@ -114,12 +114,12 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
114114
CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
115115
.PHONY: controller-gen
116116
controller-gen: ## Download controller-gen locally if necessary.
117-
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.15.0)
117+
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.16.4)
118118

119119
KUSTOMIZE = $(shell pwd)/bin/kustomize
120120
.PHONY: kustomize
121121
kustomize: ## Download kustomize locally if necessary.
122-
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
122+
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
123123

124124
ENVTEST = $(shell pwd)/bin/setup-envtest
125125
.PHONY: envtest

api/v1alpha1/zz_generated.deepcopy.go

+2-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/bmc.tinkerbell.org_jobs.yaml

+1-1
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.4
77
name: jobs.bmc.tinkerbell.org
88
spec:
99
group: bmc.tinkerbell.org

config/crd/bases/bmc.tinkerbell.org_machines.yaml

+1-1
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.4
77
name: machines.bmc.tinkerbell.org
88
spec:
99
group: bmc.tinkerbell.org

config/crd/bases/bmc.tinkerbell.org_tasks.yaml

+1-1
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.4
77
name: tasks.bmc.tinkerbell.org
88
spec:
99
group: bmc.tinkerbell.org

config/rbac/role.yaml

+4-50
Original file line numberDiff line numberDiff line change
@@ -16,57 +16,7 @@ rules:
1616
- bmc.tinkerbell.org
1717
resources:
1818
- jobs
19-
verbs:
20-
- create
21-
- delete
22-
- get
23-
- list
24-
- patch
25-
- update
26-
- watch
27-
- apiGroups:
28-
- bmc.tinkerbell.org
29-
resources:
30-
- jobs/finalizers
31-
verbs:
32-
- update
33-
- apiGroups:
34-
- bmc.tinkerbell.org
35-
resources:
36-
- jobs/status
37-
verbs:
38-
- get
39-
- patch
40-
- update
41-
- apiGroups:
42-
- bmc.tinkerbell.org
43-
resources:
4419
- machines
45-
verbs:
46-
- create
47-
- delete
48-
- get
49-
- list
50-
- patch
51-
- update
52-
- watch
53-
- apiGroups:
54-
- bmc.tinkerbell.org
55-
resources:
56-
- machines/finalizers
57-
verbs:
58-
- update
59-
- apiGroups:
60-
- bmc.tinkerbell.org
61-
resources:
62-
- machines/status
63-
verbs:
64-
- get
65-
- patch
66-
- update
67-
- apiGroups:
68-
- bmc.tinkerbell.org
69-
resources:
7020
- tasks
7121
verbs:
7222
- create
@@ -79,12 +29,16 @@ rules:
7929
- apiGroups:
8030
- bmc.tinkerbell.org
8131
resources:
32+
- jobs/finalizers
33+
- machines/finalizers
8234
- tasks/finalizers
8335
verbs:
8436
- update
8537
- apiGroups:
8638
- bmc.tinkerbell.org
8739
resources:
40+
- jobs/status
41+
- machines/status
8842
- tasks/status
8943
verbs:
9044
- get

controller/client.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"dario.cat/mergo"
1010
bmclib "github.com/bmc-toolbox/bmclib/v2"
1111
"github.com/bmc-toolbox/bmclib/v2/providers/rpc"
12+
"github.com/ccoveille/go-safecast"
1213
"github.com/go-logr/logr"
1314
"github.com/tinkerbell/rufio/api/v1alpha1"
1415
)
@@ -77,7 +78,12 @@ func (b BMCOptions) Translate(host string) []bmclib.Option {
7778

7879
// intelAmt options
7980
if b.IntelAMT != nil {
80-
amtPort := bmclib.WithIntelAMTPort(uint32(b.IntelAMT.Port))
81+
// must not be negative, must not be greater than the uint32 max value
82+
p, err := safecast.ToUint32(b.IntelAMT.Port)
83+
if err != nil {
84+
p = 16992
85+
}
86+
amtPort := bmclib.WithIntelAMTPort(p)
8187
amtScheme := bmclib.WithIntelAMTHostScheme(b.IntelAMT.HostScheme)
8288
o = append(o, amtPort, amtScheme)
8389
}

go.mod

+32-30
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,44 @@ toolchain go1.22.2
66

77
require (
88
dario.cat/mergo v1.0.1
9-
github.com/bmc-toolbox/bmclib/v2 v2.2.6
9+
github.com/bmc-toolbox/bmclib/v2 v2.3.3-0.20241009101203-eba5356884bf
10+
github.com/ccoveille/go-safecast v1.1.0
1011
github.com/go-logr/logr v1.4.2
1112
github.com/go-logr/zerologr v1.2.3
1213
github.com/google/go-cmp v0.6.0
1314
github.com/jacobweinstock/registrar v0.4.7
1415
github.com/peterbourgon/ff/v3 v3.4.0
1516
github.com/rs/zerolog v1.33.0
16-
golang.org/x/tools v0.24.0
17-
k8s.io/api v0.30.3
18-
k8s.io/apimachinery v0.30.3
19-
k8s.io/client-go v0.30.3
20-
sigs.k8s.io/controller-runtime v0.18.4
17+
golang.org/x/tools v0.26.0
18+
k8s.io/api v0.31.1
19+
k8s.io/apimachinery v0.31.1
20+
k8s.io/client-go v0.31.1
21+
sigs.k8s.io/controller-runtime v0.19.0
2122
)
2223

2324
require (
2425
github.com/Jeffail/gabs/v2 v2.7.0 // indirect
2526
github.com/VictorLowther/simplexml v0.0.0-20180716164440-0bff93621230 // indirect
2627
github.com/VictorLowther/soap v0.0.0-20150314151524-8e36fca84b22 // indirect
2728
github.com/beorn7/perks v1.0.1 // indirect
28-
github.com/bmc-toolbox/common v0.0.0-20231204194243-7bcbccab7116 // indirect
29-
github.com/cespare/xxhash/v2 v2.2.0 // indirect
30-
github.com/davecgh/go-spew v1.1.1 // indirect
29+
github.com/bmc-toolbox/common v0.0.0-20240806132831-ba8adc6a35e3 // indirect
30+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
31+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
3132
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
3233
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
3334
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
3435
github.com/fsnotify/fsnotify v1.7.0 // indirect
36+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
3537
github.com/ghodss/yaml v1.0.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
40+
github.com/go-openapi/swag v0.22.4 // indirect
3941
github.com/gogo/protobuf v1.3.2 // indirect
4042
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
4143
github.com/golang/protobuf v1.5.4 // indirect
4244
github.com/google/gnostic-models v0.6.8 // indirect
4345
github.com/google/gofuzz v1.2.0 // indirect
44-
github.com/google/uuid v1.3.0 // indirect
46+
github.com/google/uuid v1.6.0 // indirect
4547
github.com/hashicorp/errwrap v1.1.0 // indirect
4648
github.com/hashicorp/go-multierror v1.1.1 // indirect
4749
github.com/imdario/mergo v0.3.12 // indirect
@@ -51,39 +53,39 @@ require (
5153
github.com/mailru/easyjson v0.7.7 // indirect
5254
github.com/mattn/go-colorable v0.1.13 // indirect
5355
github.com/mattn/go-isatty v0.0.20 // 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
5859
github.com/pkg/errors v0.9.1 // indirect
59-
github.com/prometheus/client_golang v1.18.0 // indirect
60-
github.com/prometheus/client_model v0.5.0 // indirect
61-
github.com/prometheus/common v0.45.0 // indirect
62-
github.com/prometheus/procfs v0.12.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/satori/go.uuid v1.2.0 // indirect
6465
github.com/spf13/pflag v1.0.5 // indirect
65-
github.com/stmcginnis/gofish v0.15.1-0.20231121142100-22a60a77be91 // indirect
66-
go.opentelemetry.io/otel v1.24.0 // indirect
67-
go.opentelemetry.io/otel/trace v1.24.0 // indirect
66+
github.com/stmcginnis/gofish v0.19.0 // indirect
67+
github.com/x448/float16 v0.8.4 // indirect
68+
go.opentelemetry.io/otel v1.28.0 // indirect
69+
go.opentelemetry.io/otel/trace v1.28.0 // indirect
6870
golang.org/x/exp v0.0.0-20240409090435-93d18d7e34b8 // indirect
69-
golang.org/x/mod v0.20.0 // indirect
70-
golang.org/x/net v0.28.0 // indirect
71-
golang.org/x/oauth2 v0.12.0 // indirect
71+
golang.org/x/mod v0.21.0 // indirect
72+
golang.org/x/net v0.30.0 // indirect
73+
golang.org/x/oauth2 v0.21.0 // indirect
7274
golang.org/x/sync v0.8.0 // indirect
73-
golang.org/x/sys v0.23.0 // indirect
74-
golang.org/x/term v0.23.0 // indirect
75-
golang.org/x/text v0.17.0 // indirect
75+
golang.org/x/sys v0.26.0 // indirect
76+
golang.org/x/term v0.25.0 // indirect
77+
golang.org/x/text v0.19.0 // indirect
7678
golang.org/x/time v0.3.0 // indirect
7779
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
78-
google.golang.org/appengine v1.6.7 // indirect
79-
google.golang.org/protobuf v1.33.0 // indirect
80+
google.golang.org/protobuf v1.34.2 // indirect
81+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
8082
gopkg.in/inf.v0 v0.9.1 // indirect
8183
gopkg.in/yaml.v2 v2.4.0 // indirect
8284
gopkg.in/yaml.v3 v3.0.1 // indirect
83-
k8s.io/apiextensions-apiserver v0.30.1 // indirect
84-
k8s.io/klog/v2 v2.120.1 // indirect
85+
k8s.io/apiextensions-apiserver v0.31.0 // indirect
86+
k8s.io/klog/v2 v2.130.1 // indirect
8587
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
86-
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
88+
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
8789
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
8890
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
8991
sigs.k8s.io/yaml v1.4.0 // indirect

0 commit comments

Comments
 (0)