diff --git a/controller/machine.go b/controller/machine.go index e01ac8e..3ebb322 100644 --- a/controller/machine.go +++ b/controller/machine.go @@ -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 { diff --git a/controller/task.go b/controller/task.go index 9b31459..1ce79fe 100644 --- a/controller/task.go +++ b/controller/task.go @@ -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 {