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

Add provider connection options BMCOptions: #181

Merged
merged 1 commit into from
Jan 8, 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
4 changes: 3 additions & 1 deletion controller/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ func (r *MachineReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct

func (r *MachineReconciler) doReconcile(ctx context.Context, bm *v1alpha1.Machine, bmPatch client.Patch, logger logr.Logger) (ctrl.Result, error) {
var username, password string
opts := &BMCOptions{}
opts := &BMCOptions{
ProviderOptions: bm.Spec.Connection.ProviderOptions,
}
if bm.Spec.Connection.ProviderOptions != nil && bm.Spec.Connection.ProviderOptions.RPC != nil {
opts.ProviderOptions = bm.Spec.Connection.ProviderOptions
if len(bm.Spec.Connection.ProviderOptions.RPC.HMAC.Secrets) > 0 {
Expand Down
4 changes: 3 additions & 1 deletion controller/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ func (r *TaskReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.

func (r *TaskReconciler) doReconcile(ctx context.Context, task *v1alpha1.Task, taskPatch client.Patch, logger logr.Logger) (ctrl.Result, error) {
var username, password string
opts := &BMCOptions{}
opts := &BMCOptions{
ProviderOptions: task.Spec.Connection.ProviderOptions,
}
if task.Spec.Connection.ProviderOptions != nil && task.Spec.Connection.ProviderOptions.RPC != nil {
opts.ProviderOptions = task.Spec.Connection.ProviderOptions
if len(task.Spec.Connection.ProviderOptions.RPC.HMAC.Secrets) > 0 {
Expand Down