Skip to content

Commit

Permalink
Merge pull request #2415 from igaskin/scheduler-name
Browse files Browse the repository at this point in the history
feat: adding option to add scheduler name to kubernetes driver
  • Loading branch information
tonistiigi authored Apr 17, 2024
2 parents 3905e8c + 74fdbb5 commit 1b16594
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions driver/kubernetes/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ func (f *factory) processDriverOpts(deploymentName string, namespace string, cfg
if _, isImage := cfg.DriverOpts["image"]; !isImage {
deploymentOpt.Image = bkimage.DefaultRootlessImage
}
case "schedulername":
deploymentOpt.SchedulerName = v
case "serviceaccount":
deploymentOpt.ServiceAccountName = v
case "nodeselector":
Expand Down
2 changes: 2 additions & 0 deletions driver/kubernetes/manifest/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type DeploymentOpt struct {
Image string
Replicas int
ServiceAccountName string
SchedulerName string

// Qemu
Qemu struct {
Expand Down Expand Up @@ -107,6 +108,7 @@ func NewDeployment(opt *DeploymentOpt) (d *appsv1.Deployment, c []*corev1.Config
},
Spec: corev1.PodSpec{
ServiceAccountName: opt.ServiceAccountName,
SchedulerName: opt.SchedulerName,
Containers: []corev1.Container{
{
Name: containerName,
Expand Down

0 comments on commit 1b16594

Please sign in to comment.