Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(intelAMT): add support for HTTPS connections #224

Merged
merged 6 commits into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api/v1alpha1/provider_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ type IPMITOOLOptions struct {
type IntelAMTOptions struct {
// Port that intelAMT will use for calls.
Port int `json:"port"`

// HostScheme determines whether to use http or https for intelAMT calls.
// +optional
// +kubebuilder:validation:Enum=http;https
// +kubebuilder:default:=http
HostScheme string `json:"hostScheme"`
}

// HMACAlgorithm is a type for HMAC algorithms.
Expand Down
8 changes: 8 additions & 0 deletions config/crd/bases/bmc.tinkerbell.org_machines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ spec:
description: IntelAMT contains the options to customize the
IntelAMT provider.
properties:
hostScheme:
default: http
description: HostScheme determines whether to use http or
https for IntelAMT calls.
enum:
- http
- https
type: string
port:
description: Port that intelAMT will use for calls.
type: integer
Expand Down
8 changes: 8 additions & 0 deletions config/crd/bases/bmc.tinkerbell.org_tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ spec:
description: IntelAMT contains the options to customize the
IntelAMT provider.
properties:
hostScheme:
default: http
description: HostScheme determines whether to use http or
https for IntelAMT calls.
enum:
- http
- https
type: string
port:
description: Port that intelAMT will use for calls.
type: integer
Expand Down
5 changes: 3 additions & 2 deletions controller/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@

// intelAmt options
if b.IntelAMT != nil {
amt := bmclib.WithIntelAMTPort(uint32(b.IntelAMT.Port))
o = append(o, amt)
amtPort := bmclib.WithIntelAMTPort(uint32(b.IntelAMT.Port))
amtScheme := bmclib.WithIntelAMTHostScheme(b.IntelAMT.HostScheme)
o = append(o, amtPort, amtScheme)

Check warning on line 82 in controller/client.go

View check run for this annotation

Codecov / codecov/patch

controller/client.go#L80-L82

Added lines #L80 - L82 were not covered by tests
}

// rpc options
Expand Down
Loading