---
id: scheduling-topology-spread-on
name: "Capability: topologySpreadConstraints settable on ALL workloads (ON)"
description: >-
  Renders the product chart with a topologySpreadConstraint configured
  (maxSkew=1, topologyKey=topology.kubernetes.io/zone,
  whenUnsatisfiable=ScheduleAnyway) and asserts that every workload pod
  spec carries the constraint, proving the chart's topologySpreadConstraints
  knob works end-to-end on a real kind cluster.
labels: {customer: enterprise, profile: compliance}
cluster:
  provider: kind
  k8s_version: v1.36.1
product:
  chart: ./chart
  release: sample
  namespace: sample
  values: chart-test/fixtures/capability/scheduling-topology-spread-values.yaml
asserts:
  - type: scheduling-present
    namespace: sample
    source: rendered
    expect_present: true
    check_nodeSelector: false
    check_tolerations: false
    check_affinity: false
    check_topologySpreadConstraints: true
    topologySpreadConstraints:
      - topologyKey: topology.kubernetes.io/zone
        maxSkew: 1
        whenUnsatisfiable: ScheduleAnyway
tags: [capability, compliance]
category: capability
capability: topology-spread-constraints
tier: capability
mechanisms: ["capability:scheduling"]
