Skip to content

Commit

Permalink
Small fix of rename condition on VM
Browse files Browse the repository at this point in the history
The condition status should be one of:
"True", "False" or "Unknown".

The type should probably not contain space.

Signed-off-by: Andrej Krejcir <[email protected]>
  • Loading branch information
akrejcir committed Mar 26, 2020
1 parent 230a99b commit 2740a1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/virt-controller/watch/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ func (c *VMController) handleVMRenameRequest(vm *virtv1.VirtualMachine, newName
newVM.Status.Conditions = []virtv1.VirtualMachineCondition{
{
Type: virtv1.RenameConditionType,
Status: "Success",
Status: k8score.ConditionTrue,
Reason: vm.Name,
Message: fmt.Sprintf("This VM was renamed, the old name was %s", vm.Name),
},
Expand Down
2 changes: 1 addition & 1 deletion staging/src/kubevirt.io/client-go/api/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ const (
VirtualMachinePaused VirtualMachineConditionType = "Paused"

// This condition indicates that the VM was renamed
RenameConditionType VirtualMachineConditionType = "Rename Operation"
RenameConditionType VirtualMachineConditionType = "RenameOperation"
)

// ---
Expand Down

0 comments on commit 2740a1f

Please sign in to comment.