Skip to content

Commit

Permalink
connect: extract common task keys
Browse files Browse the repository at this point in the history
  • Loading branch information
shoenig committed Apr 10, 2020
1 parent 729931a commit 0eb2844
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions jobspec/parse_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,45 +13,38 @@ import (
)

var (
normalTaskKeys = []string{
"artifact",
commonTaskKeys = []string{
"driver",
"user",
"config",
"env",
"resources",
"meta",
"logs",
"kill_timeout",
"shutdown_delay",
"kill_signal",
}

normalTaskKeys = append(commonTaskKeys,
"artifact",
"constraint",
"affinity",
"dispatch_payload",
"lifecycle",
"driver",
"env",
"kill_timeout",
"leader",
"logs",
"meta",
"resources",
"restart",
"service",
"shutdown_delay",
"template",
"user",
"vault",
"kill_signal",
"kind",
"volume_mount",
"csi_plugin",
}
)

sidecarTaskKeys = []string{
sidecarTaskKeys = append(commonTaskKeys,
"name",
"driver",
"user",
"config",
"env",
"resources",
"meta",
"logs",
"kill_timeout",
"shutdown_delay",
"kill_signal",
}
)
)

func parseTasks(result *[]*api.Task, list *ast.ObjectList) error {
Expand Down

0 comments on commit 0eb2844

Please sign in to comment.