There was already introduced port cleanup function, so in this patch
there is new function introduced for cleaning up unused networks and
subnets for whole deployment, by using identifier from description.
Change-Id: Ia11e8953fab3f9cd8f6598f9da94daae324b1bf8
Sometimes it happen, that during ports creation, there could be quota
violations, so that port could be created without tags, and would just
hanging there. This periodic task would remove all the dead ports.
Change-Id: If646cb3bf00aca387c769fafe2f73a8194642f69
The patch handles the KuryrLoadBalancers reconcilation
using periodic task as event scheduler instead of eventlet
Implements: blueprint reconcile-openstack-resources-with-k8s
Change-Id: I85d2d1cf00b2543f41a875b32ae64fbbe885652c
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
We don't need exit_on_stop option now as we always set it to True. This
commit removes it to simplify the code.
Change-Id: I258709095727d87ede66ad6846c6e56ebdabec91
scope param is added to allow getting multiple independent instances
of a driver. This is particularly useful for using same VIFPoolDriver
implementation for multiple PodVIFDrivers (eg. NoopVIFPool may be
used for multiple PodVIFDriver types)
Also renames driver_alias to specific_driver to better indicate its
function.
Related-Bug: 1747406
Change-Id: Iea3b65b91f362a18cca6bf9d44d938063a56118b
Signed-off-by: Yash Gupta <y.gupta@samsung.com>
Due to ports pool being on kuryr-controller memory, there is a need
for sync-ing the pools when a kuryr-controller becomes the active
controller, otherwise pools created by the previous active controller
will not be used and new ports will be created. This patch ensures
the kuryr-controller triggers a ports pool recovery action when
transitioning to the active controller
Closes-Bug: 1787595
Change-Id: I8ee48f8cf4afad2338ae7a3b55b99ce46910ad70
In case all the watchers (in the CNI case the pod watcher only) have
gracefully exited, continuing the process only serves to give a false
appearance of things working. At the same time, it prevents the
containerized deployment orchestrator from realizing that the Kuryr pod
is not functional so it does not restart it.
This fix allows non health proves environments where all watchers have
gracefully exited to be restarted by k8s/ocp and eventually work again
should the issue that made the graceful exits happen be solved.
Change-Id: Id70978e06d980bc0ffa08bcee02d78bef9dcbeb8
Closes-Bug: #1776676
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
This is the second patch of the Ingress Controller capability.
In order for the K8S Ingress and OpenShift Route resources to work,
the cluster must have an Ingress Controller running.
This patch extends LBaaS driver to support L7 load balancing and
verifies, retrieves and stores the L7 router LB (pre-created by admin or
Devstack) details.
The OCP-route and K8S-endpoint handlers (implemented in next patch) will
query the ingress controller for the L7 router details.
Partially Implements: blueprint openshift-router-support
Change-Id: Id55169f6c9c1c607b2aa54c92711dfbd04a9e39d
This commit implements initial version of high availability support in
kuryr-controller - Active/Passive mode. In this mode only one instance
of controller is processing the resources while other ones are in
standby mode. If current leader dies, one of standbys is taking the
leader role and starts processing resources.
Please note that as leader election is based on Kubernetes mechanisms,
this is only supported when kuryr-controller is run as Pod on Kubernetes
cluster.
Implements: bp high-availability
Change-Id: I2c6c9315612d64158fb9f8284e0abb065aca7208
This patch introduces a new way for configuring which handlers the
Kuryr controller should be using. This will allow people to use
externally provided handlers as long as they are installed as
entrypoints of the right namespace.
Implements: blueprint kuryr-pluggable-handlers
Change-Id: I52ce0ef00771c8587d7f7113cc5eb4839d1309a5
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
This patch adds liveness checks for watcher and handlers, without passing the
manager's reference to modules that probably should not be aware of it.
Related-Bug: #1705429
Change-Id: I0192756c556b13f98302a57acedce269c278e260
This patch checks the health of k8s, Keystone and Neutron,
by using a server that combines all the verifications. Also, checks
if ports are loaded into the pools when required.
Partially Implements: blueprint controller-readiness-liveness-probes
Change-Id: I09121a61d23fb64b326dae3947d5d24b1329cde3
This patch implements LoadBalancerHandler that handles K8s Endpoints
events and tracks changes in LBaaSServiceSpec to update Neutron LBaaS
accordingly and to reflect its' actual state in LBaaSState.
Change-Id: I718daf6d3def981c1bde5ca9831f955766935fbd
Partially-Implements: blueprint kuryr-k8s-integration
This patch introduces LBaaSSpecHandler that handles K8s Service
events and updates related Endpoints with LBaaSServiceSpec when
necessary.
Change-Id: I09a0235842edd06827437f37aeac7ca5daeb1774
Partially-Implements: blueprint kuryr-k8s-integration
This patch introduces VIFHandler that is used by Kuryr-Kubernetes
controller to manage VIF annotation and related Neutron resources
which are used by CNI driver to enable pod networking.
Change-Id: I1acfa052a530f06def4f7179945fac1687e1951a
Partially-Implements: blueprint kuryr-k8s-integration
This patch adds a new driver type used to determine Neutron subnet
that should be used for Kubernetes pods' ports. This patch also
provides a default subnet driver implementation that uses a
subnet set in configuration file.
This patch also introduces the 'os_vif_util' module that contains
functions to translate data structures returned by Neutron client to
os-vif objects. Only the subnet-related functions are added in this
patch.
Change-Id: I643b22858239ce7f64e6ba81822b31e788fc9990
Partially-Implements: blueprint kuryr-k8s-integration
This patch introduces ControllerPipeline which is an entry point
handler for the Kuryr-Kubernetes controller. ControllerPipeline
allows registering ResourceEventHandlers and ensures the proper
handler is called for each event that is passed to the
ControllerPipeline. Also it ensures the following behavior:
- multiple ResourceEventHandlers can be registered for the same
resource type (OBJECT_KIND)
- failing handlers (i.e. ones that raise Exceptions) are retried
until either the handler succeeds or a finite amount of time
passes, in which case the most recent exception is logged
- in case there are multiple handlers registered for the same
resource type, all such handlers are considered independent (i.e.
if one handler fails, other handlers will still be called
regardless; and the order in which such handlers are called is not
determined)
- events for different Kubernetes objects can be handled concurrently
- events for the same Kubernetes object are handled sequentially in
the order of arrival
Change-Id: Ib17e0c7a2790cdbc31be4f59d50972b43c272480
Partially-Implements: blueprint kuryr-k8s-integration
This patch adds the Async handler that can be used as part of the
event handling pipeline to run handlers asynchronously.
Change-Id: I094b54dc59b4b533b67b2ed329d38d69348305af
Partially-Implements: blueprint kuryr-k8s-integration
This patch adds the Retry handler that can be used as part of the
event handling pipeline to retry failed handlers.
Change-Id: Ia86790de8efa6a3ef5b677a70ffbd2d8201f9d95
Partially-Implements: blueprint kuryr-k8s-integration
This patch provides basic event handling pipeline components.
The EventPipeline class provided by this patch will serve as a base
class for ControllerEventPipeline and CNIEventPipeline classes that
are to be implemented by future patches.
Change-Id: I8c68941cbe323f80cd67341fe05656efd57bcdc5
Partially-Implements: blueprint kuryr-k8s-integration
This patch introduces an eventlet-based Kuryr-Kubernetes controller service
base (based on oslo.service) and command-line launcher.
Change-Id: Idfd5efd71d9dd7cb184905dd487eea4ba33b029e
Partially-Implements: blueprint kuryr-k8s-integration