-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubeadm: implement mutators for "config migrate"
When upconverting from v1beta3 to v1beta4, it appears there is no easy way to migrate some of the timeout values such as: ClusterConfiguration.APIServer.TimeoutForControlPlane to a new location: InitConfiguration.Timeouts.<some-timeout-field> Yes, the internal InitConfiguratio does embed a ClusterConfiguration, but during conversion the ClusterConfiguration is converted from an empty source. K8s' API machinery has ways to register custom conversion functions, such v1beta3.ClusterConfiguration -> internal.InitConfiguration, but these must be triggered explicitly with a decoder. The overall migration of fields seems very awkward. There might be hacks around that, such as storing intermediate state, while trying to make the fuzzer rountrip happy, but instead mutation functions can be implemented for the internal types when calling kubeadm's migrate code. This seems much cleaner.
- Loading branch information
Showing
3 changed files
with
218 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters