test(evals): add update-vm-instancetype eval task#814
test(evals): add update-vm-instancetype eval task#814lyarwood wants to merge 1 commit intocontainers:mainfrom
Conversation
| kubectl get virtualmachine "$VM_NAME" -n "$NS" > /dev/null | ||
| echo "VirtualMachine $VM_NAME exists" | ||
|
|
||
| # Verify VM uses the expected u1.medium instancetype | ||
| INSTANCETYPE=$(kubectl get virtualmachine "$VM_NAME" -n "$NS" -o jsonpath='{.spec.instancetype.name}') | ||
| if [ "$INSTANCETYPE" != "u1.medium" ]; then | ||
| echo "ERROR: Expected instancetype 'u1.medium', found: '$INSTANCETYPE'" | ||
| exit 1 | ||
| fi | ||
| echo "Instancetype is u1.medium" | ||
|
|
||
| # Verify no direct resource specification | ||
| GUEST_MEMORY=$(kubectl get virtualmachine "$VM_NAME" -n "$NS" -o jsonpath='{.spec.template.spec.domain.memory.guest}') | ||
| if [ -n "$GUEST_MEMORY" ]; then | ||
| echo "WARNING: VirtualMachine has direct memory specification: $GUEST_MEMORY" | ||
| else | ||
| echo "VirtualMachine uses instancetype for resources (no direct memory spec)" | ||
| fi | ||
|
|
||
| echo "All validations passed" | ||
| exit 0 |
There was a problem hiding this comment.
@lyarwood do you think it would be feasible/better in your case to extract some of this bash logic into go code in https://github.com/mcpchecker/kubernetes-extension so that it can be reused elsewhere?
I'm not really an expert on your eval scenarios, so not sure if it would be better or not long term...
There was a problem hiding this comment.
Yes, likely into a kubevirt specific extension. Definitely something I'd like to look into in the near future.
There was a problem hiding this comment.
That would be nice, having those extensions for kubevirt @lyarwood
|
/run-mcpchecker kubevirt |
Ah and automatically running them against the PR also doesn't seem to work? |
|
@lyarwood i think you need write access to the repo for the action to run. Maybe @manusa can help with this? Also, probably worth looking into how we want to manage this in general for the different toolsets (IMO you are maintaining the toolset, not @manusa @matzew @nader-ziada or myself) |
|
@lyarwood looks good. is the helper function for future use ? as don't see it used in the task itself. |
Nope good catch forgot to remove it, I'll do that now. |
Add a new kubevirt eval that tests doubling VM memory by changing instance types. Includes a verify_instancetype_changed helper function. Assisted-By: Claude <[email protected]> Signed-off-by: Lee Yarwood <[email protected]>
4e3b3b8 to
ed48943
Compare
/cc @ksimon1
/cc @codingben
/cc @Ruclo
Add a new kubevirt eval that tests doubling VM memory by changing instance types. Includes a verify_instancetype_changed helper function.