Skip to content

Commit

Permalink
Support configure enableBatchScheduler (helm#16345)
Browse files Browse the repository at this point in the history
Signed-off-by: TommyLike <hu.husheng@huawei.com>
  • Loading branch information
TommyLike authored and k8s-ci-robot committed Sep 5, 2019
1 parent c269166 commit d977e1f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion incubator/sparkoperator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
name: sparkoperator
description: A Helm chart for Spark on Kubernetes operator
version: 0.2.7
version: 0.2.8
appVersion: v2.4.0-v1beta1-0.9.0
kubeVersion: ">=1.8.0-0"
keywords:
Expand Down
1 change: 1 addition & 0 deletions incubator/sparkoperator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The following table lists the configurable parameters of the Spark operator char
| `resyncInterval` | Informer resync interval in seconds | 30 |
| `webhookPort` | Service port of the webhook server | 8080 |
| `resources` | Resources needed for the sparkoperator deployment | {} |
| `enableBatchScheduler` | Whether to enable batch scheduler for pod scheduling | false |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ spec:
- -controller-threads={{ .Values.controllerThreads }}
- -resync-interval={{ .Values.resyncInterval }}
- -logtostderr
- -enable-batch-scheduler={{ .Values.enableBatchScheduler }}
{{- if .Values.enableMetrics }}
- -enable-metrics=true
- -metrics-labels=app_type
Expand Down
7 changes: 7 additions & 0 deletions incubator/sparkoperator/templates/spark-operator-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ rules:
- apiGroups: ["sparkoperator.k8s.io"]
resources: ["sparkapplications", "scheduledsparkapplications"]
verbs: ["*"]
{{- if .Values.enableBatchScheduler }}
# This api resources below is configured for the `volcano` batch scheduler.
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
resources: ["podgroups"]
verbs: ["*"]
{{- end }}

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
4 changes: 4 additions & 0 deletions incubator/sparkoperator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ nodeSelector: {}
resources: {}

logLevel: 2

## Whether to enable batch scheduler for pod scheduling,
## if enabled, end user can specify batch scheduler name in spark application.
enableBatchScheduler: false

0 comments on commit d977e1f

Please sign in to comment.