forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sdn: convert pod network setup to a CNI plugin
Use the same kubelet network plugin interfaces as everyone else. This converts the openshift-sdn plugin from a plugin compiled into kubelet to one that uses the kubelet CNI driver to call a standard CNI plugin. This plugin sends requests from kubelet over a root-only unix domain socket back to the openshift-sdn node process which handles the actual pod setup/teardown operations. We want to consolidate these operations inside the node process instead of leaving them to the CNI plugin itself because we need to ensure serialized access to OVS, and we need a long-running process to handle HostPort reservation. While we could serialize operations for each pod rather than serializing all pod operations, it turns out to be difficult and error-prone to ensure previous operations complete and those operations can still be GCed in a race-safe manner. General flow: 1) kubelet wants to set up pod networking 2) kubelet calls internal CNI driver 3) CNI driver looks for CNI network config files, finds /etc/cni/net.d/80-openshift-sdn.conf, and calls the /opt/cni/bin/openshift-sdn CNI plugin executable with CNI_COMMAND=ADD 4) openshift-sdn CNI plugin sends environment and stdin to the openshift-node process via HTTP over a root-only unix domain socket 5) openshift-node process sets up pod networking with OVS, veth creation 6) openshift-node process calls the CNI 'host-local' IPAM plugin to allocate an IP address for the pod from the local node subnet 7) openshift-node process returns the IPAM details via HTTP over the unix domain socket to the waiting openshift-sdn CNI plugin 8) openshift-sdn CNI plugin prints IPAM details to stdout 9) kubelet reads IPAM details (or error) and completes pod setup
- Loading branch information
Showing
21 changed files
with
1,982 additions
and
529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.