Skip to content

Commit

Permalink
Set podgroup to stable version (kubeflow#891)
Browse files Browse the repository at this point in the history
* Set podgroup to stable version

Signed-off-by: Peng Gao <[email protected]>

* Update operator rbac

Signed-off-by: Peng Gao <[email protected]>
  • Loading branch information
ggaaooppeenngg authored Apr 28, 2020
1 parent 7cd886c commit b597960
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions manifest/spark-operator-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ rules:
- apiGroups: ["sparkoperator.k8s.io"]
resources: ["sparkapplications", "scheduledsparkapplications", "sparkapplications/status", "scheduledsparkapplications/status"]
verbs: ["*"]
- apiGroups: ["scheduling.volcano.sh"]
resources: ["podgroups", "queues", "queues/status"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
2 changes: 1 addition & 1 deletion pkg/batchscheduler/volcano/volcano_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
)

const (
PodGroupName = "podgroups.scheduling.sigs.dev"
PodGroupName = "podgroups.scheduling.volcano.sh"
)

type VolcanoBatchScheduler struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/sparkapplication/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ func (c *Controller) shouldDoBatchScheduling(app *v1beta2.SparkApplication) (boo

scheduler, err := c.batchSchedulerMgr.GetScheduler(*app.Spec.BatchScheduler)
if err != nil {
glog.Errorf("failed to get batch scheduler for name %s", *app.Spec.BatchScheduler)
glog.Errorf("failed to get batch scheduler for name %s, %v", *app.Spec.BatchScheduler, err)
return false, nil
}
return scheduler.ShouldSchedule(app), scheduler
Expand Down

0 comments on commit b597960

Please sign in to comment.