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 docs on scheduler MultiPoint config #30442

Merged

Conversation

damemi
Copy link
Contributor

@damemi damemi commented Nov 11, 2021

This adds documentation for the scheduler's new MultiPoint config field, along with examples and comparisons to the old way of configuring the scheduler.

Enhancement issue: kubernetes/enhancements#2891
Work PR: kubernetes/kubernetes#105611

@k8s-ci-robot k8s-ci-robot added this to the 1.23 milestone Nov 11, 2021
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 11, 2021
@netlify
Copy link

netlify bot commented Nov 11, 2021

👷 Deploy Preview for kubernetes-io-vnext-staging processing.

🔨 Explore the source changes: f7f336c

🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/61a65ee8ae674f0007fa2756

Copy link
Contributor Author

@damemi damemi left a comment

Choose a reason for hiding this comment

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

/cc @alculquicondor @ahg-g @Huang-Wei
ptal, and let me know any other edge cases I should cover

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 11, 2021
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Nov 11, 2021
@jlbutler
Copy link
Contributor

/assign @nate-double-u

```

Specific extension points can be excluded from `MultiPoint` expansion using
the `disabled` fields. This works with disabling default plugins, out-of-tree plugins,
Copy link
Member

Choose a reason for hiding this comment

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

nit: should it be field instead?

Suggested change
the `disabled` fields. This works with disabling default plugins, out-of-tree plugins,
the `disabled` field. This works with disabling default plugins, out-of-tree plugins,

Copy link
Member

Choose a reason for hiding this comment

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

I think we should avoid talking about out-of-tree plugins in official k8s documentation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't disagree, but since this is different than how previous extension points treated out-of-tree plugins and this does apply to them, should those aspects be noted somewhere? Maybe part of the scheduling framework docs?

content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
@@ -255,7 +255,183 @@ the same configuration parameters (if applicable). This is because the scheduler
only has one pending pods queue.
{{< /note >}}

## {{% heading "whatsnext" %}}
### MultiPoint config
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd write:

Suggested change
### MultiPoint config
## Plugins that apply to all extension points {#multipoint}

The fragment identifier will then be multipoint.

Also, under “Extension points” (line 47), I'd mention and hyperlink to this section.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

made this multiple extension points rather than all, think that's clearer

@sftim
Copy link
Contributor

sftim commented Nov 16, 2021

/sig scheduling

@sftim
Copy link
Contributor

sftim commented Nov 16, 2021

If this is a new field that doesn't work in older Kubernetes, we should also document that detail.

Copy link
Member

@Huang-Wei Huang-Wei 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 write-up! LGTM except for some nits.

content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
Copy link
Contributor

@nate-double-u nate-double-u left a comment

Choose a reason for hiding this comment

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

A couple of comments inline:

content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 17, 2021
content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
```

Specific extension points can be excluded from `MultiPoint` expansion using
the `disabled` fields. This works with disabling default plugins, out-of-tree plugins,
Copy link
Member

Choose a reason for hiding this comment

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

I think we should avoid talking about out-of-tree plugins in official k8s documentation.

content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
profiles:
- schedulerName: multipoint-scheduler
plugins:
score:
Copy link
Member

Choose a reason for hiding this comment

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

multiPoint? Order only really matters for Filter

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I was trying to show a couple things here, that we can reorder and re-weight the plugins. Order technically only matters for Filter, true, but I think this still gets both of those points across

Copy link
Member

Choose a reason for hiding this comment

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

sounds good

* Disables `DefaultPlugin1`, but only for `Filter`
* Reorders `DefaultPlugin2` to run first in `Score` (even before the custom plugins)

Without `MultiPoint` configuration, the above snippet would equate to this:
Copy link
Member

Choose a reason for hiding this comment

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

Maybe explicitly disable * in multiPoint to make it clearer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this section I'm actually showing what the equivalent in a pre-v1beta3 config would be. I tried updating the wording here to make that clearer. I could still add the disable: * to multiPoint if you think that would help too

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 23, 2021

In older versions of the config, without `multiPoint`, the above snippet would equate to this:
```yaml
apiVersion: kubescheduler.config.k8s.io/v1beta3
Copy link
Member

Choose a reason for hiding this comment

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

I think this either should be v1beta2 or just add the disable *.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

went with v1beta2 and pointed that out. multiPoint.disabled: * would mean all of the other default plugins need to be explicitly enabled which isn't exactly the comparison I was trying to draw here

profiles:
- schedulerName: multipoint-scheduler
plugins:
score:
Copy link
Member

Choose a reason for hiding this comment

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

sounds good

content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
@@ -341,7 +341,7 @@ extension point in the future, the `multiPoint` config will automatically enable
for the new extension.

Specific extension points can be excluded from `MultiPoint` expansion using
the `disabled` field. This works with disabling default plugins, out-of-tree plugins,
the `disabled` field. This works with disabling default plugins, non-default plugins,
Copy link
Member

Choose a reason for hiding this comment

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

Maybe let's say:

using the disabled field for the extension point.

Copy link
Member

@alculquicondor alculquicondor left a comment

Choose a reason for hiding this comment

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

Do we have to add any extra notes in #30404?

IIUC, people using v1beta2 could just swap the version without needing extra changes, right?

@@ -78,6 +78,8 @@ extension points:
least one bind plugin is required.
1. `postBind`: This is an informational extension point that is called after
a Pod has been bound.
1. `multiPoint`: This is a config-only field that allows plugins to be enabled for
Copy link
Member

Choose a reason for hiding this comment

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

enabled or disabled

@damemi
Copy link
Contributor Author

damemi commented Nov 24, 2021

Do we have to add any extra notes in #30404?

IIUC, people using v1beta2 could just swap the version without needing extra changes, right?

Right, an existing v1beta2 config will work with v1beta3 without any changes

@alculquicondor
Copy link
Member

/lgtm

/sig scheduling

@k8s-ci-robot k8s-ci-robot added the sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. label Nov 24, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 24, 2021
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 99fd7c5079bc28eedd04ff2c0b2e6d721f4969fb

Copy link
Contributor

@nate-double-u nate-double-u left a comment

Choose a reason for hiding this comment

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

This looks good from a docs standpoint. I have a couple suggestions inline to simplify or clarify a couple sentences. I don't think these are strictly necessary for merge though.

/lgtm
/cc @jlbutler

content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
Copy link
Contributor

@nate-double-u nate-double-u left a comment

Choose a reason for hiding this comment

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

I'm sorry, I didn't scroll down far enough on the deploy preview.

The "What's next" heading needs to be fixed:

Screen Shot 2021-11-26 at 3 34 09 PM

content/en/docs/reference/scheduling/config.md Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 30, 2021
@damemi
Copy link
Contributor Author

damemi commented Nov 30, 2021

Updated and squashed, will need another lgtm when anyone has the chance

@nate-double-u
Copy link
Contributor

/lgtm

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

LGTM label has been added.

Git tree hash: b2573535f5bab19c8998ebb0b5eb577eacf1b067

@jlbutler
Copy link
Contributor

looks like final editorial and tech comments have been addressed, thanks!
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jlbutler

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 Nov 30, 2021
@k8s-ci-robot k8s-ci-robot merged commit 37e00b2 into kubernetes:dev-1.23 Nov 30, 2021
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. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants