From f463a8e30e8223eb3011d099205724728bc0c3a4 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Sun, 20 Aug 2017 09:42:03 -0400 Subject: [PATCH] Add docs for flannel-vxlan option --- cmd/kops/create_cluster.go | 3 ++- docs/cli/kops_create_cluster.md | 2 +- docs/networking.md | 2 +- docs/releases/1.8-NOTES.md | 8 ++++++++ pkg/apis/kops/networking.go | 2 +- pkg/apis/kops/v1alpha1/networking.go | 2 +- pkg/apis/kops/v1alpha2/networking.go | 2 +- upup/pkg/fi/cloudup/template_functions.go | 6 ------ 8 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 docs/releases/1.8-NOTES.md diff --git a/cmd/kops/create_cluster.go b/cmd/kops/create_cluster.go index 9fa4fbc5f7..9131088671 100644 --- a/cmd/kops/create_cluster.go +++ b/cmd/kops/create_cluster.go @@ -248,7 +248,7 @@ func NewCmdCreateCluster(f *util.Factory, out io.Writer) *cobra.Command { cmd.Flags().StringVar(&options.Image, "image", options.Image, "Image to use for all instances.") - cmd.Flags().StringVar(&options.Networking, "networking", "kubenet", "Networking mode to use. kubenet (default), classic, external, kopeio-vxlan (or kopeio), weave, flannel, calico, canal, kube-router.") + cmd.Flags().StringVar(&options.Networking, "networking", "kubenet", "Networking mode to use. kubenet (default), classic, external, kopeio-vxlan (or kopeio), weave, flannel-vxlan (or flannel), flannel-udp, calico, canal, kube-router.") cmd.Flags().StringVar(&options.DNSZone, "dns-zone", options.DNSZone, "DNS hosted zone to use (defaults to longest matching zone)") cmd.Flags().StringVar(&options.OutDir, "out", options.OutDir, "Path to write any local output") @@ -692,6 +692,7 @@ func RunCreateCluster(f *util.Factory, out io.Writer, c *CreateClusterOptions) e Backend: "vxlan", } case "flannel-udp": + glog.Warningf("flannel UDP mode is not recommended; consider flannel-vxlan instead") cluster.Spec.Networking.Flannel = &api.FlannelNetworkingSpec{ Backend: "udp", } diff --git a/docs/cli/kops_create_cluster.md b/docs/cli/kops_create_cluster.md index 0bd96cf95d..c05a4f1aa4 100644 --- a/docs/cli/kops_create_cluster.md +++ b/docs/cli/kops_create_cluster.md @@ -82,7 +82,7 @@ kops create cluster --master-zones stringSlice Zones in which to run masters (must be an odd number) --model string Models to apply (separate multiple models with commas) (default "config,proto,cloudup") --network-cidr string Set to override the default network CIDR - --networking string Networking mode to use. kubenet (default), classic, external, kopeio-vxlan (or kopeio), weave, flannel, calico, canal, kube-router. (default "kubenet") + --networking string Networking mode to use. kubenet (default), classic, external, kopeio-vxlan (or kopeio), weave, flannel-vxlan (or flannel), flannel-udp, calico, canal, kube-router. (default "kubenet") --node-count int32 Set the number of nodes --node-security-groups stringSlice Add precreated additional security groups to nodes. --node-size string Set instance size for nodes diff --git a/docs/networking.md b/docs/networking.md index dac5a47259..ebaa378556 100644 --- a/docs/networking.md +++ b/docs/networking.md @@ -32,7 +32,7 @@ Several different providers are currently built into kops: * [Calico](http://docs.projectcalico.org/v2.0/getting-started/kubernetes/installation/hosted/) * [Canal (Flannel + Calico)](https://github.com/projectcalico/canal) -* [flannel](https://github.com/coreos/flannel) +* [flannel](https://github.com/coreos/flannel) - use `--networking flannel-vxlan` (recommended) or `--networking flannel-udp` (legacy). `--networking flannel` now selects `flannel-vxlan`. * [kopeio-vxlan](https://github.com/kopeio/networking) * [kube-router](./networking.md#kube-router-example-for-cni-ipvs-based-service-proxy-and-network-policy-enforcer) * [weave](https://github.com/weaveworks/weave-kube) diff --git a/docs/releases/1.8-NOTES.md b/docs/releases/1.8-NOTES.md new file mode 100644 index 0000000000..4a24fd57ff --- /dev/null +++ b/docs/releases/1.8-NOTES.md @@ -0,0 +1,8 @@ +_This is a WIP document describing changes to the upcoming kops 1.8 release_ + +# Significant changes + +* flannel now has a `backend` property in the manifest, which can be either `udp` or `vxlan`. `udp` +is not recommended, but will be the default value for existing clusters or clusters created via manifests. +`kops create cluster` with `--networking flannel` will use `vxlan`, `--networking flannel-vxlan` +or `--networking flannel-udp` can be specified to explicitly choose a backend mode. diff --git a/pkg/apis/kops/networking.go b/pkg/apis/kops/networking.go index 5be5baad26..065bdfd3f9 100644 --- a/pkg/apis/kops/networking.go +++ b/pkg/apis/kops/networking.go @@ -60,7 +60,7 @@ type WeaveNetworkingSpec struct { // Flannel declares that we want Flannel networking type FlannelNetworkingSpec struct { - // Backend is the backend overlay type we want to use + // Backend is the backend overlay type we want to use (vxlan or udp) Backend string `json:"backend,omitempty"` } diff --git a/pkg/apis/kops/v1alpha1/networking.go b/pkg/apis/kops/v1alpha1/networking.go index 901472d36d..745ee844bc 100644 --- a/pkg/apis/kops/v1alpha1/networking.go +++ b/pkg/apis/kops/v1alpha1/networking.go @@ -60,7 +60,7 @@ type WeaveNetworkingSpec struct { // Flannel declares that we want Flannel networking type FlannelNetworkingSpec struct { - // Backend is the backend overlay type we want to use + // Backend is the backend overlay type we want to use (vxlan or udp) Backend string `json:"backend,omitempty"` } diff --git a/pkg/apis/kops/v1alpha2/networking.go b/pkg/apis/kops/v1alpha2/networking.go index 3c84d4a9ff..c80bb70f56 100644 --- a/pkg/apis/kops/v1alpha2/networking.go +++ b/pkg/apis/kops/v1alpha2/networking.go @@ -60,7 +60,7 @@ type WeaveNetworkingSpec struct { // Flannel declares that we want Flannel networking type FlannelNetworkingSpec struct { - // Backend is the backend overlay type we want to use + // Backend is the backend overlay type we want to use (vxlan or udp) Backend string `json:"backend,omitempty"` } diff --git a/upup/pkg/fi/cloudup/template_functions.go b/upup/pkg/fi/cloudup/template_functions.go index 35f0937a63..f1df4ada86 100644 --- a/upup/pkg/fi/cloudup/template_functions.go +++ b/upup/pkg/fi/cloudup/template_functions.go @@ -30,12 +30,8 @@ package cloudup import ( "encoding/base64" "fmt" - - "github.com/golang/glog" - "os" "strconv" - "strings" "text/template" @@ -44,9 +40,7 @@ import ( "k8s.io/kops/pkg/apis/kops" "k8s.io/kops/pkg/dns" "k8s.io/kops/pkg/model" - "k8s.io/kops/upup/pkg/fi" - "k8s.io/kops/upup/pkg/fi/cloudup/gce" )