Skip to content

Commit

Permalink
Add Scheduling API v1beta1 in Helm Chart
Browse files Browse the repository at this point in the history
  • Loading branch information
thandayuthapani committed Feb 7, 2020
1 parent d515658 commit 343cb1f
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 104 deletions.
4 changes: 2 additions & 2 deletions installer/helm/chart/volcano/templates/admission.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["create", "get", "patch"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["queues"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["services"]
verbs: ["get"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["podgroups"]
verbs: ["get", "list", "watch"]

Expand Down
2 changes: 1 addition & 1 deletion installer/helm/chart/volcano/templates/controllers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["podgroups", "queues", "queues/status"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
- apiGroups: ["scheduling.k8s.io"]
Expand Down
4 changes: 2 additions & 2 deletions installer/helm/chart/volcano/templates/scheduler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ rules:
- apiGroups: ["scheduling.k8s.io"]
resources: ["priorityclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["queues"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["podgroups"]
verbs: ["list", "watch", "update"]

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: podgroups.scheduling.sigs.dev
name: podgroups.scheduling.volcano.sh
spec:
group: scheduling.sigs.dev
group: scheduling.volcano.sh
names:
kind: PodGroup
plural: podgroups
Expand Down Expand Up @@ -43,4 +43,4 @@ spec:
type: integer
type: object
type: object
version: v1alpha2
version: v1beta1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: queues.scheduling.sigs.dev
name: queues.scheduling.volcano.sh
spec:
group: scheduling.sigs.dev
group: scheduling.volcano.sh
names:
kind: Queue
plural: queues
Expand Down Expand Up @@ -48,6 +48,6 @@ spec:
type: integer
type: object
type: object
version: v1alpha2
version: v1beta1
subresources:
status: {}
30 changes: 15 additions & 15 deletions installer/volcano-development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ rules:
- apiGroups: ["scheduling.k8s.io"]
resources: ["priorityclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["queues"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["podgroups"]
verbs: ["list", "watch", "update"]

Expand Down Expand Up @@ -165,13 +165,13 @@ rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["create", "get", "patch"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["queues"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["services"]
verbs: ["get"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["podgroups"]
verbs: ["get", "list", "watch"]

Expand Down Expand Up @@ -318,7 +318,7 @@ rules:
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.sigs.dev"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["podgroups", "queues", "queues/status"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
- apiGroups: ["scheduling.k8s.io"]
Expand Down Expand Up @@ -700,19 +700,19 @@ status:
storedVersions: []

---
# Source: volcano/templates/scheduling_v1alpha2_podgroup.yaml
# Source: volcano/templates/scheduling_v1beta1_podgroup.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: podgroups.scheduling.sigs.dev
name: podgroups.scheduling.volcano.sh
spec:
group: scheduling.sigs.dev
group: scheduling.volcano.sh
names:
kind: PodGroup
plural: podgroups
shortNames:
- pg
- podgroup-v1alpha2
- podgroup-v1beta1
scope: Namespaced
validation:
openAPIV3Schema:
Expand Down Expand Up @@ -746,22 +746,22 @@ spec:
type: integer
type: object
type: object
version: v1alpha2
version: v1beta1

---
# Source: volcano/templates/scheduling_v1alpha2_queue.yaml
# Source: volcano/templates/scheduling_v1beta1_queue.yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: queues.scheduling.sigs.dev
name: queues.scheduling.volcano.sh
spec:
group: scheduling.sigs.dev
group: scheduling.volcano.sh
names:
kind: Queue
plural: queues
shortNames:
- q
- queue-v1alpha2
- queue-v1beta1
scope: Cluster
validation:
openAPIV3Schema:
Expand Down Expand Up @@ -800,7 +800,7 @@ spec:
type: integer
type: object
type: object
version: v1alpha2
version: v1beta1
subresources:
status: {}

4 changes: 2 additions & 2 deletions pkg/controllers/podgroup/pg_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func TestAddPodGroup(t *testing.T) {
},
expectedPodGroup: &scheduling.PodGroup{
TypeMeta: metav1.TypeMeta{
APIVersion: "scheduling.sigs.dev/v1alpha2",
APIVersion: "scheduling.volcano.sh/v1beta1",
Kind: "PodGroup",
},
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -111,7 +111,7 @@ func TestAddPodGroup(t *testing.T) {
},
expectedPodGroup: &scheduling.PodGroup{
TypeMeta: metav1.TypeMeta{
APIVersion: "scheduling.sigs.dev/v1alpha2",
APIVersion: "scheduling.volcano.sh/v1beta1",
Kind: "PodGroup",
},
ObjectMeta: metav1.ObjectMeta{
Expand Down
4 changes: 2 additions & 2 deletions pkg/controllers/queue/queue_controller_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ func (c *Controller) deleteQueue(obj interface{}) {
func (c *Controller) updateQueue(old, new interface{}) {
oldQueue, ok := old.(*schedulingv1beta1.Queue)
if !ok {
klog.Errorf("Can not covert old object %v to queues.scheduling.sigs.dev.", old)
klog.Errorf("Can not covert old object %v to queues.scheduling.volcano.sh.", old)
return
}

newQueue, ok := new.(*schedulingv1beta1.Queue)
if !ok {
klog.Errorf("Can not covert new object %v to queues.scheduling.sigs.dev.", old)
klog.Errorf("Can not covert new object %v to queues.scheduling.volcano.sh.", old)
return
}

Expand Down

0 comments on commit 343cb1f

Please sign in to comment.