kubeadm: add a flag to RunInitNodeChecks to indicate sec. control-plane

Add an extra flag isSecondaryControlPlane to RunInitNodeChecks
which can be used to indicate that the node we are checking is
a secondary control-plane. In such a case we skip some tests
that are already covered by  RunJoinNodeChecks and
RunOptionalJoinNodeChecks.
This commit is contained in:
Lubomir I. Ivanov
2019-03-04 05:53:44 +02:00
parent feb0937fa4
commit af9e3fcfaa
4 changed files with 30 additions and 21 deletions

View File

@@ -232,7 +232,7 @@ func TestRunInitNodeChecks(t *testing.T) {
}
for _, rt := range tests {
// TODO: Make RunInitNodeChecks accept a ClusterConfiguration object instead of InitConfiguration
actual := RunInitNodeChecks(exec.New(), rt.cfg, sets.NewString())
actual := RunInitNodeChecks(exec.New(), rt.cfg, sets.NewString(), false)
if (actual == nil) != rt.expected {
t.Errorf(
"failed RunInitNodeChecks:\n\texpected: %t\n\t actual: %t\n\t error: %v",