-
Notifications
You must be signed in to change notification settings - Fork 25
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
neonvm: add architecture field to vm.spec #1244
Conversation
No changes to the coverage.
HTML Report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple thoughts
d4a3a0c
to
fddedb6
Compare
8ace4b1
to
4cb7904
Compare
Sorry, a couple higher level things I realized w.r.t. rollout:
Given these: Maybe worthwhile to (a) remove the CRD default to x86, and (b) interpret nil as x86, until all clients have been updated? And then we can update all VM objects to set Again, sorry for not realizing this sooner -- backwards/forwards compatibility can be really tricky to get right with this kind of thing. |
7abc591
to
c4a50d1
Compare
So in general, the old VMs have no materialized value for the field in the kube-api storage. When deploying a version with spec.targetArchitecture annotated with "kubebuilder:default:amd64", the lack of the set value will be interpreted as "amd64". Indeed, if we rollback to the version without spec.targetArchitecture, the behaviour would be to ignore spec.targetArchutecture even if it is materialized in the kube-api storage. In practice, that would lead to always create a pod with nodeArchitecture affinity equal controller architecture. If it feels safer, I changed the default value for spec.targetArchitecture to be nil and add code to explicitly set it to amd64 in vm_controller.go, by this we will have materialized values for all VMs after at least reconciliation. However, in case of rollback, it doesn't change anything, since if we rollback, we rollback to the version which has no spec.targetArchitecture and function Did I answer your question, or should I elaborate deeper on something? |
54ed3b1
to
fff8d1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, modulo two comments
Add spec.cpuArchitecture to use for scheduling pods instead of relying on spec.affinity. Add new field to the kubectl output.
Set target architecture to amd64 while reconciling VM if the current value is nil. This is required to materialize the default value in storage for currently running VMs.
b3d54c4
to
33615ae
Compare
Add spec.cpuArchitecture to use for scheduling pods instead of relying on spec.affinity.
Use spec.cpuArchitecture value while building the vm pod spec affinity.
Extracted from #1123