Skip to content

Commit

Permalink
fix: do not set empty initial labels in the UI
Browse files Browse the repository at this point in the history
The check was incorrect, so it was setting empty initial labels even if
they are not set in the UI.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
  • Loading branch information
Unix4ever committed Oct 22, 2024
1 parent 98315a9 commit 83554e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions client/pkg/infra/controllers/provision.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ func (ctrl *ProvisionController[T]) reconcileRunning(ctx context.Context, r cont

*machineRequestStatus.Metadata().Labels() = *machineRequest.Metadata().Labels()

logger.Info("machine provision finished")

return nil
}

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/omni/MachineClasses/MachineClass.vue
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,11 @@ const submit = async () => {
grpc_tunnel: grpcTunnelMode.value,
}

if (kernelArguments.value) {
if (kernelArguments.value.length > 0) {
machineClass.spec.auto_provision.kernel_args = kernelArguments.value.split(" ");
}

if (initialLabels.value) {
if (initialLabels.value.length > 0) {
const l: Record<string, string> = {};
for (const k in initialLabels.value) {
l[k] = initialLabels.value[k].value;
Expand Down

0 comments on commit 83554e5

Please sign in to comment.