File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
pkg/handlers/nutanix/mutation/machinedetails Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -100,10 +100,12 @@ func (h *nutanixMachineDetailsPatchHandler) Mutate(
100100 spec .Cluster = nutanixMachineDetailsVar .Cluster
101101
102102 switch {
103- case nutanixMachineDetailsVar .Image != nil :
103+ case nutanixMachineDetailsVar .Image != nil && nutanixMachineDetailsVar . ImageLookup == nil :
104104 spec .Image = nutanixMachineDetailsVar .Image .DeepCopy ()
105- case nutanixMachineDetailsVar .ImageLookup != nil :
105+ spec .ImageLookup = nil
106+ case nutanixMachineDetailsVar .ImageLookup != nil && nutanixMachineDetailsVar .Image == nil :
106107 spec .ImageLookup = nutanixMachineDetailsVar .ImageLookup .DeepCopy ()
108+ spec .Image = nil
107109 default :
108110 return ErrNoImageOrImageLookupSet
109111 }
You can’t perform that action at this time.
0 commit comments