Skip to content

exclusive-topology antiAffinity should include matching LWS name #539

@panpan0000

Description

@panpan0000

What happened:

should add below

          - key: leaderworkerset.sigs.k8s.io/name
            operator: In
            values:
            - $MY_LWS_NAME

What you expected to happen:

the whole worker affinity looks like

  affinity:
    podAntiAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
          - key: leaderworkerset.sigs.k8s.io/name
            operator: In
            values:
            - $MY_LWS_NAME
          - key: leaderworkerset.sigs.k8s.io/group-key
            operator: Exists
          - key: leaderworkerset.sigs.k8s.io/group-key
            operator: NotIn
            values:
            - 8fb.....23d207e113
        topologyKey: topology.kubernetes.io/zone

How to reproduce it (as minimally and precisely as possible):

in the same namespace:

  1. Create a LWS(named "A" ) with leaderworkerset.sigs.k8s.io/exclusive-topology annotation.
  2. Create another LWS(named "B" ) with leaderworkerset.sigs.k8s.io/exclusive-topology annotation, in the same namespace.
  3. NOTE: A and B requires diff kind of resource (example, A requires CPU only, B requires TPU. )
  4. You will see B will be pending due to A already live in those nodes (but B may use diff resource than A, they should not compete and A should not stop B from running )

Anything else we need to know?:

Environment:

  • LWS version (use git describe --tags --dirty --always): 0.6.1

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions