Jasmine Dahilig
c346a47b5b
add default update stanza and max_parallel=0 disables deployments ( #6191 )
2019-09-02 10:30:09 -07:00
Jasmine Dahilig
692cd9c19e
job region defaults to client node region if 'global' or none provided ( #6064 )
2019-08-05 14:28:02 -07:00
Lang Martin
eb7d87e1d9
jobs update stanza canonicalize and default AutoPromote
2019-07-18 13:36:40 -04:00
Lang Martin
c086b5f483
api use job.update as the default for taskgroup.update
2019-05-22 12:34:57 -04:00
Lang Martin
03c69c88dd
api/jobs add AutoPromote to Canonicalize
2019-05-22 12:32:08 -04:00
Lang Martin
9621c073fe
add update AutoPromote bool
2019-05-22 12:32:08 -04:00
Preetha Appan
af2ed66749
Add flag similar to --all for allocs to be able to filter deployments by latest
2019-05-13 18:33:41 -05:00
Michael Schurter
3b19c22f27
Update api/jobs.go
...
Co-Authored-By: cgbaker <cgbaker@hashicorp.com >
2019-04-10 10:34:10 -05:00
Chris Baker
af0d0f919f
cli: plumbed vault token from job revert command through API call
2019-04-10 10:34:10 -05:00
Alex Dadgar
bc42873e07
Change types of weights on spread/affinity
2019-01-30 12:20:38 -08:00
Michael Lange
885d309b8f
Add Datacenters to the JobsListStub struct
...
So it can be used for filtering the full list of jobs
2019-01-22 11:16:35 -08:00
Mahmood Ali
5e185386e0
api: avoid codegen for syncing
...
Given that the values will rarely change, specially considering that any
changes would be backward incompatible change. As such, it's simpler to
keep syncing manually in the rare occasion and avoid the syncing code
overhead.
2019-01-18 18:52:31 -05:00
Mahmood Ali
41c3250ee5
api: embed pointer conversion functions
...
Embed pointer conversion functions in the API package to avoid
unnecessary package dependency. `helper` package imports more
dependencies relevant for internal use (e.g. `hcl`).
2019-01-18 15:31:04 -05:00
Mahmood Ali
361d1e177c
api: avoid import nomad/structs pkg
...
nomad/structs is an internal package and imports many libraries (e.g.
raft, codec) that are not relevant to api clients, and may cause
unnecessary dependency pain (e.g. `github.com/ugorji/go/codec`
version is very old now).
Here, we add a code generator that imports the relevant constants from
`nomad/structs`.
I considered using this approach for other structs, but didn't find a
quick viable way to reduce duplication. `nomad/structs` use values as
struct fields (e.g. `string`), while `api` uses value pointer (e.g.
`*string`) instead. Also, sometimes, `api` structs contain deprecated
fields or additional documentation, so simple copy-paste doesn't work.
For these reasons, I opt to keep the status quo.
2019-01-18 14:51:19 -05:00
Preetha Appan
7cdaf6e37d
Make spread weight a pointer with default value if unset
2019-01-11 10:31:21 -06:00
Preetha Appan
35d31f8be6
more minor review feedback
2018-11-01 17:05:17 -05:00
Preetha Appan
bf7192c58d
Add number of evictions to DesiredUpdates struct to use in CLI/API
2018-10-30 11:06:32 -05:00
Preetha Appan
5f27e0010d
structs and API changes to plan and alloc structs needed for preemption
2018-10-30 11:06:32 -05:00
Preetha Appan
ed4ed16b5d
Parsing and API layer for spread stanza
2018-09-04 16:10:11 -05:00
Preetha Appan
8f2d5742c4
Affinity parsing, api and structs
2018-09-04 16:10:11 -05:00
Nick Ethier
8e453d0b8f
nomad: add 'Dispatch' field to Job
...
New -bash: Dispatch: command not found field is used to denote if the Job is a child dispatched job of
a parameterized job.
2018-06-11 11:59:03 -04:00
Preetha Appan
2ea09b82a0
Fix docs and method documentation in API
2018-05-21 17:20:59 -05:00
Preetha Appan
ae5d8fd593
Add new method EvaluateWithOptions to avoid breaking go API client
2018-05-11 14:18:53 -05:00
Preetha Appan
1bad719612
Added CLI for evaluating job given ID, and modified client API for evaluate to take a request payload
2018-05-09 15:04:27 -05:00
Alex Dadgar
c240e021cc
change default to 10m and docs
2018-05-07 14:50:01 -05:00
Alex Dadgar
15c3abf816
Initial implementation
2018-05-07 14:50:01 -05:00
Alex Dadgar
15623e52cd
Fix command line
2018-04-26 15:46:22 -07:00
Nick Ethier
059ea949be
minor code review fixes to api/jobs
2018-04-17 10:18:36 -04:00
Nick Ethier
4952c52d49
api: add test for canonicalized jobs/parse
2018-04-16 19:21:09 -04:00
Nick Ethier
14c44da757
command/agent: add Canonicalize option to parse args
2018-04-16 19:21:09 -04:00
Nick Ethier
b2b999249b
command/agent: add /v1/jobs/parse endpoint
...
The parse endpoint accepts a hcl jobspec body within a json object
and returns the parsed json object for the job. This allows users to
register jobs with the nomad json api without specifically needing
a nomad binary to parse their hcl encoded jobspec file.
2018-04-16 19:21:06 -04:00
Alex Dadgar
7f989499ff
Correct defaulting
2018-03-21 16:51:44 -07:00
Preetha Appan
5e038e4106
Show reschedule policy in addition to when the eval will get rescheduled
2018-03-20 13:34:29 -05:00
Preetha Appan
eab9d2da92
Add reschedule policy to API, and HCL parsing support.
2018-01-31 09:56:53 -06:00
Michael Schurter
04b8f8e7fc
Remove structs import from api
...
Goes a step further and removes structs import from api's tests as well
by moving GenerateUUID to its own package.
2017-09-29 10:36:08 -07:00
Alex Dadgar
ddc2efa4ac
sync
2017-09-19 10:08:23 -05:00
Alex Dadgar
ac1539d5d9
Sync namespace changes
2017-09-07 17:04:21 -07:00
Armon Dadgar
e24fa79aab
agent: thread ACLs for Job Register
2017-09-04 13:05:53 -07:00
Alex Dadgar
6723bade37
Don't merge empty update from job into task groups
...
This PR fixes an issue in which we would merge an update stanza from the
job into the task groups even if it was empty. This broke round
tripping a job (reading from the api and resubmitting as JSON)
Fixes https://github.com/hashicorp/nomad/issues/3132
2017-08-30 11:35:19 -07:00
Clint Armstrong
8486bf2ff6
Set MaxParallel default to 1
2017-08-25 07:56:40 -04:00
Luke Farnell
7a56971508
fixed all spelling mistakes for goreport
2017-08-07 17:13:05 -04:00
Alex Dadgar
f0a090c6e8
Disallow update stanza on batch jobs
...
This PR:
* disallows update stanzas on batch jobs
* undeprecates the stagger field
* changes the way warnings are returned
2017-07-07 12:11:39 -07:00
Alex Dadgar
aaf5ab0a21
Job stability
2017-07-07 12:10:04 -07:00
Alex Dadgar
fbd2b73904
job revert
2017-07-07 12:07:07 -07:00
Alex Dadgar
3935656d14
Show submit time
2017-07-07 12:07:07 -07:00
Alex Dadgar
9220836cb4
JobVersions returns struct with optional diff
2017-07-07 12:05:57 -07:00
Alex Dadgar
d0a8332140
job deployment endpoint + api
2017-07-07 12:05:56 -07:00
Alex Dadgar
89d86bc4bd
Deployments HTTP docs
2017-07-07 12:03:11 -07:00
Alex Dadgar
662bc3941b
handle annotations
2017-07-07 12:03:11 -07:00
Alex Dadgar
715c6bcc4a
API defaults use structs default
2017-05-10 13:51:52 -07:00