Skip to content

Commit 84651d6

Browse files
committed
Request two VFs for primary UDN SR-IOV pods
Count one VF for the cluster default network and one for the primary UDN. Preserve existing resource counts for regular SR-IOV and secondary-network pods. Signed-off-by: Venkat Kunaparaju <vkunaparaju@nvidia.com>
1 parent 42de92b commit 84651d6

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

manifests/sriov-pod.yaml.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ spec:
2525
imagePullPolicy: {{ image_pull_policy }}{% if has_resource_name or has_resources %}
2626
resources:
2727
requests: {% if has_resource_name %}
28-
{{ resource_name }}: '1'{% endif %}{% if cpu_request %}
28+
{{ resource_name }}: {{ sriov_resource_quantity }}{% endif %}{% if cpu_request %}
2929
cpu: {{ cpu_request }}{% endif %}{% if mem_request %}
3030
memory: {{ mem_request }}{% endif %}
3131
limits: {% if has_resource_name %}
32-
{{ resource_name }}: '1'{% endif %}{% if cpu_limit %}
32+
{{ resource_name }}: {{ sriov_resource_quantity }}{% endif %}{% if cpu_limit %}
3333
cpu: {{ cpu_limit }}{% endif %}{% if mem_limit %}
3434
memory: {{ mem_limit }}{% endif %}{% endif %}
3535
securityContext:

task.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,8 @@ def _get_sriov_resource_quantity(
451451
self,
452452
secondary_network_nads: tuple[str, ...],
453453
) -> str:
454+
if self.pod_type == PodType.SRIOV:
455+
return str(1 + int(self.ts.test_case_id.is_udn_primary))
454456
return str(len(secondary_network_nads) + int(self.node.sriov))
455457

456458
def get_template_args(self) -> dict[str, str | list[str] | bool]:

0 commit comments

Comments
 (0)