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

open-local does not work with kubernetes after v1.23 #131

Open
john-liuqiming opened this issue May 10, 2022 · 2 comments
Open

open-local does not work with kubernetes after v1.23 #131

john-liuqiming opened this issue May 10, 2022 · 2 comments

Comments

@john-liuqiming
Copy link

Ⅰ. Issue Description

Ⅱ. Describe what happened

I deploy open-local to my k8s cluster, and kube-scheduler restart failed.
the error log:

Error: unknown flag: --policy-config-file

I use kubernetes version v1.23.6

according to Kubernetes Documentation: Scheduling Policies
policy-config-file flag is not supported after version v1.23

In Kubernetes versions before v1.23, a scheduling policy can be used to specify the predicates and priorities process. For example, you can set a scheduling policy by running kube-scheduler --policy-config-file or kube-scheduler --policy-configmap .

This scheduling policy is not supported since Kubernetes v1.23. Associated flags policy-config-file, policy-configmap, policy-configmap-namespace and use-legacy-policy-config are also not supported. Instead, use the Scheduler Configuration to achieve similar behavior.

It seems following script in helm/templates/init-job.yaml which add '--policy-config-file' to kube-scheduler cause the problem

            if ! grep "^\    - --policy-config-file=*" /etc/kubernetes/manifests/kube-scheduler.yaml; then
                sed -i "/    - --kubeconfig=/a \    - --policy-config-file=/etc/kubernetes/scheduler-policy-config.json" /etc/kubernetes/manifests/kube-scheduler.yaml
            fi

Ⅲ. Describe what you expected to happen

kube-scheduler running after deploy open-local

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. using kuberbetes version newer than v1.23
  2. deploy open-local
    3.use "kubectl get componentstatus" check scheduler status

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • Open-Local version: v0.5.4
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools: helm
  • Others:
@john-liuqiming
Copy link
Author

a work workaround:

  1. disable init_job using values.yaml by setting .extender.init_job to false
  2. config kube-scheduler manually using KubeSchedulerConfiguration

@TheBeatles1994
Copy link
Collaborator

TheBeatles1994 commented May 10, 2022

Thx for your workaround, we will fix it in next release.(and it would be very grateful if you can fix this, we need more great contributors like you)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants