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

Initialise New Scheduler #2050

Merged
merged 203 commits into from
Jan 25, 2023
Merged
Show file tree
Hide file tree
Changes from 199 commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
c393f84
Make legacyScheduler generic
d80tb7 Dec 15, 2022
13a9fad
linting
d80tb7 Dec 15, 2022
4808c81
linting
d80tb7 Dec 15, 2022
91f1a4c
Merge branch 'master' of github.com:G-Research/armada into f/chrisma/…
d80tb7 Dec 20, 2022
caab90c
wip
d80tb7 Dec 20, 2022
f2ca8cc
wip
d80tb7 Dec 20, 2022
7085a22
wip
d80tb7 Dec 30, 2022
5a79d67
wip
d80tb7 Dec 30, 2022
3e868ab
wip
d80tb7 Dec 30, 2022
ba18fcb
remove nats from e2e
d80tb7 Dec 30, 2022
ecba990
remove more nats config
d80tb7 Dec 30, 2022
d7a2140
fixed submit test
d80tb7 Dec 30, 2022
c512b1f
linting
d80tb7 Dec 30, 2022
bceb9bb
go mod tidy
d80tb7 Dec 30, 2022
17b5a87
increase sleep to 60
d80tb7 Dec 30, 2022
b8ef98c
Merge branch 'master' of github.com:G-Research/armada into f/chrisma/…
d80tb7 Dec 30, 2022
8e4f4f3
wip
d80tb7 Dec 30, 2022
1afd6ea
wip
d80tb7 Dec 30, 2022
9124986
linting
d80tb7 Dec 30, 2022
8aad74b
unused context
d80tb7 Dec 31, 2022
d1d9a04
remove extra queued-jobs-iterator
d80tb7 Jan 3, 2023
def473c
wip
d80tb7 Jan 3, 2023
f781680
wip
d80tb7 Jan 3, 2023
ec623d1
linting passes
d80tb7 Jan 4, 2023
899837d
documentation
d80tb7 Jan 4, 2023
fdb10f0
Merge branch 'master' into f/chrisma/generic-legacy-scheduler
d80tb7 Jan 4, 2023
86d6019
unit tests
d80tb7 Jan 4, 2023
89db1a4
doc
d80tb7 Jan 4, 2023
b587942
more tests
d80tb7 Jan 4, 2023
5bef869
linting
d80tb7 Jan 4, 2023
1a44b29
more doc, revert files modified in error
d80tb7 Jan 4, 2023
75d1945
Merge branch 'master' of github.com:G-Research/armada into f/chrisma/…
d80tb7 Jan 4, 2023
90c9385
more linting
d80tb7 Jan 4, 2023
f1a7eac
more linting
d80tb7 Jan 4, 2023
d690997
fix tests
d80tb7 Jan 4, 2023
0e30cc6
Merge branch 'master' of github.com:G-Research/armada into f/chrisma/…
d80tb7 Jan 5, 2023
374cc05
merge master
d80tb7 Jan 5, 2023
362fb29
doc improvements
d80tb7 Jan 5, 2023
c577613
wip
d80tb7 Jan 5, 2023
e2e0fd3
Update internal/scheduler/scheduler.go
d80tb7 Jan 5, 2023
6771842
fixes following review
d80tb7 Jan 5, 2023
720a991
Merge remote-tracking branch 'origin/f/chrisma/core-scheduler' into f…
d80tb7 Jan 5, 2023
8bc11a1
Merge branch 'f/chrisma/core-scheduler' of github.com:G-Research/arma…
d80tb7 Jan 5, 2023
3a6e3ea
wip
d80tb7 Jan 5, 2023
1360831
renamed publisher_test
d80tb7 Jan 5, 2023
c240bde
wip
d80tb7 Jan 7, 2023
a7361c8
more unit tests
d80tb7 Jan 7, 2023
6704723
linting
d80tb7 Jan 7, 2023
23fcf37
merge master
d80tb7 Jan 7, 2023
f742080
fixes after merge
d80tb7 Jan 7, 2023
ccbcf08
Update internal/scheduler/scheduling_algo.go
d80tb7 Jan 7, 2023
496d4f7
code review comments
d80tb7 Jan 7, 2023
7882bdd
Merge remote-tracking branch 'origin/f/chrisma/core-scheduler' into f…
d80tb7 Jan 7, 2023
002e33b
Merge branch 'f/chrisma/core-scheduler' of github.com:G-Research/arma…
d80tb7 Jan 7, 2023
f940098
mocks
d80tb7 Jan 8, 2023
de472b3
Merge branch 'master' into f/chrisma/generic-legacy-scheduler
d80tb7 Jan 8, 2023
6e1871c
wip
d80tb7 Jan 8, 2023
8173e1a
merge from f/chrisma/generic-legacy-scheduler
d80tb7 Jan 8, 2023
c4becbf
wip
d80tb7 Jan 8, 2023
4510837
wip
d80tb7 Jan 8, 2023
eeeeca2
doc for job repo
d80tb7 Jan 8, 2023
bc56796
doc for job repo
d80tb7 Jan 8, 2023
8bfe868
addressed some warnings
d80tb7 Jan 8, 2023
9ee856e
restore nodes table
d80tb7 Jan 8, 2023
ca8a2ec
filter out queues with no jobs to schedule
d80tb7 Jan 8, 2023
aac1715
wip
d80tb7 Jan 9, 2023
429ddf1
wip
d80tb7 Jan 12, 2023
1361f55
merged master
d80tb7 Jan 12, 2023
a57e807
remived nats from main makefiles
d80tb7 Jan 12, 2023
85ef8e2
removed extra config
d80tb7 Jan 12, 2023
c81b131
renamed file
d80tb7 Jan 12, 2023
4eca00c
code review comments
d80tb7 Jan 12, 2023
eda72db
Merge branch 'master' into f/chrisma/remove-nats
d80tb7 Jan 12, 2023
1405229
merged master
d80tb7 Jan 12, 2023
b9d8c3e
linting
d80tb7 Jan 12, 2023
4172919
linting
d80tb7 Jan 12, 2023
bbbe272
more linting
d80tb7 Jan 12, 2023
0bcdf4d
more linting
d80tb7 Jan 12, 2023
82a56bd
another nats reference
d80tb7 Jan 12, 2023
378e98c
another nats reference
d80tb7 Jan 12, 2023
4e4439e
merge master
d80tb7 Jan 12, 2023
ff3646d
linting
d80tb7 Jan 12, 2023
0bbe15e
Merge branch 'master' of github.com:G-Research/armada into f/chrisma/…
d80tb7 Jan 12, 2023
c318bbb
wip
d80tb7 Jan 12, 2023
7e488b9
fix tests
d80tb7 Jan 12, 2023
a3fc41c
fix tests
d80tb7 Jan 12, 2023
9e132a4
Merge branch 'master' into f/chrisma/remove-nats
d80tb7 Jan 12, 2023
9682e21
fix tests
d80tb7 Jan 12, 2023
b7d0e61
fix tests
d80tb7 Jan 12, 2023
c651086
job repo test done
d80tb7 Jan 13, 2023
c021447
wip
d80tb7 Jan 13, 2023
d50878d
Merge branch 'master' of github.com:G-Research/armada into f/chrisma/…
d80tb7 Jan 13, 2023
02f9e77
merged master
d80tb7 Jan 13, 2023
b73bc6a
merged master
d80tb7 Jan 13, 2023
4b6be4c
fix changes following merge
d80tb7 Jan 13, 2023
51692ed
Merge branch 'master' of github.com:G-Research/armada into f/chrisma/…
d80tb7 Jan 13, 2023
5d6f2d4
restore package
d80tb7 Jan 13, 2023
995d12f
fixed proto package names
d80tb7 Jan 13, 2023
1cf213c
linting
d80tb7 Jan 13, 2023
9539225
linting
d80tb7 Jan 13, 2023
74fcd34
fix null pointer in test
d80tb7 Jan 13, 2023
b95652c
linting
d80tb7 Jan 13, 2023
cd2aee8
linting
d80tb7 Jan 13, 2023
6cc1c69
doc
d80tb7 Jan 13, 2023
1d581e6
merge from other scheduler branch
d80tb7 Jan 13, 2023
333fa63
unit tests
d80tb7 Jan 14, 2023
719da65
moved mock generation into its owen package
d80tb7 Jan 14, 2023
253d70c
Merge branch 'f/chrisma/scheduler-interface-implementations' of githu…
d80tb7 Jan 14, 2023
6d0c109
moved mock generation into its owen package
d80tb7 Jan 14, 2023
4090dc6
wip
d80tb7 Jan 16, 2023
66b44b8
go lint
d80tb7 Jan 16, 2023
665a5db
merge master
d80tb7 Jan 16, 2023
c93625a
linting
d80tb7 Jan 16, 2023
26f48b5
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 16, 2023
a372a8b
merged master
d80tb7 Jan 16, 2023
c6906ea
fixed package names
d80tb7 Jan 16, 2023
59e7431
Merge branch 'f/chrisma/scheduler-interface-implementations-v2' of gi…
d80tb7 Jan 16, 2023
3668a80
wip
d80tb7 Jan 16, 2023
1ba5174
linting
d80tb7 Jan 16, 2023
a9d6e0d
linting
d80tb7 Jan 16, 2023
6e4556c
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 17, 2023
1937bda
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 17, 2023
8ec0da4
Merge branch 'f/chrisma/scheduler-interface-implementations-v2' of gi…
d80tb7 Jan 17, 2023
ae1e642
linting
d80tb7 Jan 17, 2023
d2b1073
move master check into a separate function
d80tb7 Jan 17, 2023
ae8cff9
Merge branch 'f/chrisma/scheduler-interface-implementations' of githu…
d80tb7 Jan 17, 2023
44b6766
move master check into a separate function
d80tb7 Jan 17, 2023
d2ca260
don't modify restapi
d80tb7 Jan 17, 2023
d7a4938
doc
d80tb7 Jan 17, 2023
34c88a5
Merge branch 'f/chrisma/scheduler-interface-implementations-v2' of gi…
d80tb7 Jan 17, 2023
ff10041
Update internal/armada/configuration/types.go
d80tb7 Jan 17, 2023
45f7eeb
Update internal/scheduler/database/job_repository.go
d80tb7 Jan 17, 2023
ed76145
Update internal/scheduler/reports.go
d80tb7 Jan 17, 2023
097259e
wip
d80tb7 Jan 17, 2023
d293536
compilation fixes
d80tb7 Jan 17, 2023
2c33100
Merge branch 'f/chrisma/scheduler-interface-implementations-v2' of gi…
d80tb7 Jan 17, 2023
6d6012b
updated proto
d80tb7 Jan 17, 2023
5c6c8d6
add job ids
d80tb7 Jan 17, 2023
d1fea11
wip
d80tb7 Jan 17, 2023
44b2652
tests for job repository
d80tb7 Jan 18, 2023
1792a70
tests for api
d80tb7 Jan 18, 2023
987b615
linting
d80tb7 Jan 18, 2023
39ac23d
add grpc mock
d80tb7 Jan 18, 2023
827ea8a
fix tests
d80tb7 Jan 18, 2023
3800e6f
fix tests
d80tb7 Jan 18, 2023
411fa53
fix tests
d80tb7 Jan 18, 2023
64c730e
formatting
d80tb7 Jan 19, 2023
df3aa44
formatting
d80tb7 Jan 19, 2023
fab2fa0
doc
d80tb7 Jan 19, 2023
fbd01de
more doc
d80tb7 Jan 19, 2023
aeb6abc
wip
d80tb7 Jan 19, 2023
f50a4a4
remove active_job_ids from streaming lease call
d80tb7 Jan 19, 2023
3fdbe19
wip
d80tb7 Jan 19, 2023
3c33806
nodes should be pointer not struct
d80tb7 Jan 19, 2023
03e9a50
Merge branch 'f/chrisma/scheduler-api' of github.com:armadaproject/ar…
d80tb7 Jan 19, 2023
042f88a
wip
d80tb7 Jan 19, 2023
c7025c2
added job run lookup
d80tb7 Jan 19, 2023
bcdb260
Merge branch 'f/chrisma/jobdb-job-runs' of github.com:armadaproject/a…
d80tb7 Jan 19, 2023
fe0fe33
wip
d80tb7 Jan 19, 2023
3307615
linting
d80tb7 Jan 19, 2023
c6906b3
linting
d80tb7 Jan 19, 2023
3004166
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 19, 2023
0cf2f7d
linting
d80tb7 Jan 19, 2023
564ccca
fix tests
d80tb7 Jan 20, 2023
da54052
fix tests
d80tb7 Jan 20, 2023
5ff1526
Merge branch 'master' into f/chrisma/scheduler-api
d80tb7 Jan 20, 2023
4174250
merge f/chrisma/scheduler-api
d80tb7 Jan 20, 2023
3e77bd0
executor tests
d80tb7 Jan 20, 2023
e52a3da
linting
d80tb7 Jan 20, 2023
76694f4
fix tests
d80tb7 Jan 20, 2023
8df5c4b
linting
d80tb7 Jan 20, 2023
c82fb9e
doc
d80tb7 Jan 20, 2023
bf9ef14
fix tests
d80tb7 Jan 20, 2023
49b69d0
wip
d80tb7 Jan 20, 2023
10b4594
Merge branch 'f/chrisma/executor-repository' of github.com:armadaproj…
d80tb7 Jan 20, 2023
674d51e
wip
d80tb7 Jan 20, 2023
1c117dd
wip
d80tb7 Jan 20, 2023
c374539
wip
d80tb7 Jan 20, 2023
b291ebb
linting
d80tb7 Jan 20, 2023
c634ddd
import order
d80tb7 Jan 20, 2023
aab3ace
custom pulsar marshallers
d80tb7 Jan 21, 2023
00525a8
merged master
d80tb7 Jan 21, 2023
0915d74
config
d80tb7 Jan 21, 2023
e4a2260
more changes
d80tb7 Jan 21, 2023
8190d74
commands
d80tb7 Jan 21, 2023
0e146d2
linting
d80tb7 Jan 22, 2023
5dacdc7
added tests for hooks
d80tb7 Jan 22, 2023
949283b
lots of compilation fixes
d80tb7 Jan 22, 2023
12ac77a
go mod tidy
d80tb7 Jan 22, 2023
189beb7
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 22, 2023
743df4b
fix failing test
d80tb7 Jan 22, 2023
ad1b6dd
test for queue_repository
d80tb7 Jan 23, 2023
4953394
Merge branch 'master' into f/chrisma/queue-repository
d80tb7 Jan 23, 2023
8e5fd85
Merge branch 'f/chrisma/queue-repository' of github.com:armadaproject…
d80tb7 Jan 23, 2023
bba2abc
merge master
d80tb7 Jan 23, 2023
ae9272e
remove uneeded file
d80tb7 Jan 23, 2023
04cd57c
linting
d80tb7 Jan 23, 2023
54a83d6
flush db always
d80tb7 Jan 23, 2023
1aeb442
flush db always
d80tb7 Jan 23, 2023
02031b6
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 23, 2023
c508028
review comments
d80tb7 Jan 23, 2023
868f0a6
Merge branch 'master' of github.com:armadaproject/armada into f/chris…
d80tb7 Jan 24, 2023
dbab0b6
linting
d80tb7 Jan 24, 2023
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
24 changes: 24 additions & 0 deletions cmd/scheduler/cmd/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package cmd

import (
"github.com/spf13/cobra"

"github.com/armadaproject/armada/internal/scheduler"
)

func runCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "run",
Short: "Runs the scheduler",
RunE: runScheduler,
}
return cmd
}

func runScheduler(_ *cobra.Command, _ []string) error {
config, err := loadConfig()
if err != nil {
return err
}
return scheduler.Run(config)
}
43 changes: 43 additions & 0 deletions cmd/scheduler/cmd/migrate_database.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package cmd

import (
"context"
"time"

"github.com/pkg/errors"

log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"

"github.com/armadaproject/armada/internal/common/database"
schedulerdb "github.com/armadaproject/armada/internal/scheduler/database"
)

func migrateDbCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "migrateDatabase",
Short: "migrates the scheduler database to the latest version",
RunE: migrateDatabase,
}
return cmd
}

func migrateDatabase(_ *cobra.Command, _ []string) error {
config, err := loadConfig()
if err != nil {
return err
}
start := time.Now()
log.Info("Beginning scheduler database migration")
db, err := database.OpenPgxConn(config.Postgres)
if err != nil {
return errors.Wrapf(err, "Failed to connect to database")
}
err = schedulerdb.Migrate(context.Background(), db)
d80tb7 marked this conversation as resolved.
Show resolved Hide resolved
if err != nil {
return errors.Wrapf(err, "Failed to migrate scheduler database")
d80tb7 marked this conversation as resolved.
Show resolved Hide resolved
}
taken := time.Now().Sub(start)
Copy link
Contributor

Choose a reason for hiding this comment

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

Use time.Since instead.

log.Infof("Scheduler database migrated in %s", taken)
return nil
}
48 changes: 48 additions & 0 deletions cmd/scheduler/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package cmd

import (
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/armadaproject/armada/internal/common"
commonconfig "github.com/armadaproject/armada/internal/common/config"
"github.com/armadaproject/armada/internal/scheduler"
)

const (
CustomConfigLocation string = "config"
)

func RootCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "scheduler",
SilenceUsage: true,
Short: "The main armada scheduler",
}

cmd.PersistentFlags().StringSlice(
"armadaUrl",
[]string{},
"Fully qualified path to application configuration file (for multiple config files repeat this arg or separate paths with commas)")

cmd.AddCommand(
runCmd(),
migrateDbCmd(),
)

return cmd
}

func loadConfig() (scheduler.Configuration, error) {
var config scheduler.Configuration
userSpecifiedConfigs := viper.GetStringSlice(CustomConfigLocation)

common.LoadConfig(&config, "./config/scheduler", userSpecifiedConfigs)

// TODO: once we're happy with this we can move it to common app startup
err := commonconfig.Validate(config)
if err != nil {
commonconfig.LogValidationErrors(err)
}
return config, err
}
12 changes: 10 additions & 2 deletions cmd/scheduler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/spf13/viper"

"github.com/armadaproject/armada/internal/common"
commonconfig "github.com/armadaproject/armada/internal/common/config"
"github.com/armadaproject/armada/internal/common/database"
"github.com/armadaproject/armada/internal/scheduler"
schedulerdb "github.com/armadaproject/armada/internal/scheduler/database"
Expand Down Expand Up @@ -40,11 +41,18 @@ func main() {

common.LoadConfig(&config, "./config/scheduler", userSpecifiedConfigs)

// TODO: once we're happy wirth this we can move it to common app startup
err := commonconfig.Validate(config)
if err != nil {
commonconfig.LogValidationErrors(err)
os.Exit(1)
}

if viper.GetBool(MigrateDatabase) {
migrateDatabase(&config)
} else {
if err := scheduler.Run(&config); err != nil {
log.Errorf("failed to run scheduler: %s", err)
if err := scheduler.Run(config); err != nil {
log.WithError(err).Errorf("Scheduler failed")
os.Exit(1)
}
}
Expand Down
103 changes: 86 additions & 17 deletions config/scheduler/config.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,94 @@
cyclePeriod: 10s
executorTimeout: 1h
d80tb7 marked this conversation as resolved.
Show resolved Hide resolved
databaseFetchSize: 1000
pulsarSendTimeout: 5s
pulsar:
URL: "pulsar://pulsar:6650"
jobsetEventsTopic: "events"
maxConnectionsPerBroker: 1
compressionType: zlib
compressionLevel: faster
postgres:
maxOpenConns: 20
maxIdleConns: 5
connMaxLifetime: 30m
connection:
host: localhost
host: postgres
port: 5432
user: postgres
password: psw
dbname: postgres
sslmode: disable

metrics:
port: 9003

pulsar:
URL: "pulsar://localhost:6650"
jobsetEventsTopic: "events"
receiveTimeout: 5s
backoffTime: 1s

subscriptionName: "scheduler"
batchSize: 10000
batchDuration: 500ms
leader:
mode: standalone
grpc:
#port: 50052
keepaliveParams:
maxConnectionIdle: 5m
time: 120s
timeout: 20s
keepaliveEnforcementPolicy:
minTime: 10s
permitWithoutStream: true
scheduling:
preemption:
enabled: true
priorityClasses:
armada-default:
priority: 1000
maximalResourceFractionPerQueue:
memory: 0.99
cpu: 0.99
armada-preemptible:
priority: 900
maximalResourceFractionPerQueue:
memory: 0.99
cpu: 0.99
defaultPriorityClass: armada-default
queueLeaseBatchSize: 1000
minimumResourceToSchedule:
memory: 1000000 # 1Mb
cpu: 0.1
maximalResourceFractionToSchedulePerQueue:
memory: 1.0
cpu: 1.0
maximalResourceFractionPerQueue:
memory: 1.0
cpu: 1.0
maximalClusterFractionToSchedule:
memory: 1.0
cpu: 1.0
maximumJobsToSchedule: 5000
maxQueueReportsToStore: 1000
MaxJobReportsToStore: 10000
defaultJobLimits:
cpu: 1
memory: 1Gi
ephemeral-storage: 8Gi
defaultJobTolerations:
- key: "armadaproject.io/armada"
operator: "Equal"
value: "true"
effect: "NoSchedule"
defaultJobTolerationsByPriorityClass:
"":
- key: "armadaproject.io/pc-armada-default"
operator: "Equal"
value: "true"
effect: "NoSchedule"
armada-default:
- key: "armadaproject.io/pc-armada-default"
operator: "Equal"
value: "true"
effect: "NoSchedule"
armada-preemptible:
- key: "armadaproject.io/pc-armada-preemptible"
operator: "Equal"
value: "true"
effect: "NoSchedule"
maxRetries: 5
resourceScarcity:
cpu: 1.0
indexedResources:
- cpu
- memory
gangIdAnnotation: armadaproject.io/gangId
gangCardinalityAnnotation: armadaproject.io/gangCardinality

20 changes: 0 additions & 20 deletions e2e/pulsartest_client/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,6 @@ func TestNew(t *testing.T) {
assert.Error(t, err)
assert.Nil(t, app)

// Invalid compression type
pc = cfg.PulsarConfig{
URL: "pulsar://localhost:6650",
CompressionType: "nocompression",
JobsetEventsTopic: "events",
}
app, err = pt.New(pt.Params{Pulsar: pc}, "submit")
assert.Error(t, err)
assert.Nil(t, app)

// Invalid compression level
pc = cfg.PulsarConfig{
URL: "pulsar://localhost:6650",
CompressionLevel: "veryCompressed",
JobsetEventsTopic: "events",
}
app, err = pt.New(pt.Params{Pulsar: pc}, "submit")
assert.Error(t, err)
assert.Nil(t, app)

// Invalid command type
pc = cfg.PulsarConfig{
URL: "pulsar://localhost:6650",
Expand Down
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ require (
github.com/go-openapi/strfmt v0.21.3
github.com/go-openapi/swag v0.22.3
github.com/go-openapi/validate v0.21.0
github.com/go-playground/validator/v10 v10.11.1
github.com/golang/mock v1.6.0
github.com/goreleaser/goreleaser v1.11.5
github.com/jessevdk/go-flags v1.5.0
Expand Down Expand Up @@ -199,6 +200,8 @@ require (
github.com/go-logr/logr v0.4.0 // indirect
github.com/go-openapi/inflect v0.19.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
Expand Down Expand Up @@ -256,6 +259,7 @@ require (
github.com/klauspost/pgzip v1.2.5 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/linkedin/goavro/v2 v2.9.8 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand Down
11 changes: 11 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -487,11 +487,18 @@ github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/
github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14=
github.com/go-openapi/validate v0.21.0 h1:+Wqk39yKOhfpLqNLEC0/eViCkzM5FVXVqrvt526+wcI=
github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ=
github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg=
github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
Expand Down Expand Up @@ -918,6 +925,8 @@ github.com/kyleconroy/sqlc v1.16.0/go.mod h1:m+cX/UyBRnKP58lFfUsq+0gw87UUw9Amxwq
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
Expand Down Expand Up @@ -1141,6 +1150,7 @@ github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
Expand Down Expand Up @@ -1368,6 +1378,7 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211115234514-b4de73f9ece8/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c=
Expand Down
7 changes: 4 additions & 3 deletions internal/armada/configuration/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package configuration
import (
"time"

"github.com/apache/pulsar-client-go/pulsar"
"github.com/go-redis/redis"
v1 "k8s.io/api/core/v1"

Expand Down Expand Up @@ -38,7 +39,7 @@ type ArmadaConfig struct {

type PulsarConfig struct {
// Pulsar URL
URL string
URL string `validate:"required"`
// Path to the trusted TLS certificate file (must exist)
TLSTrustCertsFilePath string
// Whether Pulsar client accept untrusted TLS certificate from broker
Expand All @@ -56,9 +57,9 @@ type PulsarConfig struct {
JobsetEventsTopic string
RedisFromPulsarSubscription string
// Compression to use. Valid values are "None", "LZ4", "Zlib", "Zstd". Default is "None"
CompressionType string
CompressionType pulsar.CompressionType
// Compression Level to use. Valid values are "Default", "Better", "Faster". Default is "Default"
CompressionLevel string
CompressionLevel pulsar.CompressionLevel
// Used to construct an executorconfig.IngressConfiguration,
// which is used when converting Armada-specific IngressConfig and ServiceConfig objects into k8s objects.
HostnameSuffix string
Expand Down
Loading