@@ -35,7 +35,6 @@ import (
35
35
"time"
36
36
37
37
"github.com/PuerkitoBio/purell"
38
- "github.com/pbnjay/memory"
39
38
"github.com/pkg/errors"
40
39
netutil "k8s.io/apimachinery/pkg/util/net"
41
40
"k8s.io/apimachinery/pkg/util/sets"
@@ -880,15 +879,6 @@ func (MemCheck) Name() string {
880
879
return "Mem"
881
880
}
882
881
883
- // Check number of memory required by kubeadm
884
- func (mc MemCheck ) Check () (warnings , errorList []error ) {
885
- actual := memory .TotalMemory () / 1024 / 1024 // TotalMemory returns bytes; convert to MB
886
- if actual < mc .Mem {
887
- errorList = append (errorList , errors .Errorf ("the system RAM (%d MB) is less than the minimum %d MB" , actual , mc .Mem ))
888
- }
889
- return warnings , errorList
890
- }
891
-
892
882
// RunInitNodeChecks executes all individual, applicable to control-plane node checks.
893
883
// The boolean flag 'isSecondaryControlPlane' controls whether we are running checks in a --join-control-plane scenario.
894
884
// The boolean flag 'downloadCerts' controls whether we should skip checks on certificates because we are downloading them.
@@ -904,6 +894,8 @@ func RunInitNodeChecks(execer utilsexec.Interface, cfg *kubeadmapi.InitConfigura
904
894
manifestsDir := filepath .Join (kubeadmconstants .KubernetesDir , kubeadmconstants .ManifestsSubDirName )
905
895
checks := []Checker {
906
896
NumCPUCheck {NumCPU : kubeadmconstants .ControlPlaneNumCPU },
897
+ // Linux only
898
+ // TODO: support other OS, if control-plane is supported on it.
907
899
MemCheck {Mem : kubeadmconstants .ControlPlaneMem },
908
900
KubernetesVersionCheck {KubernetesVersion : cfg .KubernetesVersion , KubeadmVersion : kubeadmversion .Get ().GitVersion },
909
901
FirewalldCheck {ports : []int {int (cfg .LocalAPIEndpoint .BindPort ), kubeadmconstants .KubeletPort }},
0 commit comments