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

support initial scheduler configuration option via an environment variable #80

Merged
merged 3 commits into from
Jan 22, 2022

Conversation

momom-i
Copy link
Contributor

@momom-i momom-i commented Jan 13, 2022

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add initial scheduler configuration from file path taken from environment variable.

Which issue(s) this PR fixes:

Fixes #37

Special notes for your reviewer:

I've confirmed that it also worked when I passed configuration file path.
I'd like to learn more so correcting my every little mistake is welcome!

/label tide/merge-method-squash

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. labels Jan 13, 2022
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 13, 2022

CLA Signed

The committers are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jan 13, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @momom-i!

It looks like this is your first PR to kubernetes-sigs/kube-scheduler-simulator 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kube-scheduler-simulator has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 13, 2022
@k8s-ci-robot k8s-ci-robot added the sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. label Jan 13, 2022
@momom-i momom-i changed the title Initial scheduler config add initial scheduler config Jan 13, 2022
@momom-i momom-i force-pushed the initial-scheduler-config branch 2 times, most recently from 5a33132 to ec863bf Compare January 13, 2022 17:01
@sanposhiho
Copy link
Member

/assign

Copy link
Member

@sanposhiho sanposhiho left a comment

Choose a reason for hiding this comment

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

Nice work. 👍
Most of the changes look good. I left a few small comments.

config/config.go Outdated Show resolved Hide resolved
config/config.go Outdated Show resolved Hide resolved
config/config.go Outdated Show resolved Hide resolved
config/config.go Outdated Show resolved Hide resolved
@sanposhiho
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jan 15, 2022
@sanposhiho
Copy link
Member

sanposhiho commented Jan 15, 2022

@momom-i

And could you sign cla?
#80 (comment)

@sanposhiho
Copy link
Member

/test pull-kube-scheduler-simulator-run-tests

@momom-i momom-i force-pushed the initial-scheduler-config branch 2 times, most recently from 5f6c563 to 8dc4e36 Compare January 15, 2022 10:24
add test

Update config/config.go

Co-authored-by: Kensei Nakada <handbomusic@gmail.com>

Update config/config.go

Co-authored-by: Kensei Nakada <handbomusic@gmail.com>

Update config/config.go

Co-authored-by: Kensei Nakada <handbomusic@gmail.com>

change to return default config when no config path
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 18, 2022
@sanposhiho
Copy link
Member

/ok-to-test
/test pull-kube-scheduler-simulator-backend-unit-test

config/config.go Outdated
Comment on lines 93 to 96
dsc, err := defaultconfig.DefaultSchedulerConfig()
if err != nil {
return nil, xerrors.Errorf("create default scheduler config: %w", err)
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: Move these lines after L99(if e == "")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed: 3a0a5aa

@sanposhiho
Copy link
Member

/test pull-kube-scheduler-simulator-backend-lint

@sanposhiho
Copy link
Member

/test pull-kube-scheduler-simulator-backend-lint
/test pull-kube-scheduler-simulator-backend-unit-test

Copy link
Member

@sanposhiho sanposhiho left a comment

Choose a reason for hiding this comment

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

Thanks for the great work!!
As a next step, could you add an explanation in README about this feature in another PR?

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 22, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: momom-i, sanposhiho

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 22, 2022
@sanposhiho
Copy link
Member

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2022
@sanposhiho
Copy link
Member

/retitle support initial scheduler configuration option via an environment variable

@k8s-ci-robot k8s-ci-robot changed the title add initial scheduler config support initial scheduler configuration option via an environment variable Jan 22, 2022
@sanposhiho
Copy link
Member

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2022
@k8s-ci-robot k8s-ci-robot merged commit 2802ed2 into kubernetes-sigs:master Jan 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pass an initial scheduler configuration from CLI
3 participants