k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/testing/density/scheduler/pod-topology-spread/deployment.yaml (about) 1 apiVersion: apps/v1 2 kind: Deployment 3 metadata: 4 name: {{.Name}} 5 labels: 6 group: {{.Group}} 7 spec: 8 replicas: {{.Replicas}} 9 selector: 10 matchLabels: 11 name: {{.Name}} 12 template: 13 metadata: 14 labels: 15 name: {{.Name}} 16 group: {{.Group}} 17 spec: 18 topologySpreadConstraints: 19 - maxSkew: 1 20 topologyKey: kubernetes.io/hostname 21 # Cannot be DoNotSchedule because the there's no way to differentiate 22 # the master node from a hollow node; as a result, the global minimum 23 # matching number will always be zero (since pods cannot be scheduled 24 # on to the master). 25 whenUnsatisfiable: ScheduleAnyway 26 labelSelector: 27 matchLabels: 28 group: {{.Group}} 29 containers: 30 - image: registry.k8s.io/pause:3.9 31 imagePullPolicy: IfNotPresent 32 name: {{.Name}} 33 ports: 34 resources: 35 requests: 36 cpu: {{.CpuRequest}} 37 memory: {{.MemoryRequest}} 38 # Add not-ready/unreachable tolerations for 15 minutes so that node 39 # failure doesn't trigger pod deletion. 40 tolerations: 41 - key: "node.kubernetes.io/not-ready" 42 operator: "Exists" 43 effect: "NoExecute" 44 tolerationSeconds: 900 45 - key: "node.kubernetes.io/unreachable" 46 operator: "Exists" 47 effect: "NoExecute" 48 tolerationSeconds: 900