Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some yaml fix and cleanups after kube-batch in tree #307

Merged
merged 2 commits into from
Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 0 additions & 82 deletions cmd/deepcopy-gen/main.go

This file was deleted.

6 changes: 2 additions & 4 deletions cmd/kube-batch/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const (
leaseDuration = 15 * time.Second
renewDeadline = 10 * time.Second
retryPeriod = 5 * time.Second
apiVersion = "v1alpha1"
)

func buildConfig(opt *options.ServerOption) (*rest.Config, error) {
Expand All @@ -72,7 +71,7 @@ func buildConfig(opt *options.ServerOption) (*rest.Config, error) {
return cfg, nil
}

// Run the kubeBatch scheduler
// Run the kube-batch scheduler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be volcano scheduler.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, i missed this.

As there are many cleanup work left, let me open an issue

func Run(opt *options.ServerOption) error {
if opt.PrintVersion {
version.PrintVersionAndExit()
Expand All @@ -83,7 +82,6 @@ func Run(opt *options.ServerOption) error {
return err
}

// Start policy controller to allocate resources.
sched, err := scheduler.NewScheduler(config,
opt.SchedulerName,
opt.SchedulerConf,
Expand Down Expand Up @@ -127,7 +125,7 @@ func Run(opt *options.ServerOption) error {

rl, err := resourcelock.New(resourcelock.ConfigMapsResourceLock,
opt.LockObjectNamespace,
"kube-batch",
opt.SchedulerName,
leaderElectionClient.CoreV1(),
resourcelock.ResourceLockConfig{
Identity: id,
Expand Down
1 change: 0 additions & 1 deletion cmd/kube-batch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ func main() {
os.Exit(1)
}

// The default glog flush interval is 30 seconds, which is frighteningly long.
go wait.Until(glog.Flush, *logFlushFreq, wait.NeverStop)
defer glog.Flush()

Expand Down
2 changes: 1 addition & 1 deletion docs/design/job-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ metadata:
name: mpi-job
spec:
minAvailable: 2
schedulerName: scheduler
schedulerName: volcano
policies:
- event: PodEvicted
action: RestartJob
Expand Down
2 changes: 1 addition & 1 deletion example/integrations/mpi/mpi-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: lm-mpi-job
spec:
minAvailable: 3
schedulerName: kube-batch
schedulerName: volcano
plugins:
ssh: []
svc: []
Expand Down
2 changes: 1 addition & 1 deletion example/integrations/mxnet/train/train-mnist-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: mxnet-job
spec:
minAvailable: 5
schedulerName: scheduler
schedulerName: volcano
policies:
- event: PodEvicted
action: RestartJob
Expand Down
2 changes: 1 addition & 1 deletion example/integrations/tensorflow/tf-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ metadata:
name: tensorflow-benchmark
spec:
minAvailable: 3
schedulerName: kube-batch
schedulerName: volcano
plugins:
env: []
svc: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Job
metadata:
name: test-job-webhook-disallow
spec:
schedulerName: kube-batch
schedulerName: volcano
minAvailable: 1
tasks:
- replicas: 2
Expand Down
2 changes: 1 addition & 1 deletion example/invalid_jobs/duplicatedTaskName-webhook-deny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Job
metadata:
name: test-job-webhook-disallow
spec:
schedulerName: kube-batch
schedulerName: volcano
minAvailable: 4
tasks:
- replicas: 2
Expand Down
2 changes: 1 addition & 1 deletion example/invalid_jobs/minAvailable-webhook-deny.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Job
metadata:
name: test-job-webhook-disallow
spec:
schedulerName: kube-batch
schedulerName: volcano
minAvailable: 5 ## this job will be rejected because minAvailable is greater than total replicas in tasks
tasks:
- replicas: 2
Expand Down
2 changes: 1 addition & 1 deletion example/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: test-job
spec:
minAvailable: 3
schedulerName: kube-batch
schedulerName: volcano
policies:
- event: PodEvicted
action: RestartJob
Expand Down
2 changes: 1 addition & 1 deletion pkg/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (
"volcano.sh/volcano/pkg/scheduler/metrics"
)

// Scheduler watches for new unscheduled pods for kubebatch. It attempts to find
// Scheduler watches for new unscheduled pods for volcano. It attempts to find
// nodes that they fit on and writes bindings back to the api server.
type Scheduler struct {
cache schedcache.Cache
Expand Down