Commit e3c0430
authored
🐛 Do not attempt to encrypt VMs erroneously (vmware-tanzu#1396)
We have a bug where if a native key provider is configured, VM
operator will attempt to encrypt that VM. This is incorrect. The
only scenarios where a VM should be encrypted is:
- if it specifies an encryption storage class
- uses a vTPM (existing, or new device being added)
(and a native key provider, or a custom one is specified via BYOK).
This results in the VM reporting the following Condition erroneously:
```
k get vm -n parunesh-ns parunesh-vm -o=json | jq -r '.status.conditions[] | select(.type == "VirtualMachineEncryptionSynced")'
{
"lastTransitionTime": "2025-12-15T21:31:37Z",
"message": "Must use encryption storage class or have vTPM when encrypting vm",
"reason": "InvalidState",
"status": "False",
"type": "VirtualMachineEncryptionSynced"
}
```
This change fixes this bug.1 parent 2d83d58 commit e3c0430
File tree
2 files changed
+12
-7
lines changed- pkg/vmconfig/crypto
2 files changed
+12
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
357 | 364 | | |
358 | 365 | | |
359 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| 617 | + | |
617 | 618 | | |
618 | | - | |
| 619 | + | |
619 | 620 | | |
620 | 621 | | |
621 | 622 | | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
| 623 | + | |
626 | 624 | | |
627 | 625 | | |
628 | 626 | | |
| |||
0 commit comments