Skip to content

Commit

Permalink
capacity scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
denkensk committed Sep 8, 2020
1 parent ed186dc commit b9b7a32
Show file tree
Hide file tree
Showing 7 changed files with 960 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import (

"k8s.io/kubernetes/cmd/kube-scheduler/app"

"sigs.k8s.io/scheduler-plugins/pkg/capacityscheduling"
"sigs.k8s.io/scheduler-plugins/pkg/coscheduling"
"sigs.k8s.io/scheduler-plugins/pkg/qos"

// Ensure scheme package is initialized.
_ "sigs.k8s.io/scheduler-plugins/pkg/apis/config/scheme"
)
Expand All @@ -35,6 +37,7 @@ func main() {
// Later they can consist of scheduler profile(s) and hence
// used by various kinds of workloads.
command := app.NewSchedulerCommand(
app.WithPlugin(capacityscheduling.Name, capacityscheduling.New),
app.WithPlugin(coscheduling.Name, coscheduling.New),
app.WithPlugin(qos.Name, qos.New),
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: elasticquotas.capacityscheduling.sigs.k8s.io
spec:
group: capacityscheduling.sigs.k8s.io
versions:
- name: v1alpha1
served: true
storage: true
scope: Namespaced
names:
plural: elasticquotas
singular: elasticquota
kind: ElasticQuota
shortNames:
- eq
validation:
openAPIV3Schema:
type: object
properties:
spec:
type: object
properties:
min:
type: object
max:
type: object
status:
type: object
properties:
used:
type: object
18 changes: 18 additions & 0 deletions manifests/capacityscheduling/scheduler-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: kubescheduler.config.k8s.io/v1alpha2
kind: KubeSchedulerConfiguration
leaderElection:
leaderElect: false
clientConnection:
kubeconfig: /etc/kubernetes/framework-config.yaml
profiles:
- schedulerName: default-scheduler
plugins:
preFilter:
enabled:
- name: CapacityScheduling
postFilter:
enabled:
- name: CapacityScheduling
reserve:
enabled:
- name: CapacityScheduling
16 changes: 16 additions & 0 deletions pkg/capacityscheduling/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Overview

This folder holds some sample plugin implementations based on [Capacity Scheduling](https://github.com/kubernetes-sigs/scheduler-plugins/tree/master/kep/9-capacity-scheduling).

## Maturity Level

<!-- Check one of the values: Sample, Alpha, Beta, GA -->

- [ ] 💡 Sample (for demonstrating and inspiring purpose)
- [ ] 👶 Alpha (used in companies for pilot projects)
- [ ] 👦 Beta (used in companies and developed actively)
- [x] 👨 Stable (used in companies for production workloads)

## Tutorial

### Demo
Loading

0 comments on commit b9b7a32

Please sign in to comment.