Added the label to YAML to excute the pods on another node
This commit is contained in:
parent
7c913bec0e
commit
411effb000
@ -59,6 +59,9 @@ type Spec struct {
|
|||||||
Volumes []VolumeClaimTemplate `yaml:"volumeClaimTemplates,omitempty"`
|
Volumes []VolumeClaimTemplate `yaml:"volumeClaimTemplates,omitempty"`
|
||||||
Templates []Template `yaml:"templates"`
|
Templates []Template `yaml:"templates"`
|
||||||
Timeout int `yaml:"activeDeadlineSeconds,omitempty"`
|
Timeout int `yaml:"activeDeadlineSeconds,omitempty"`
|
||||||
|
NodeSelector struct{
|
||||||
|
NodeRole string `yaml:"node-role"`
|
||||||
|
} `yaml:"nodeSelector"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: found on a processing instance linked to storage
|
// TODO: found on a processing instance linked to storage
|
||||||
@ -73,6 +76,7 @@ func (b *ArgoBuilder) CreateDAG(namespace string, write bool) ( int, []string, [
|
|||||||
if b.Timeout > 0 {
|
if b.Timeout > 0 {
|
||||||
b.Workflow.Spec.Timeout = b.Timeout
|
b.Workflow.Spec.Timeout = b.Timeout
|
||||||
}
|
}
|
||||||
|
b.Workflow.Spec.NodeSelector.NodeRole = "worker"
|
||||||
b.Workflow.Spec.ServiceAccountName = "sa-"+namespace
|
b.Workflow.Spec.ServiceAccountName = "sa-"+namespace
|
||||||
b.Workflow.Spec.Entrypoint = "dag"
|
b.Workflow.Spec.Entrypoint = "dag"
|
||||||
b.Workflow.ApiVersion = "argoproj.io/v1alpha1"
|
b.Workflow.ApiVersion = "argoproj.io/v1alpha1"
|
||||||
|
Loading…
Reference in New Issue
Block a user