mirror of https://github.com/docker/buildx.git
Merge pull request #2415 from igaskin/scheduler-name
feat: adding option to add scheduler name to kubernetes driver
This commit is contained in:
commit
1b16594f4a
|
@ -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":
|
||||
|
|
|
@ -20,6 +20,7 @@ type DeploymentOpt struct {
|
|||
Image string
|
||||
Replicas int
|
||||
ServiceAccountName string
|
||||
SchedulerName string
|
||||
|
||||
// Qemu
|
||||
Qemu struct {
|
||||
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue