You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(api, vm): add phase age printer column (#2203)
Add the PhaseAge printer column to VirtualMachine brief output while keeping the existing Age column.
The new column is populated directly from the latest entry in .status.stats.phasesTransitions using the JSONPath expression .status.stats.phasesTransitions[-1].timestamp. This shows how long the VM has been in its current phase without introducing additional status fields.
---------
Signed-off-by: Daniil Antoshin <daniil.antoshin@flant.com>
// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="The phase of the virtual machine."
44
+
// +kubebuilder:printcolumn:name="PhaseAge",type="date",JSONPath=".status.stats.phasesTransitions[-1].timestamp",description="Time since the virtual machine entered the current phase."
44
45
// +kubebuilder:printcolumn:name="Cores",priority=1,type="string",JSONPath=".spec.cpu.cores",description="The number of cores of the virtual machine."
45
46
// +kubebuilder:printcolumn:name="CoreFraction",priority=1,type="string",JSONPath=".spec.cpu.coreFraction",description="Virtual machine core fraction. The range of available values is set in the `sizePolicy` parameter of the VirtualMachineClass; if it is not set, use values within the 1–100% range."
46
47
// +kubebuilder:printcolumn:name="Memory",priority=1,type="string",JSONPath=".spec.memory.size",description="The amount of memory of the virtual machine."
0 commit comments