-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from dbazhal/master
Some concurrency fixes, some configurability
- Loading branch information
Showing
17 changed files
with
256 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
================ | ||
Configuration | ||
================ | ||
|
||
There are tools to configure some of kopf functionality, like asynchronous | ||
tasks behaviour and logging events. | ||
|
||
|
||
Configure logging events | ||
======================== | ||
|
||
`kopf.config.EventsConfig` allows to set what types of kopf logs should be | ||
reflected in events. | ||
|
||
Loglevels are: | ||
|
||
* ``kopf.config.LOGLEVEL_INFO`` | ||
* ``kopf.config.LOGLEVEL_WARNING`` | ||
* ``kopf.config.LOGLEVEL_ERROR`` | ||
* ``kopf.config.LOGLEVEL_CRITICAL`` | ||
|
||
.. code-block:: python | ||
import kopf | ||
# Now kopf will send events only when error or critical occasion happens | ||
kopf.EventsConfig.events_loglevel = config.LOGLEVEL_ERROR | ||
Configure Workers | ||
================= | ||
|
||
`kopf.config.WorkersConfig` allows to set numbers of workers, launch periods, | ||
and timeouts for many kinds of tasks. | ||
|
||
.. code-block:: python | ||
import kopf | ||
# Let's set how many workers can be running simultaneously on per-object event queue | ||
kopf.WorkersConfig.synchronous_tasks_threadpool_limit = 20 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ Kopf: Kubernetes Operators Framework | |
errors | ||
events | ||
testing | ||
configuring | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
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.