From e3055a6906f5a27aa5697d83b0d654ff8dc442d4 Mon Sep 17 00:00:00 2001 From: Ole Markus With Date: Fri, 22 May 2020 07:48:47 +0200 Subject: [PATCH] Inline supportsPrivateTopology --- cmd/kops/create_cluster.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/kops/create_cluster.go b/cmd/kops/create_cluster.go index baa05fc752..3056b02297 100644 --- a/cmd/kops/create_cluster.go +++ b/cmd/kops/create_cluster.go @@ -1108,7 +1108,7 @@ func RunCreateCluster(ctx context.Context, f *util.Factory, out io.Writer, c *Cr } case api.TopologyPrivate: - if !supportsPrivateTopology(cluster.Spec.Networking) { + if cluster.Spec.Networking.Kubenet != nil { return fmt.Errorf("invalid networking option %s. Kubenet does not support private topology", c.Networking) } cluster.Spec.Topology = &api.TopologySpec{ @@ -1451,10 +1451,6 @@ func RunCreateCluster(ctx context.Context, f *util.Factory, out io.Writer, c *Cr return nil } -func supportsPrivateTopology(n *api.NetworkingSpec) bool { - return n.Kubenet == nil -} - func trimCommonPrefix(names []string) []string { // Trim shared prefix to keep the lengths sane // (this only applies to new clusters...)