Skip to content

Commit

Permalink
Apply BMC labels to Server on creation
Browse files Browse the repository at this point in the history
  • Loading branch information
defo89 committed Jan 23, 2025
1 parent 2e6a070 commit 217b401
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/controller/bmc_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ func (r *BMCReconciler) discoverServers(ctx context.Context, log logr.Logger, bm
for i, s := range servers {
server := &metalv1alpha1.Server{}
server.Name = bmcutils.GetServerNameFromBMCandIndex(i, bmcObj)
server.Labels = bmcObj.Labels

opResult, err := controllerutil.CreateOrPatch(ctx, r.Client, server, func() error {
server.Spec.UUID = strings.ToLower(s.UUID)
Expand Down

0 comments on commit 217b401

Please sign in to comment.