mirror of
https://github.com/containers/podman-compose.git
synced 2025-06-20 11:47:50 +02:00
Simplify get deploy pids
Signed-off-by: Elsa <zeyugao@outlook.com>
This commit is contained in:
parent
f5c457aa7c
commit
5414300525
@ -774,11 +774,7 @@ def container_to_cpu_res_args(cnt, podman_args):
|
|||||||
|
|
||||||
# Handle pids limit from both container level and deploy section
|
# Handle pids limit from both container level and deploy section
|
||||||
pids_limit = cnt.get("pids_limit")
|
pids_limit = cnt.get("pids_limit")
|
||||||
deploy_pids = None
|
deploy_pids = limits.get("pids")
|
||||||
|
|
||||||
# Check for pids in deploy.resources.limits section
|
|
||||||
if "pids" in limits:
|
|
||||||
deploy_pids = limits["pids"]
|
|
||||||
|
|
||||||
# Ensure consistency between pids_limit and deploy.resources.limits.pids
|
# Ensure consistency between pids_limit and deploy.resources.limits.pids
|
||||||
if pids_limit is not None and deploy_pids is not None:
|
if pids_limit is not None and deploy_pids is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user