-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CNI networking installation support #621
Conversation
@@ -16,7 +17,12 @@ type KubenetNetworkingSpec struct { | |||
} | |||
|
|||
// ExternalNetworkingSpec is the specification for networking that is implemented by a Daemonset | |||
// It also uses kubenet | |||
type ExternalNetworkingSpec struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious - what are we using the empty struct for?
Yah noticed that too, just modeled the original code. @justinsb? |
# AWS MTU is 9001 | ||
NetworkPluginMTU: 9001 | ||
|
||
# TODO: Having to duplicate MasterKubelet & Kubelet feels wrong |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What feels wrong here? Generally vagrant TODO
's make me at least want to raise a question :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments ported over from the files I stole from kubenet. I can remove.
@@ -23,6 +23,9 @@ func buildCloudupTags(cluster *api.Cluster) (map[string]struct{}, error) { | |||
// external is based on kubenet | |||
tags["_networking_kubenet"] = struct{}{} | |||
tags["_networking_external"] = struct{}{} | |||
} else if networking.CNI != nil { | |||
// external is based on cni, weave, flannel, etc | |||
tags["_networking_cni"] = struct{}{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More empty structs? Are these just place holders for future members or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost answered in French. Again just modeling code that was done before. We can cleanup if you care to recommend a pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the "best way" to do sets in golang
should solve #537 as well |
Should solve #315 as well |
13a023c
to
29dafb6
Compare
I am so excited for this. Thanks @chrislovecnm |
29dafb6
to
bef000e
Compare
@WillPlatnick looking good, just needing more testing. |
@@ -0,0 +1,7 @@ | |||
Kubelet: | |||
# AWS MTU is 9001 | |||
NetworkPluginMTU: 9001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chrislovecnm , I got a question about this MTU. According to Weave document, the MTU should be 8950 as there is an overhead of 50 bytes for Vxlan, will this be handled automatically?
Another question is I can see kubenet
is using the MTU passed to the plugin (https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/network/kubenet/kubenet_linux.go#L128), however, for cni it doesn't seem it's using the MTU value (https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/network/cni/cni.go#L144). Is this been handled somewhere else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to remove it. Thanks
We are testing on new cluster, and it seems to work without problems so far, i also did some basic policy testing which also seems to work. |
6b00f9b
to
03ac69e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I need more testing and squash my commits prettier :) |
19ed4c8
to
c24836a
Compare
@JuJu227 if you could take a look, specifically at the documentation, would be much appreciated. @kris-nova & @justinsb the commit are squashed by me already. |
{Name: "us-west-2a", CIDR: "172.20.2.0/27"}, | ||
{Name: "us-west-2b", CIDR: "172.20.2.32/27"}, | ||
{Name: "us-west-2c", CIDR: "172.20.2.64/27"}, | ||
}*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest removing dead code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
@chrislovecnm - this looks good.. From a code/documentation standpoint this all makes sense. Will have to defer to you and @justinsb for functionality success. |
cleaning up TODOs updated with a unit test
removing MTU options that we do not need working on getting file structure up
more test cleanup
7e77a27
to
a914626
Compare
UpdatePolicy string | ||
} | ||
|
||
func buildCluster(clusterArgs interface{}) *api.Cluster { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this isn't just clusterArgs *ClusterParams
?
LGTM... found a few problems:
|
Merging - we can address those issues post merge! |
@chrislovecnm do we have issues to track the the 5 snags above? |
Work on getting cni networks such a weave functioning. I did encounter this probably kubernetes/kubernetes#20379
This is now tested an ready for master. I will be testing an install above the 50 node limit to fully vet.