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

Deprecated flags are recommended on k8s.io/docs/reference/scheduling/policies/ #21051

Closed
JoelColledge opened this issue May 18, 2020 · 10 comments
Labels
language/en Issues or PRs related to English language lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.

Comments

@JoelColledge
Copy link

This is a Bug Report

Problem:

The documentation recommends configuring kube-scheduler with --policy-config-file or --policy-configmap which are deprecated.

--policy-config-file string
  DEPRECATED: file with scheduler policy configuration. This file is used if policy ConfigMap is not provided or --use-legacy-policy-config=true
--policy-configmap string
  DEPRECATED: name of the ConfigMap object that contains scheduler's policy configuration. It must exist in the system namespace before scheduler initialization if --use-legacy-policy-config=false. The config must be provided as the value of an element in 'Data' map with the key='policy.cfg'

Proposed Solution:

Replace the instructions with a solution which is not deprecated. I'm haven't yet been able to find out what the recommended solution is.

Alternative solution: If there is no viable recommended way to set the policy config, then open a ticket against kube-scheduler to remove the "DEPRECATED" marking.

Page to Update:
https://kubernetes.io/docs/reference/scheduling/policies/

@sftim
Copy link
Contributor

sftim commented May 18, 2020

It sounds like it might be OK to revise https://kubernetes.io/docs/reference/scheduling/policies/ to mark the whole topic as deprecated. That's appropriate if this kind of configuration is indeed deprecated; I have not checked that.

@sftim
Copy link
Contributor

sftim commented May 18, 2020

/sig scheduling
/priority backlog
/language en

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. priority/backlog Higher priority than priority/awaiting-more-evidence. language/en Issues or PRs related to English language labels May 18, 2020
@JoelColledge
Copy link
Author

It looks like the topic isn't entirely deprecated, the way that the configuration is provided has just been changed radically. Something to do with a shift to "ComponentConfig".

See here for the new approach. And here for an example config which shows how to set the policies via a file or ConfigMap, plus an example of how these policies are configured.

I haven't been able to find proper documentation for any of this yet. The --config format can be obtained with --write-config-to or by scraping it from the go type. But this still doesn't show what format should be used for the policy. This code seems to specify the default values for priority weights etc, but that doesn't seem to map to a format for the policy map.

Is there some general way of getting the cluster itself to tell me what format it expects and what plugins are available?

I haven't tried any of this out yet.

@JoelColledge
Copy link
Author

But this still doesn't show what format should be used for the policy.

Maybe the policy format is still the one linked from the existing documentation and the available predicates and priorities are still the ones documented.

If that is the case, the only change needs to be adding documentation for how to refer to the policy config using --config.

@JoelColledge
Copy link
Author

According to https://pkg.go.dev/k8s.io/kubernetes/pkg/scheduler/apis/config?tab=doc#KubeSchedulerConfiguration AlgorithmSource is being deprecated, and in a Slack conversation it was confirmed that the whole Predicates/Priorities approach is being deprecated in favor of the Profiles/Plugins approach. So it seems that @sftim was right in suggesting that https://kubernetes.io/docs/reference/scheduling/policies/ as a whole should be marked deprecated.

That would resolve this issue. It still leaves me working on how to get the scheduler configured using the new approach.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 20, 2020
@gwohletz
Copy link

Likewise, all I really want to do is enable MostRequestedPriority but I'm at a loss on what the right way to do this is without using these "deprecated" arguments/methods

@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 23, 2020
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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
language/en Issues or PRs related to English language lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. priority/backlog Higher priority than priority/awaiting-more-evidence. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling.
Projects
None yet
Development

No branches or pull requests

5 participants