Skip to content

Design question: weight calculation logic #6424

@ryanwuer

Description

@ryanwuer

Please provide an in-depth description of the question you have:

What do you think about this question?:

Environment:

  • Karmada version: v1.13.0
  • Kubernetes version: v1.19.3
  • Others:

I try to schedule a replicaset to two K8s, the replicas is 2, the PropagationPolicy is like below:

    replicaScheduling:
      replicaDivisionPreference: Weighted
      replicaSchedulingType: Divided
      weightPreference:
        staticWeightList:
          - targetCluster:
              clusterNames:
                - a
            weight: 2
          - targetCluster:
              clusterNames:
                - b
            weight: 1

As a result, there're a replicaset with replicas of 2 scheduled to a, and none scheduled to b, does this meet design pattern?

I guess the logic is:

a= 2/(2+1) * 2 = 1.333 -> 2
b= 2 - 2 = 0

What i actually expect is 1 for a and 1 for b. At least 1 replica is given to workloads scheduled by karmada. Is that reasonable?

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/questionIndicates an issue that is a support question.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions