diff --git a/deployment/k8sPaiLibrary/template/apiserver.yaml.template b/deployment/k8sPaiLibrary/template/apiserver.yaml.template index 0e3012450..922f2c2c6 100644 --- a/deployment/k8sPaiLibrary/template/apiserver.yaml.template +++ b/deployment/k8sPaiLibrary/template/apiserver.yaml.template @@ -32,6 +32,7 @@ spec: name: apiserver-container command: - /usr/local/bin/kube-apiserver + # Do not enable Priority Admission Controller - --admission-control=NamespaceLifecycle,LimitRanger,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,DenyEscalatingExec - --insecure-bind-address - {{ hostcofig['hostip'] }} diff --git a/deployment/k8sPaiLibrary/template/scheduler.yaml.template b/deployment/k8sPaiLibrary/template/scheduler.yaml.template index ea8228890..362f497b2 100644 --- a/deployment/k8sPaiLibrary/template/scheduler.yaml.template +++ b/deployment/k8sPaiLibrary/template/scheduler.yaml.template @@ -25,11 +25,17 @@ spec: containers: - image: {{ cluster_cfg['kubernetes']['docker-registry'] }}/kube-scheduler:{{ cluster_cfg['kubernetes']['kube-scheduler-version'] }} name: kube-scheduler - command: - - /usr/local/bin/kube-scheduler - - --master - - {{ cluster_cfg['kubernetes']['api-servers-ip'] }}:{{ cluster_cfg['kubernetes']['api-servers-port'] }} - - --leader-elect=true + command: [ + "sh", "-c", + "echo apiVersion: kubescheduler.config.k8s.io/v1alpha1 >> sc.yaml && + echo kind: KubeSchedulerConfiguration >> sc.yaml && + echo disablePreemption: true >> sc.yaml && + /usr/local/bin/kube-scheduler + --master={{ cluster_cfg['kubernetes']['api-servers-ip'] }}:{{ cluster_cfg['kubernetes']['api-servers-port'] }} + --feature-gates=PodPriority=true + --config=sc.yaml + --leader-elect=true + --v=4"] livenessProbe: httpGet: path: /healthz diff --git a/src/hivedscheduler/deploy/hivedscheduler-config.yaml.template b/src/hivedscheduler/deploy/hivedscheduler-config.yaml.template index 77f7e8005..b04fd1c0f 100644 --- a/src/hivedscheduler/deploy/hivedscheduler-config.yaml.template +++ b/src/hivedscheduler/deploy/hivedscheduler-config.yaml.template @@ -25,6 +25,7 @@ data: apiVersion: kubescheduler.config.k8s.io/v1alpha1 kind: KubeSchedulerConfiguration schedulerName: hivedscheduler + disablePreemption: true algorithmSource: policy: configMap: diff --git a/src/hivedscheduler/deploy/hivedscheduler.yaml.template b/src/hivedscheduler/deploy/hivedscheduler.yaml.template index f506ad3a5..611667822 100644 --- a/src/hivedscheduler/deploy/hivedscheduler.yaml.template +++ b/src/hivedscheduler/deploy/hivedscheduler.yaml.template @@ -39,6 +39,7 @@ spec: "/usr/local/bin/kube-scheduler", "--master={{ cluster_cfg['layout']['kubernetes']['api-servers-url'] }}", "--config=/hivedscheduler-config/config.yaml", + "--feature-gates=PodPriority=true", "-v=4"] volumeMounts: - name: hivedscheduler-config diff --git a/subprojects/GOPATH/src/github.com/microsoft/hivedscheduler/example/run/deploy.yaml b/subprojects/GOPATH/src/github.com/microsoft/hivedscheduler/example/run/deploy.yaml index 068ca05bd..e7dd10466 100644 --- a/subprojects/GOPATH/src/github.com/microsoft/hivedscheduler/example/run/deploy.yaml +++ b/subprojects/GOPATH/src/github.com/microsoft/hivedscheduler/example/run/deploy.yaml @@ -17,6 +17,7 @@ data: apiVersion: kubescheduler.config.k8s.io/v1alpha1 kind: KubeSchedulerConfiguration schedulerName: hivedscheduler + disablePreemption: true algorithmSource: policy: configMap: @@ -126,6 +127,7 @@ spec: "/usr/local/bin/kube-scheduler", "--master=http://10.151.41.15:8080", "--config=/hivedscheduler-config/config.yaml", + "--feature-gates=PodPriority=true", "-v=4"] volumeMounts: - name: hivedscheduler-config