add tier and production

This commit is contained in:
lenhattan86 2021-10-05 20:43:39 -07:00
parent c6adde03af
commit c0c79997d0
2 changed files with 6 additions and 2 deletions

4
go.mod
View file

@ -3,7 +3,7 @@ module github.com/aurora-scheduler/australis
go 1.15 go 1.15
require ( require (
github.com/aurora-scheduler/gorealis/v2 v2.22.2 github.com/aurora-scheduler/gorealis/v2 v2.25.0
github.com/pkg/errors v0.9.1 github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.6.0 github.com/sirupsen/logrus v1.6.0
github.com/spf13/cobra v1.0.0 github.com/spf13/cobra v1.0.0
@ -13,4 +13,4 @@ require (
gopkg.in/yaml.v2 v2.2.8 gopkg.in/yaml.v2 v2.2.8
) )
replace github.com/apache/thrift v0.13.0 => github.com/ridv/thrift v0.13.2 replace github.com/apache/thrift v0.13.0 => github.com/ridv/thrift v0.13.2

View file

@ -71,7 +71,9 @@ type Job struct {
URIs []URI `yaml:"uris"` URIs []URI `yaml:"uris"`
Metadata map[string]string `yaml:"labels"` Metadata map[string]string `yaml:"labels"`
Service bool `yaml:"service"` Service bool `yaml:"service"`
Tier string `yaml:"tier,omitempty" default:"preemptible"`
Priority int32 `yaml:"priority"` Priority int32 `yaml:"priority"`
Production bool `yaml:"production"`
Thermos []ThermosProcess `yaml:",flow,omitempty"` Thermos []ThermosProcess `yaml:",flow,omitempty"`
Container *Container `yaml:"container,omitempty"` Container *Container `yaml:"container,omitempty"`
CronSchedule *string `yaml:"cronSchedule,omitempty"` CronSchedule *string `yaml:"cronSchedule,omitempty"`
@ -89,7 +91,9 @@ func (j *Job) ToRealis() (*realis.AuroraJob, error) {
RAM(j.RAM). RAM(j.RAM).
Disk(j.Disk). Disk(j.Disk).
IsService(j.Service). IsService(j.Service).
Tier(j.Tier).
Priority(j.Priority). Priority(j.Priority).
Production(j.Production).
InstanceCount(j.Instances). InstanceCount(j.Instances).
MaxFailure(j.MaxFailures) MaxFailure(j.MaxFailures)