Since we already migrated fully to Python3, it's time to also remove
bits needed for Python2. One of those libs is six.
Change-Id: Ib984d7b4b3c1048ed091c78986c634689a8ace8c
According to CNI spec kubelet expects CNI_IFNAME (the name
inside container) if sandbox is not empty.
Both python and golang implementation was done unconditionally,
IOW we can add both empty sandbox and interface name on the
host and nonempty sandbox and container's iface name.
Closes-Bug: #1835038
Change-Id: I3f21bc0c0790bb79ee81db361cd072609a0a3169
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
Deploying without kuryr-daemon is deprecated since Rocky and we
announced that it will be removed in the Rocky release notes. This
commit removes all the code that allows that, updates the documentation,
DevStack plugin and gates definitions.
Implements: blueprint remove-non-daemon
Change-Id: I65598d4a6ecb5c3dfde04dc5fefd7b02fc72a0cb
Seems like base class method definition is missing `params` argument
that's present in it's implementations. This commit fixes that by adding
it.
TrivialFix
Change-Id: Idb4644956ad5c0cf4f6570da6e6e166b0d357f31
Kuryr-kubernetes declares, that supported CNI version is 0.3.0, but
it prints to output in format of version 0.2.0.
Kubernetes can't parse it.
This patch modifies CNI output according to 0.3.1, it has a little
difference with version 0.3.0, just in naming of ips field.
Change-Id: I7b6bb5c178035b7c85fc28973f9a0cf1bc1a139e
Closes-Bug: 1779718
Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>
This commit alters the format of the annotation, set and read by
controller/CNI. Instead of a single VIF object it now holds a
dictionary, that maps interface names to VIF objects. Controller
currently only sets 'eth0' as the default VIF. The CNI is altered
accordingly to read VIFs from the mapping and add all of them to Pods
namespace.
This commit does not include any mechanism to actually request multiple
IPs/ports for a Pod, but rather lays foundation for future commits, that
would allow that.
Related bp: kuryr-kubernetes-sriov-support
Targets bp: multi-vif-pods
Change-Id: Iaef928e7ab9dc0fce8b7e8fffb7b5a1f6b5ccb17
This patch moves the cni plugins that were split between api.py,
main.py and daemon/service.py to have then in a unified path.
Change-Id: Ief15e3f8a722237649dd5a1fb8c4e26f51143072
This commit implements basic CNI daemon service. The aim of this new
entity is to increase scalability of CNI operations by moving watching
for VIF to a separate process.
This commit:
* Introduces kuryr-daemon service
* Implements communication between CNI driver and CNI daemon using HTTP
* Consolidates watching for VIF on CNI side to a single Watcher that
looks for all the pods on the node it is running on.
* Solves bug 1731485 when running with CNI daemon.
* Enables new service in DevStack plugin
* Provides unit tests for new code.
Follow up patches will include:
- Documentation.
- Support for running in containerized mode.
To test the patch add `enable_service kuryr-daemon` to your DevStack's
local.conf file.
Partial-Bug: 1731485
Co-Authored-By: Janonymous <janonymous.codevulture@gmail.com>
Implements: blueprint cni-split-exec-daemon
Change-Id: I1bd6406dacab0735a94474e146645c63d933be16
Without this patch, when successfully exiting the CNI runner, we'd log
something like:
2017-05-16 16:45:11.763 32397 DEBUG kuryr_kubernetes.cni.main [-] Exiting with status None run /usr/lib/python2.7/site-packages/kuryr_kubernetes/cni/main.py:96
After this change, we report the real exit status we'll give to the
kubelet:
2017-05-16 16:56:14.750 33914 DEBUG kuryr_kubernetes.cni.main [-] Exiting with status 0 run /usr/lib/python2.7/site-packages/kuryr_kubernetes/cni/main.py:96
Change-Id: I10045ffa55128fe70151a5427d82535425a90ed4
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
1.As mentioned in [1], we should avoid using
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I8fc14c9d933de74d9711289f441fe0ec4f86efb2
This patch provides an experimental CNI driver. It's primary purpose
is to enable development of other components (e.g. functional tests,
service/LBaaSv2 support). It is expected to be replaced with daemon
to configure VIF and connect it to the pods and a small lightweight
client to serve as CNI driver called by Kubernetes.
NOTE: unit tests are not provided as part of this patch as it is yet
unclear what parts of it will be reused in daemon-based
implementation.
Change-Id: Iacc8439dd3aee910d542e48ed013d6d3f354786e
Partially-Implements: blueprint kuryr-k8s-integration