karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.1k stars 798 forks source link

When the Failover feature is enabled, the NoExecute taint does not take effect. #3623

Open chaunceyjiang opened 10 months ago

chaunceyjiang commented 10 months ago

What happened:

When the Failover feature is enabled, the NoExecute taint does not take effect.

I have two clusters. cluster mcamel-zlh and cluster kpanda-global-cluster.

I deployed a deployment with 7 replicas to two clusters using the following pp. The deployment was successfully deployed, and there is one deployment with 1 replica in the mcamel-zlh cluster and deployment with 6 replicas in the kpanda-global-cluster cluster.

 propagateDeps: true
  placement:
    clusterAffinities:
      - affinityName: default
        clusterNames:
          - mcamel-zlh
          - kpanda-global-cluster
    clusterTolerations:
      - key: cluster.karmada.io/not-ready
        operator: Exists
        effect: NoExecute
        tolerationSeconds: 300
      - key: cluster.karmada.io/unreachable
        operator: Exists
        effect: NoExecute
        tolerationSeconds: 300
    replicaScheduling:
      replicaSchedulingType: Divided
      replicaDivisionPreference: Weighted
      weightPreference:
        dynamicWeight: AvailableReplicas

Then manually add a NoExecute taint on the cluster mcamel-zlh, wait for a few minutes, and there will be a deployment with 7 replicas on the cluster kpanda-global-cluster, but there is still a deployment with only 1 replica on the cluster mcamel-zlh.

image

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

Poor12 commented 9 months ago

Hi @chaunceyjiang, I tried to reproduce your problem and it works well. Have you found the root cause of the issue?