Skip to content

Commit

Permalink
chore: if namespace is empty take from default
Browse files Browse the repository at this point in the history
  • Loading branch information
lavkesh committed Oct 24, 2023
1 parent 4d0e906 commit 47a6094
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/job/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ func ReadConfig(r resource.Resource, confJSON json.RawMessage, dc DriverConf) (*
} else if len(cfg.Name) > maxJobNameLength {
return nil, errors.ErrInvalid.WithMsgf("Job name must not have more than %d chars", maxJobNameLength)
}
cfg.Namespace = dc.Namespace
if len(cfg.Namespace) == 0 {
cfg.Namespace = dc.Namespace
}
if cfg.Replicas < 1 {
cfg.Replicas = 1
}
Expand Down

0 comments on commit 47a6094

Please sign in to comment.