github.com/oam-dev/kubevela@v1.9.11/references/docgen/def-doc/trait/topologyspreadconstraints.eg.md (about)

     1  ```yaml
     2  apiVersion: core.oam.dev/v1beta1
     3  kind: Application
     4  metadata:
     5    name: application-with-topologyspreadconstraints
     6  spec:
     7    components:
     8      - name: busybox-runner
     9        type: worker
    10        properties:
    11          image: busybox
    12          cmd:
    13            - sleep
    14            - '1000'
    15        traits:
    16        - type: topologyspreadconstraints
    17          properties:
    18            constraints: 
    19            - topologyKey: zone
    20              labelSelector:
    21                matchLabels: 
    22                  zone: us-east-1a
    23              maxSkew: 1
    24              whenUnsatisfiable: DoNotSchedule
    25              minDomains: 1
    26              nodeAffinityPolicy: Ignore
    27              nodeTaintsPolicy: Ignore
    28            - topologyKey: node
    29              labelSelector:
    30                matchExpressions:
    31                  - key: foo 
    32                    operator: In
    33                    values: 
    34                    - abc
    35              maxSkew: 1
    36              whenUnsatisfiable: ScheduleAnyway 
    37              minDomains: 1
    38              nodeAffinityPolicy: Ignore
    39              nodeTaintsPolicy: Ignore
    40  ```