apiVersion: apps/v1
kind: Deployment
metadata:
  name: tidb-mgmt-portal
spec:
  replicas: 3
  template:
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchLabels:
                app: tidb-mgmt-portal
            topologyKey: kubernetes.io/hostname
      topologySpreadConstraints:
      - maxSkew: 1
        topologyKey: topology.kubernetes.io/zone
        whenUnsatisfiable: ScheduleAnyway
        labelSelector:
          matchLabels:
            app: tidb-mgmt-portal
      containers:
        - name: tidb-mgmt-portal
          resources:
            limits:
              memory: '1024Mi'
              cpu: '1'
            requests:
              memory: '512Mi'
              cpu: '500m'
