---
apiVersion: perf.kubestone.xridge.io/v1alpha1
kind: Iperf3
metadata:
  name: iperf3-sample
spec:
  image:
    name: xridge/iperf3:3.7.0
    pullPolicy: IfNotPresent
    # pullSecret: null

  serverConfiguration:
    cmdLineArgs: --verbose
    # nodeSelector: null
    podLabels:
      foo: bar

    podScheduling:
      affinity:
        # nodeAffinity: null
        # podAffinity: null
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - store
            topologyKey: "kubernetes.io/hostname"
      # tolerations: null
      # nodeSelector: null
      # nodeName: null
    hostNetwork: false
    
  # clientConfiguration: null

  UDP: false

---
apiVersion: perf.kubestone.xridge.io/v1alpha1
kind: Iperf3
metadata:
  name: iperf3-sample
spec:
  image:
    name: xridge/iperf3:3.7.0
    pullPolicy: IfNotPresent
    # pullSecret: null

  serverConfiguration:
    cmdLineArgs: --verbose
    # nodeSelector: null
    podLabels:
      iperf-mode: server

    podScheduling:
      affinity:
        # nodeAffinity: null
        # podAffinity: null
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: app
                operator: In
                values:
                - store
            topologyKey: "kubernetes.io/hostname"
      # tolerations: null
      # nodeSelector: null
      # nodeName: null
    hostNetwork: false
    
  clientConfiguration:
    podScheduling:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: iperf-mode
                operator: In
                values:
                - server
            topologyKey: "kubernetes.io/hostname"

  udp: false

Add anti-affinity rules to iperf so that client and server scheduled to different nodes
ENH: Add anti-affinity rules to iperf so that client and server scheduled to different nodes
