Skip to content

Commit

Permalink
Propagate addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
ekarlso committed Jun 9, 2024
1 parent ee4f2e3 commit c81e645
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions controllers/harvestermachine_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,20 @@ func (r *HarvesterMachineReconciler) ReconcileNormal(hvScope Scope) (res reconci
return ctrl.Result{RequeueAfter: 1 * time.Minute}, err
}

machineAddresses := make([]clusterv1.MachineAddress, 0, len(ipAddresses))
for _, addr := range ipAddresses {
machineAddresses = append(machineAddresses, clusterv1.MachineAddress{
Type: addr.Type,
Address: addr.Address,
})
}

machineAddresses = append(machineAddresses, clusterv1.MachineAddress{
Type: clusterv1.MachineInternalDNS,
Address: hvScope.HarvesterMachine.GetName(),
})
hvScope.Machine.Status.Addresses = machineAddresses

hvScope.HarvesterMachine.Status.Addresses = ipAddresses
if len(ipAddresses) > 0 {
hvScope.HarvesterMachine.Status.Ready = true
Expand Down

0 comments on commit c81e645

Please sign in to comment.