Skip to content

Commit

Permalink
zone affinity for uperf clients (#811)
Browse files Browse the repository at this point in the history
* zone affinity for clients

* updated affinity

* corrected the mandatory fields
  • Loading branch information
mukrishn authored Jun 27, 2023
1 parent 506dd2a commit 081359d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion roles/uperf/templates/workload.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ spec:
values:
- {{ ansible_operator_meta.name }}-bench-client-{{ trunc_uuid }}
topologyKey: kubernetes.io/hostname
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: type
operator: In
values:
- {{ ansible_operator_meta.name }}-bench-server-{{ trunc_uuid }}
topologyKey: topology.kubernetes.io/zone
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
Expand Down Expand Up @@ -102,7 +112,7 @@ spec:
fieldRef:
fieldPath: spec.nodeName
- name: server_node
value: "{{ workload_args.pin_server|default("unknown") }}"
value: "{{ item.spec.nodeName | default("unknown") }}"
{% if workload_args.client_resources is defined %}
resources: {{ workload_args.client_resources | to_json }}
{% endif %}
Expand Down

0 comments on commit 081359d

Please sign in to comment.