Skip to content

Commit

Permalink
Add provider connection options BMCOptions: (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jan 8, 2024
2 parents 3fbc452 + 13c5f05 commit bf85f4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit bf85f4b

Please sign in to comment.