48920224cc
This creates a new mechanism in Armada to enable functions to only be run once across multiple instances of Armada working with the same Kubernetes cluster. This is accomplished by utilizing custom resources via the Kubernetes API. This also introduces new config defaults that can be used to configure the lock timeout, expiration, and update interval. Some notes on how the lock works: * Functions to be locked can add the new decorator * The optional name parameter can be used to create multiple types of locks which can coexist * If the lock is unable to be acquired before the timeout a new exception is raised * The lock is updated regularly while the decorated function is still running * If a lock already exists it will only be overwritten if the duration since its last update is longer than the expiration time For now this locking method is being used for components that require write access to Tiller so that simultaneous write operations are avoided. Change-Id: Iee07da9a233ee2e2a54c6bc4881185388b377c05 |
||
---|---|---|
.. | ||
unit | ||
__init__.py | ||
test_utils.py |