Skip to content

Commit a91d55a

Browse files
committed
Allow to configure kopf sync thread pool size
Inroduce new osctl.max_workers configuration option to set synchronous thread pool size. Related-Prod: PRODX-51338 Change-Id: Ieebca94fd7b05d793cfdbb3ea82540f5c88b2f0c
1 parent 43666ad commit a91d55a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

etc/rockoon/01-controller-default.ini

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ wait_application_ready_delay = 10
88
# The amount of time to wit for flapping node
99
node_not_ready_flapping_timeout = 120
1010

11+
# Amount of workers to handle asynchronous kopf handlers
12+
max_workers = 500
13+
1114
[helmbundle]
1215
# The number of seconds to wait for values set in manifest are propagated to child objects.
1316
manifest_enable_timeout = 600

rockoon/settings.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ def _get_internal_labels():
289289
"OSCTL_POD_NETWORKS_DATA", [{"cidr": "192.168.0.0/16"}]
290290
)
291291

292+
CONF = Config()
293+
292294

293295
class InfiniteBackoffsWithJitter:
294296
def __iter__(self):
@@ -314,6 +316,7 @@ def configure(settings: kopf.OperatorSettings, **_):
314316
f"lcm.mirantis.com/{OSCTL_HEARTBEAT_PEERING_OBJECT_NAME}-finalizer"
315317
)
316318
settings.networking.error_backoffs = InfiniteBackoffsWithJitter()
319+
settings.execution.max_workers = CONF.getint("osctl", "max_workers")
317320

318321

319322
# HELM SETTINGS
@@ -323,5 +326,3 @@ def configure(settings: kopf.OperatorSettings, **_):
323326
)
324327
HELM_CHARTS_DIR = os.environ.get("HELM_CHARTS_DIR", "/opt/operator/charts/")
325328
# END HELM SETTINGS
326-
327-
CONF = Config()

0 commit comments

Comments
 (0)