From 8d91656b4014fb54d9f13fb834ad52dbcff83c74 Mon Sep 17 00:00:00 2001 From: Alex Crawford Date: Fri, 24 Aug 2018 16:49:57 -0700 Subject: [PATCH] installer: stop validating the etcd node pool etcd nodes are no longer created. There is no need to validate their config. This is seperate from the complete removal of etcd in order to _try_ not to break CI. --- installer/pkg/config/validate.go | 1 - installer/pkg/config/validate_test.go | 53 +++------------------------ 2 files changed, 6 insertions(+), 48 deletions(-) diff --git a/installer/pkg/config/validate.go b/installer/pkg/config/validate.go index 5e75f9537fb..aa7d556ee07 100644 --- a/installer/pkg/config/validate.go +++ b/installer/pkg/config/validate.go @@ -335,7 +335,6 @@ func (c *Cluster) validateNodePools() []error { }{ {pools: c.Master.NodePools, field: "master"}, {pools: c.Worker.NodePools, field: "worker"}, - {pools: c.Etcd.NodePools, field: "etcd"}, } for _, f := range fields { var found bool diff --git a/installer/pkg/config/validate_test.go b/installer/pkg/config/validate_test.go index 4a3c2b4b166..42350a70663 100644 --- a/installer/pkg/config/validate_test.go +++ b/installer/pkg/config/validate_test.go @@ -16,7 +16,7 @@ func TestMissingNodePool(t *testing.T) { }{ { cluster: Cluster{}, - errs: 3, + errs: 2, }, { cluster: Cluster{ @@ -24,7 +24,7 @@ func TestMissingNodePool(t *testing.T) { NodePools: []string{"", "", ""}, }, }, - errs: 3, + errs: 2, }, { cluster: Cluster{ @@ -32,7 +32,7 @@ func TestMissingNodePool(t *testing.T) { NodePools: []string{"master"}, }, }, - errs: 2, + errs: 1, }, { cluster: Cluster{ @@ -42,9 +42,6 @@ func TestMissingNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"worker"}, }, - Etcd: Etcd{ - NodePools: []string{"etcd"}, - }, }, errs: 0, }, @@ -90,9 +87,6 @@ func TestMoreThanOneNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"worker"}, }, - Etcd: Etcd{ - NodePools: []string{"etcd"}, - }, }, errs: 0, }, @@ -104,9 +98,6 @@ func TestMoreThanOneNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"worker"}, }, - Etcd: Etcd{ - NodePools: []string{"etcd"}, - }, }, errs: 1, }, @@ -118,11 +109,8 @@ func TestMoreThanOneNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"worker", "worker2"}, }, - Etcd: Etcd{ - NodePools: []string{"etcd", "etcd2"}, - }, }, - errs: 3, + errs: 2, }, } @@ -166,11 +154,8 @@ func TestUnmatchedNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"worker"}, }, - Etcd: Etcd{ - NodePools: []string{"etcd"}, - }, }, - errs: 3, + errs: 2, }, { cluster: Cluster{ @@ -180,9 +165,6 @@ func TestUnmatchedNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"worker"}, }, - Etcd: Etcd{ - NodePools: []string{"etcd"}, - }, NodePools: NodePools{ { Name: "master", @@ -192,10 +174,6 @@ func TestUnmatchedNodePool(t *testing.T) { Name: "worker", Count: 1, }, - { - Name: "etcd", - Count: 1, - }, }, }, errs: 1, @@ -208,9 +186,6 @@ func TestUnmatchedNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"worker"}, }, - Etcd: Etcd{ - NodePools: []string{"etcd"}, - }, NodePools: NodePools{ { Name: "master", @@ -220,10 +195,6 @@ func TestUnmatchedNodePool(t *testing.T) { Name: "worker", Count: 1, }, - { - Name: "etcd", - Count: 1, - }, }, }, errs: 0, @@ -270,9 +241,6 @@ func TestSharedNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"shared"}, }, - Etcd: Etcd{ - NodePools: []string{"etcd"}, - }, }, errs: 1, }, @@ -284,9 +252,6 @@ func TestSharedNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"shared"}, }, - Etcd: Etcd{ - NodePools: []string{"shared"}, - }, }, errs: 1, }, @@ -298,9 +263,6 @@ func TestSharedNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"shared", "shared2"}, }, - Etcd: Etcd{ - NodePools: []string{"shared"}, - }, }, errs: 2, }, @@ -312,11 +274,8 @@ func TestSharedNodePool(t *testing.T) { Worker: Worker{ NodePools: []string{"shared", "shared2", "shared3"}, }, - Etcd: Etcd{ - NodePools: []string{"shared", "shared3"}, - }, }, - errs: 3, + errs: 2, }, }