Turn off validation that master & nodes have same topology

First step towards supporting mixed-modes.
This commit is contained in:
Justin Santa Barbara 2017-01-17 01:25:16 -05:00
parent 17afbd6292
commit bb46c3ca32
3 changed files with 7 additions and 22 deletions

View File

@ -310,9 +310,6 @@ func (c *Cluster) Validate(strict bool) error {
return fmt.Errorf("Invalid Masters value for Topology")
} else if c.Spec.Topology.Nodes != TopologyPublic && c.Spec.Topology.Nodes != TopologyPrivate {
return fmt.Errorf("Invalid Nodes value for Topology")
// Until we support other topologies - these must match
} else if c.Spec.Topology.Masters != c.Spec.Topology.Nodes {
return fmt.Errorf("Topology Nodes must match Topology Masters")
}
} else {

View File

@ -322,13 +322,13 @@ func TestPopulateCluster_TopologyInvalidValue_Required(t *testing.T) {
expectErrorFromPopulateCluster(t, c, "Topology")
}
func TestPopulateCluster_TopologyInvalidMatchingValues_Required(t *testing.T) {
// We can't have a bastion with public masters / nodes
c := buildMinimalCluster()
c.Spec.Topology.Masters = api.TopologyPublic
c.Spec.Topology.Nodes = api.TopologyPrivate
expectErrorFromPopulateCluster(t, c, "Topology")
}
//func TestPopulateCluster_TopologyInvalidMatchingValues_Required(t *testing.T) {
// // We can't have a bastion with public masters / nodes
// c := buildMinimalCluster()
// c.Spec.Topology.Masters = api.TopologyPublic
// c.Spec.Topology.Nodes = api.TopologyPrivate
// expectErrorFromPopulateCluster(t, c, "Topology")
//}
func TestPopulateCluster_BastionInvalidMatchingValues_Required(t *testing.T) {
// We can't have a bastion with public masters / nodes

View File

@ -55,18 +55,6 @@ func buildCloudupTags(cluster *api.Cluster) (sets.String, error) {
return nil, fmt.Errorf("No networking mode set")
}
// Network Topologies
if cluster.Spec.Topology == nil {
return nil, fmt.Errorf("missing topology spec")
}
if cluster.Spec.Topology.Masters == api.TopologyPublic && cluster.Spec.Topology.Nodes == api.TopologyPublic {
tags.Insert("_topology_public")
} else if cluster.Spec.Topology.Masters == api.TopologyPrivate && cluster.Spec.Topology.Nodes == api.TopologyPrivate {
tags.Insert("_topology_private")
} else {
return nil, fmt.Errorf("Unable to parse topology. Unsupported topology configuration. Masters and nodes must match!")
}
switch cluster.Spec.CloudProvider {
case "gce":
{