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

fix scheduler policy issue #256

Merged
merged 3 commits into from
Dec 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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