Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support multiple RuntimeClasses in KataConfig.status.runtimeClass
This controller can now create multiple RuntimeClasses, for plain kata and for peer pods. However only the original kata RuntimeClass has ever been accounted for in KataConfig.status.runtimeClass so far. This is not merely a cosmetic problem. The controller uses KataConfig.status.runtimeClass to find out whether there are any pods using the kata runtime before it removes the runtime from a cluster on uninstallation. Since the peer pods RuntimeClass was never represented in the field so far, running peer pods were ignored on uninstallation. As for implementation, KataConfig.status.runtimeClass is now optional, not required. This doesn't really have to do with the core idea of this commit, it's more to work around the fact that kubebuilder doesn't seem to support array fields with an empty array as the default value. The removal of KataConfig resource immediate Update() after modifying the runtimeClass field is also not strictly necessary but still included since such Update()s in the middle of reconciliation can cause problems on a subsequent Update() ("object has been modified"). Signed-off-by: Pavel Mores <pmores@redhat.com>
- Loading branch information