From 34b7dce3dbaea0643ac47b3874eddb4410dcda5a Mon Sep 17 00:00:00 2001 From: Peng Gao Date: Mon, 27 Apr 2020 16:20:23 +0800 Subject: [PATCH 1/2] Set podgroup to stable version Signed-off-by: Peng Gao --- pkg/batchscheduler/volcano/volcano_scheduler.go | 2 +- pkg/controller/sparkapplication/controller.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/batchscheduler/volcano/volcano_scheduler.go b/pkg/batchscheduler/volcano/volcano_scheduler.go index 931ea36ea0..d4f6a06a55 100644 --- a/pkg/batchscheduler/volcano/volcano_scheduler.go +++ b/pkg/batchscheduler/volcano/volcano_scheduler.go @@ -34,7 +34,7 @@ import ( ) const ( - PodGroupName = "podgroups.scheduling.sigs.dev" + PodGroupName = "podgroups.scheduling.volcano.sh" ) type VolcanoBatchScheduler struct { diff --git a/pkg/controller/sparkapplication/controller.go b/pkg/controller/sparkapplication/controller.go index 19f79956fa..83644043bc 100644 --- a/pkg/controller/sparkapplication/controller.go +++ b/pkg/controller/sparkapplication/controller.go @@ -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 From 0f6f2546b7f13c9446947b56d2f78345a6bc94c1 Mon Sep 17 00:00:00 2001 From: Peng Gao Date: Mon, 27 Apr 2020 16:37:36 +0800 Subject: [PATCH 2/2] Update operator rbac Signed-off-by: Peng Gao --- manifest/spark-operator-rbac.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/manifest/spark-operator-rbac.yaml b/manifest/spark-operator-rbac.yaml index c03edc7b99..ec613ad323 100644 --- a/manifest/spark-operator-rbac.yaml +++ b/manifest/spark-operator-rbac.yaml @@ -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