Skip to content

Conversation

@LavredisG
Copy link
Contributor

I came up with this while experimenting with custom schedulers. Correct me if this isn't the case, but if it is, I think it's helpful to note it on the docs.

@karmada-bot karmada-bot requested review from Poor12 and Tingtal January 14, 2025 05:50
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign rainbowmango for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 14, 2025
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/assign
I will revisit this doc and get back to you shortly

It has two replicaSchedulingTypes which determine how the replicas are scheduled when Karmada propagates a resource:

* `Duplicated`: duplicate the same replicas to each candidate member cluster from resources.
* `Duplicated`: duplicate the same replicas to each candidate member cluster from resources. This is the <b> default </b> `replicaSchedulingType`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@LavredisG LavredisG Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be that there is a mistake there? This is a local test I did:

image
image

Besides, if Divided is default, it would have to specify a default ReplicaDivisionPreference besides the Type, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I'm surprised but thanks for letting me know. I will explore it further.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I revisited the previous discussion and we made the consensus that if replicaScheduling == null, the default behavior is Duplicated, otherwise the default behavior is Divided.

Maybe we need to update the comments on API definition.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which Preference would be chosen in the case that default behavior is Divided?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. Since your test above omit the replicaScheduling, it defaults to Duplicated, the behavior is expected. (We made a mistake on the API part, hopefully to fix it on next API version, like v1alpha2 or beta.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understandable! However, in the case that we have for example replicaScheduling == test, then as you said since it is not null, it will default to Divided. But Divided requires a preference, either Aggregated or Weighted if I am not mistaken, so which one of these would be chosen in that case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants