Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.

Commit c5afdbb

Browse files
Merge pull request #256 from jacobweinstock/redfish-options
Add redfish provider options: ## Description <!--- Please describe what this PR is going to change --> Add redfish options, `UseBasicAuth`, and `SystemName`. See the RedfishOptions struct for new field details. ## 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 cda13df + c1c3a93 commit c5afdbb

File tree

7 files changed

+40
-40
lines changed

7 files changed

+40
-40
lines changed

api/v1alpha1/machine.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,19 @@ type MachineSpec struct {
5555
type ProviderOptions struct {
5656
// IntelAMT contains the options to customize the IntelAMT provider.
5757
// +optional
58-
IntelAMT *IntelAMTOptions `json:"intelAMT"`
58+
IntelAMT *IntelAMTOptions `json:"intelAMT,omitempty"`
5959

6060
// IPMITOOL contains the options to customize the Ipmitool provider.
6161
// +optional
62-
IPMITOOL *IPMITOOLOptions `json:"ipmitool"`
62+
IPMITOOL *IPMITOOLOptions `json:"ipmitool,omitempty"`
6363

6464
// Redfish contains the options to customize the Redfish provider.
6565
// +optional
66-
Redfish *RedfishOptions `json:"redfish"`
66+
Redfish *RedfishOptions `json:"redfish,omitempty"`
6767

6868
// RPC contains the options to customize the RPC provider.
6969
// +optional
70-
RPC *RPCOptions `json:"rpc"`
70+
RPC *RPCOptions `json:"rpc,omitempty"`
7171
}
7272

7373
// Connection contains connection data for a Baseboard Management Controller.

api/v1alpha1/provider_opts.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ import (
1010
type RedfishOptions struct {
1111
// Port that redfish will use for calls.
1212
Port int `json:"port"`
13+
// UseBasicAuth for redfish calls. The default is false which means token based auth is used.
14+
UseBasicAuth bool `json:"useBasicAuth"`
15+
// SystemName is the name of the system to use for redfish calls.
16+
// With redfish implementations that manage multiple systems via a single endpoint, this allows for specifying the system to manage.
17+
SystemName string `json:"systemName"`
1318
}
1419

1520
// IPMITOOLOptions contains the ipmitool provider specific options.

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,19 @@ spec:
111111
port:
112112
description: Port that redfish will use for calls.
113113
type: integer
114+
systemName:
115+
description: |-
116+
SystemName is the name of the system to use for redfish calls.
117+
With redfish implementations that manage multiple systems via a single endpoint, this allows for specifying the system to manage.
118+
type: string
119+
useBasicAuth:
120+
description: UseBasicAuth for redfish calls. The default
121+
is false which means token based auth is used.
122+
type: boolean
114123
required:
115124
- port
125+
- systemName
126+
- useBasicAuth
116127
type: object
117128
rpc:
118129
description: RPC contains the options to customize the RPC

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,19 @@ spec:
112112
port:
113113
description: Port that redfish will use for calls.
114114
type: integer
115+
systemName:
116+
description: |-
117+
SystemName is the name of the system to use for redfish calls.
118+
With redfish implementations that manage multiple systems via a single endpoint, this allows for specifying the system to manage.
119+
type: string
120+
useBasicAuth:
121+
description: UseBasicAuth for redfish calls. The default
122+
is false which means token based auth is used.
123+
type: boolean
115124
required:
116125
- port
126+
- systemName
127+
- useBasicAuth
117128
type: object
118129
rpc:
119130
description: RPC contains the options to customize the RPC

config/default/kustomization.yaml

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ namePrefix: rufio-
1212
#commonLabels:
1313
# someName: someValue
1414

15-
bases:
16-
- ../crd
17-
- ../rbac
18-
- ../manager
1915
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
2016
# crd/kustomization.yaml
2117
#- ../webhook
@@ -24,7 +20,6 @@ bases:
2420
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
2521
#- ../prometheus
2622

27-
patchesStrategicMerge:
2823
# Protect the /metrics endpoint by putting it behind auth.
2924
# If you want your controller-manager to expose the /metrics
3025
# endpoint w/o any authn/z, please comment the following line.
@@ -43,31 +38,9 @@ patchesStrategicMerge:
4338
#- webhookcainjection_patch.yaml
4439

4540
# the following config is for teaching kustomize how to do var substitution
46-
vars:
47-
# [CERTMANAGER] To enable cert-manager, uncomment all sections with 'CERTMANAGER' prefix.
48-
#- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR
49-
# objref:
50-
# kind: Certificate
51-
# group: cert-manager.io
52-
# version: v1
53-
# name: serving-cert # this name should match the one in certificate.yaml
54-
# fieldref:
55-
# fieldpath: metadata.namespace
56-
#- name: CERTIFICATE_NAME
57-
# objref:
58-
# kind: Certificate
59-
# group: cert-manager.io
60-
# version: v1
61-
# name: serving-cert # this name should match the one in certificate.yaml
62-
#- name: SERVICE_NAMESPACE # namespace of the service
63-
# objref:
64-
# kind: Service
65-
# version: v1
66-
# name: webhook-service
67-
# fieldref:
68-
# fieldpath: metadata.namespace
69-
#- name: SERVICE_NAME
70-
# objref:
71-
# kind: Service
72-
# version: v1
73-
# name: webhook-service
41+
apiVersion: kustomize.config.k8s.io/v1beta1
42+
kind: Kustomization
43+
resources:
44+
- ../crd
45+
- ../rbac
46+
- ../manager

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ toolchain go1.22.2
66

77
require (
88
dario.cat/mergo v1.0.1
9-
github.com/bmc-toolbox/bmclib/v2 v2.3.3-0.20241009101203-eba5356884bf
9+
github.com/bmc-toolbox/bmclib/v2 v2.3.4-0.20241022160847-8a5f5a1a243c
1010
github.com/ccoveille/go-safecast v1.1.0
1111
github.com/go-logr/logr v1.4.2
1212
github.com/go-logr/zerologr v1.2.3

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ github.com/VictorLowther/soap v0.0.0-20150314151524-8e36fca84b22 h1:a0MBqYm44o0N
88
github.com/VictorLowther/soap v0.0.0-20150314151524-8e36fca84b22/go.mod h1:/B7V22rcz4860iDqstGvia/2+IYWXf3/JdQCVd/1D2A=
99
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
1010
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
11-
github.com/bmc-toolbox/bmclib/v2 v2.3.3-0.20241009101203-eba5356884bf h1:mZ9+KTnagDFwddNWcHzp3tk2XTKL+3JJLZvSNh8Kzi8=
12-
github.com/bmc-toolbox/bmclib/v2 v2.3.3-0.20241009101203-eba5356884bf/go.mod h1:t8If/0fHQTRIK/yKDk2H3SgthDNNj+7z2aeftDFRFrU=
11+
github.com/bmc-toolbox/bmclib/v2 v2.3.4-0.20241022160847-8a5f5a1a243c h1:UrzCk+x0r3nsa3aTvuNesgtU5/6EkCrEF7EfwnM2rjI=
12+
github.com/bmc-toolbox/bmclib/v2 v2.3.4-0.20241022160847-8a5f5a1a243c/go.mod h1:t8If/0fHQTRIK/yKDk2H3SgthDNNj+7z2aeftDFRFrU=
1313
github.com/bmc-toolbox/common v0.0.0-20240806132831-ba8adc6a35e3 h1:/BjZSX/sphptIdxpYo4wxAQkgMLyMMgfdl48J9DKNeE=
1414
github.com/bmc-toolbox/common v0.0.0-20240806132831-ba8adc6a35e3/go.mod h1:Cdnkm+edb6C0pVkyCrwh3JTXAe0iUF9diDG/DztPI9I=
1515
github.com/bombsimon/logrusr/v2 v2.0.1 h1:1VgxVNQMCvjirZIYaT9JYn6sAVGVEcNtRE0y4mvaOAM=

0 commit comments

Comments
 (0)