actions / actions-runner-controller

Kubernetes controller for GitHub Actions self-hosted runners
Apache License 2.0
4.42k stars 1.04k forks source link

Add topologySpreadConstraint to gha-runner-scale-set-controller chart #3405

Closed DaazKu closed 2 months ago

DaazKu commented 3 months ago

Adds topologySpreadConstraint to gha-runner-scale-set-controller so that we can spread replicas across AZs like so:

topologySpreadConstraints:
  - labelSelector:
      matchLabels:
        app.kubernetes.io/name: gha-rs-controller # Or "nameOverride" if defined
    maxSkew: 1
    topologyKey: topology.kubernetes.io/zone
    whenUnsatisfiable: DoNotSchedule

Reference: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/