Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PVE 8's updated Memory typing #11

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

gecgooden
Copy link
Contributor

It looks like PVE 8 now returns a string for the memory property, as opposed to an int from previous versions.
This change makes it so that the unmarshalling will convert from a string to an int automatically so this should work for current and older versions

@bcm820
Copy link

bcm820 commented Jun 24, 2024

@sp-yduck Can this PR be prioritized? I'm encountering the same issue with PVE 8 and am unable to provision any more VMs until this is patched:

E0621 03:04:19.875458       1 controller.go:324] "Reconciler error" err="json: cannot unmarshal string into Go struct field VirtualMachineConfig.memory of type int" controller="proxmoxmachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="ProxmoxMachine" ProxmoxMachine="default/kubenet-md-0-pp5vl-7mqwk" namespace="default" name="kubenet-md-0-pp5vl-7mqwk" reconcileID=7845a60f-a1fa-4eb1-82c4-60103e4938c9
E0621 03:04:25.873166       1 reconcile.go:126] "failed to get vm config" err="json: cannot unmarshal string into Go struct field VirtualMachineConfig.memory of type int" controller="proxmoxmachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="ProxmoxMachine" ProxmoxMachine="default/kubenet-md-0-pp5vl-hzzcc" namespace="default" name="kubenet-md-0-pp5vl-hzzcc" reconcileID=87988968-e116-4901-9557-e472d8c5a0ab
E0621 03:04:25.873239       1 proxmoxmachine_controller.go:160] "Reconcile error" err="json: cannot unmarshal string into Go struct field VirtualMachineConfig.memory of type int" controller="proxmoxmachine" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="ProxmoxMachine" ProxmoxMachine="default/kubenet-md-0-pp5vl-hzzcc" namespace="default" name="kubenet-md-0-pp5vl-hzzcc" reconcileID=87988968-e116-4901-9557-e472d8c5a0ab

@sp-yduck sp-yduck merged commit 2dcccf7 into k8s-proxmox:master Jun 26, 2024
@sp-yduck
Copy link
Collaborator

@gecgooden @bcm820
sorry I had missed this PR. thank you for making this. I have made a release for this change v0.0.0-alpha28
could you also open a PR for cluster api side ? then I will merge and publish a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants