When ProxmoxMachineTemplate does not contain spec.template.spec.cloudInit.user, the merging (and thus reconciliation) fails, even though omitting of that field is allowed according to the spec.
As a workaround adding empty map solves this issue:
The underlying issue can be reproduced with code:
mergeUserDatas(bootstrapConfig, baseUserData(vmName), &infrav1.UserData{}) works, but mergeUserDatas(bootstrapConfig, baseUserData(vmName), nil) doesn't
Either that cases should be handeled or the spec adjusted to not allow omitting that field
Thank you for pointing out. I don't want to update api(crd) so let's fix by modifying the mergeUserDatas() func to accept nil.
do you mind to send PR out for this ?
When
ProxmoxMachineTemplate
does not containspec.template.spec.cloudInit.user
, the merging (and thus reconciliation) fails, even though omitting of that field is allowed according to the spec.As a workaround adding empty map solves this issue:
The underlying issue can be reproduced with code:
mergeUserDatas(bootstrapConfig, baseUserData(vmName), &infrav1.UserData{})
works, butmergeUserDatas(bootstrapConfig, baseUserData(vmName), nil)
doesn'tEither that cases should be handeled or the spec adjusted to not allow omitting that field
Environment: