mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-14 06:15:45 +00:00
kubeadm: add system verification check(including kernel version check) for upgrade
This commit is contained in:
parent
35f584187a
commit
2c305d71f0
@ -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