Skip to content

Commit

Permalink
Merge branch 'master' into feature/addpassword
Browse files Browse the repository at this point in the history
  • Loading branch information
mikechengwei authored Jan 25, 2022
2 parents 1fda059 + 2f3e25e commit 8f9156d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions charts/tidb-operator/templates/config/_scheduler-config-yaml.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
{{- if semverCompare ">=1.23.0-0" .Capabilities.KubeVersion.GitVersion }}
apiVersion: kubescheduler.config.k8s.io/v1beta2
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: true
resourceNamespace: {{ .Release.Namespace }}
{{- if eq .Values.appendReleaseSuffix true}}
resourceName: {{ .Values.scheduler.schedulerName }}-{{.Release.Name}}
{{- else }}
resourceName: {{ .Values.scheduler.schedulerName }}
{{- end }}
profiles:
- schedulerName: tidb-scheduler
extenders:
- urlPrefix: http://127.0.0.1:10262/scheduler
filterVerb: filter
preemptVerb: preempt
weight: 1
enableHTTPS: false
httpTimeout: 30s
{{- else }}
apiVersion: kubescheduler.config.k8s.io/v1beta1
kind: KubeSchedulerConfiguration
leaderElection:
Expand All @@ -19,3 +40,4 @@ extenders:
weight: 1
enableHTTPS: false
httpTimeout: 30s
{{- end }}
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 @@ -69,11 +69,11 @@ spec:
{{ toYaml .Values.scheduler.resources | indent 12 }}
command:
- kube-scheduler
- --port=10261
- --v={{ .Values.scheduler.logLevel }}
{{- if $lgK8sV119 }}
- --config=/etc/kubernetes/scheduler-config.yaml
{{- else }}
- --port=10261
- --leader-elect=true
- --lock-object-namespace={{ .Release.Namespace }}
- --policy-configmap-namespace={{ .Release.Namespace }}
Expand Down

0 comments on commit 8f9156d

Please sign in to comment.