Skip to content

Commit

Permalink
fix scheduler policy issue (#256)
Browse files Browse the repository at this point in the history
* fix scheduler policy issue
  • Loading branch information
weekface authored Dec 28, 2018
1 parent 4b469da commit b34ecb0
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
{"name": "CheckVolumeBinding"},
{"name": "MaxGCEPDVolumeCount"},
{"name": "MatchInterPodAffinity"},
{"name": "CheckNodeMemoryPressure"},
{"name": "CheckNodeDiskPressure"},
{{- if semverCompare ">=1.11-0" .Capabilities.KubeVersion.GitVersion }}
{{- if semverCompare "~1.11.0" .Capabilities.KubeVersion.GitVersion }}
{"name": "CheckNodePIDPressure"},
{{- end }}
{{- if semverCompare "<1.12-0" .Capabilities.KubeVersion.GitVersion }}
{"name": "CheckNodeCondition"},
{"name": "CheckNodeMemoryPressure"},
{"name": "CheckNodeDiskPressure"},
{{- end }}
{"name": "CheckVolumeBinding"}
],
Expand Down
2 changes: 1 addition & 1 deletion charts/tidb-operator/templates/scheduler-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
- -v={{ .Values.scheduler.logLevel }}
- -port=10262
- name: kube-scheduler
image: {{ .Values.scheduler.kubeSchedulerImage }}
image: {{ required "scheduler.kubeSchedulerImage is required! Its verison must be the same as your kubernetes cluster version" .Values.scheduler.kubeSchedulerImage }}
resources:
{{ toYaml .Values.scheduler.resources | indent 12 }}
command:
Expand Down
4 changes: 2 additions & 2 deletions charts/tidb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ scheduler:
requests:
cpu: 80m
memory: 50Mi
# modify the hyperkube verison to your kubernetes version
kubeSchedulerImage: gcr.io/google-containers/hyperkube:v1.10.12
# this hyperkube verison must be the same as your kubernetes cluster version
# kubeSchedulerImage: gcr.io/google-containers/hyperkube:v1.12.1
2 changes: 2 additions & 0 deletions docs/aws-eks-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ connect onto your newly created cluster.

TiDB Operator manages TiDB clusters on Kubernetes and automates tasks related to operating a TiDB cluster. It makes TiDB a truly cloud-native database.

Uncomment the `scheduler.kubeSchedulerImage` in `values.yaml`, set it to the same as your kubernetes cluster version.

If you already have helm installed, you can continue here to deploy tidb-operator:

```sh
Expand Down
3 changes: 2 additions & 1 deletion docs/google-kubernetes-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ When you see `Running`, it's time to hit `Control + C` and proceed to the next s

The first TiDB component we are going to install is the TiDB Operator, using a Helm Chart. TiDB Operator is the management system that works with Kubernetes to bootstrap your TiDB cluster and keep it running. This step assumes you are in the `tidb-operator` working directory:

KUBE_VERSION=$(kubectl version --short | awk '/Server/{print $NF}' | awk -F '-' '{print $1}') &&
kubectl apply -f ./manifests/crd.yaml &&
kubectl apply -f ./manifests/gke-storage.yml &&
helm install ./charts/tidb-operator -n tidb-admin --namespace=tidb-admin
helm install ./charts/tidb-operator -n tidb-admin --namespace=tidb-admin --set scheduler.kubeSchedulerImage=gcr.io/google-containers/hyperkube:${KUBE_VERSION}

We can watch the operator come up with:

Expand Down
2 changes: 2 additions & 0 deletions docs/local-dind-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ $ KUBE_REPO_PREFIX=uhub.ucloud.cn/pingcap manifests/local-dind/dind-cluster-v1.1

## Step 2: Install TiDB Operator in the DinD Kubernetes cluster

Uncomment the `scheduler.kubeSchedulerImage` in `values.yaml`, set it to the same as your kubernetes cluster version.

```sh
$ kubectl apply -f manifests/crd.yaml

Expand Down
2 changes: 2 additions & 0 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ $ kubectl get crd tidbclusters.pingcap.com

After the `TidbCluster` custom resource is created, you can install TiDB Operator in your Kubernetes cluster.

Uncomment the `scheduler.kubeSchedulerImage` in `values.yaml`, set it to the same as your kubernetes cluster version.

```shell
$ helm install charts/tidb-operator --name=tidb-operator --namespace=tidb-admin
$ kubectl get po -n tidb-admin -l app.kubernetes.io/name=tidb-operator
Expand Down

0 comments on commit b34ecb0

Please sign in to comment.