mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Merge pull request #129401 from pacoxu/kubeadm-upgrade-precheck
kubeadm: add kernel version check for upgrade
This commit is contained in:
commit
3c229949f9
@ -72,6 +72,9 @@ func runPreflight(c workflow.RunData) error {
|
||||
if err := preflight.RunRootCheckOnly(ignorePreflightErrors); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := preflight.RunUpgradeChecks(ignorePreflightErrors); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Run CoreDNS migration check.
|
||||
if err := upgrade.RunCoreDNSMigrationCheck(client, ignorePreflightErrors); err != nil {
|
||||
|
@ -54,6 +54,9 @@ func runPreflight(c workflow.RunData) error {
|
||||
if err := preflight.RunRootCheckOnly(data.IgnorePreflightErrors()); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := preflight.RunUpgradeChecks(data.IgnorePreflightErrors()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// If this is a control-plane node, pull the basic images.
|
||||
if data.IsControlPlaneNode() {
|
||||
|
@ -1091,6 +1091,15 @@ func RunRootCheckOnly(ignorePreflightErrors sets.Set[string]) error {
|
||||
return RunChecks(checks, os.Stderr, ignorePreflightErrors)
|
||||
}
|
||||
|
||||
// RunUpgradeChecks initializes checks slice of structs and call RunChecks
|
||||
func RunUpgradeChecks(ignorePreflightErrors sets.Set[string]) error {
|
||||
checks := []Checker{
|
||||
SystemVerificationCheck{},
|
||||
}
|
||||
|
||||
return RunChecks(checks, os.Stderr, ignorePreflightErrors)
|
||||
}
|
||||
|
||||
// RunPullImagesCheck will pull images kubeadm needs if they are not found on the system
|
||||
func RunPullImagesCheck(execer utilsexec.Interface, cfg *kubeadmapi.InitConfiguration, ignorePreflightErrors sets.Set[string]) error {
|
||||
containerRuntime := utilruntime.NewContainerRuntime(cfg.NodeRegistration.CRISocket)
|
||||
|
Loading…
Reference in New Issue
Block a user