kubeadm: move swap on check error to warning since NodeSwap is beta in 1.23

This commit is contained in:
Paco Xu 2021-09-09 14:14:36 +08:00
parent 9c147baa70
commit 7007b417e5

View File

@ -664,11 +664,11 @@ func (swc SwapCheck) Check() (warnings, errorList []error) {
buf = append(buf, scanner.Text()) buf = append(buf, scanner.Text())
} }
if err := scanner.Err(); err != nil { if err := scanner.Err(); err != nil {
return nil, []error{errors.Wrap(err, "error parsing /proc/swaps")} return []error{errors.Wrap(err, "error parsing /proc/swaps")}, nil
} }
if len(buf) > 1 { if len(buf) > 1 {
return nil, []error{errors.New("running with swap on is not supported. Please disable swap")} return []error{errors.New("swap is enabled; production deployments should disable swap unless testing NodeSwap feature.")}, nil
} }
return nil, nil return nil, nil