-
Notifications
You must be signed in to change notification settings - Fork 40.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubeadm: refactor JoinConfigFileAndDefaultsToInternalConfig
Currently JoinConfigFileAndDefaultsToInternalConfig is doing a couple of different things depending on its parameters. It: - loads a versioned JoinConfiguration from an YAML file. - returns defaulted JoinConfiguration allowing for some overrides. In order to make code more manageable, the following steps are taken: - Introduce LoadJoinConfigurationFromFile, which loads a versioned JoinConfiguration from an YAML file, defaults it (both dynamically and statically), converts it to internal JoinConfiguration and validates it. - Introduce DefaultedJoinConfiguration, which returns defaulted (both dynamically and statically) and verified internal JoinConfiguration. The possibility of overwriting defaults via versioned JoinConfiguration is retained. - Re-implement JoinConfigFileAndDefaultsToInternalConfig to use LoadJoinConfigurationFromFile and DefaultedJoinConfiguration. - Replace some calls to JoinConfigFileAndDefaultsToInternalConfig with calls to either LoadJoinConfigurationFromFile or DefaultedJoinConfiguration where appropriate. - Rename JoinConfigFileAndDefaultsToInternalConfig to the more appropriate name LoadOrDefaultJoinConfiguration. Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
- Loading branch information
Showing
5 changed files
with
65 additions
and
43 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
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