Skip to content

Commit ab203d9

Browse files
committed
rdma bandwidth benchmark working without host networking
1 parent daeacac commit ab203d9

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

python/perftest/models/v1alpha1/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class PodCustomisation(schema.BaseModel):
3131
default_factory = dict,
3232
description = "The annotations for pods."
3333
)
34-
resources: schema.Dict[str, str] = Field(
34+
resources: schema.Dict[str, schema.Any] = Field(
3535
default_factory = dict,
3636
description = "Resources to apply to the pods."
3737
)

python/perftest/templates/rdmabandwidth.yaml.j2

+12-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ spec:
2727
image: {{ benchmark.spec.image }}
2828
imagePullPolicy: {{ benchmark.spec.image_pull_policy }}
2929
{{ macros.container_defaults(benchmark, benchmark.spec.server) | indent(20) }}
30-
{%- if benchmark.spec.host_network %}
3130
securityContext:
31+
{%- if benchmark.spec.host_network %}
3232
privileged: true
33-
{%- endif %}
33+
{%- else %}
34+
capabilities:
35+
add:
36+
- IPC_LOCK
37+
{%- endif %}
3438
args:
3539
- ib_{{ benchmark.spec.mode }}_bw
3640
- -a
@@ -68,10 +72,14 @@ spec:
6872
image: {{ benchmark.spec.image }}
6973
imagePullPolicy: {{ benchmark.spec.image_pull_policy }}
7074
{{ macros.container_defaults(benchmark, benchmark.spec.client) | indent(20) }}
71-
{%- if benchmark.spec.host_network %}
7275
securityContext:
76+
{%- if benchmark.spec.host_network %}
7377
privileged: true
74-
{%- endif %}
78+
{%- else %}
79+
capabilities:
80+
add:
81+
- IPC_LOCK
82+
{%- endif %}
7583
args:
7684
- ib_{{ benchmark.spec.mode }}_bw
7785
- -a

0 commit comments

Comments
 (0)