Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custome resouce framework #3339

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Monokaix
Copy link
Member

@Monokaix Monokaix commented Mar 6, 2024

Add custome resouce framework.
Based on #2760 but made some optimizations.
Part of #3310

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign william-wang
You can assign the PR to them by writing /assign @william-wang in a comment when ready.

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

@volcano-sh-bot volcano-sh-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Mar 6, 2024
@Monokaix Monokaix changed the title Karmada Add custome resouce framework Mar 6, 2024
@Monokaix Monokaix force-pushed the karmada branch 7 times, most recently from 71c8ab9 to e78dbc1 Compare March 6, 2024 08:36
Signed-off-by: Xuzheng Chang <changxuzheng@huawei.com>
{
name: "custom resource add",
handlerName: "test",
sc: &SchedulerCache{
Copy link
Member

Choose a reason for hiding this comment

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

How about use NewDefaultMockSchedulerCache to trigger the mock list/watch process?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's not a proper way here, because custom clinet and cache is a independent part, and it needs to provide parameters separately, and NewDefaultMockSchedulerCache is a general function for test.

@@ -519,27 +527,31 @@ func newSchedulerCache(config *rest.Config, schedulerNames []string, defaultQueu
nodeQueue: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()),
DeletedJobs: workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()),
kubeClient: kubeClient,
dynClient: dynamic.NewForConfigOrDie(config),
Copy link
Member

Choose a reason for hiding this comment

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

also need init fake client in newMockSchedulerCache.

Copy link
Member Author

Choose a reason for hiding this comment

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

same as above.

@lowang-bh
Copy link
Member

/lgtm

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 9, 2024
@volcano-sh-bot
Copy link
Contributor

@Vacant2333: changing LGTM is restricted to collaborators

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@volcano-sh-bot volcano-sh-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 8, 2024
@volcano-sh-bot
Copy link
Contributor

@Monokaix: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants