open-nomad/website/content/api-docs
Seth Hoenig ba728f8f97
api: enable support for setting original job source (#16763)
* api: enable support for setting original source alongside job

This PR adds support for setting job source material along with
the registration of a job.

This includes a new HTTP endpoint and a new RPC endpoint for
making queries for the original source of a job. The
HTTP endpoint is /v1/job/<id>/submission?version=<version> and
the RPC method is Job.GetJobSubmission.

The job source (if submitted, and doing so is always optional), is
stored in the job_submission memdb table, separately from the
actual job. This way we do not incur overhead of reading the large
string field throughout normal job operations.

The server config now includes job_max_source_size for configuring
the maximum size the job source may be, before the server simply
drops the source material. This should help prevent Bad Things from
happening when huge jobs are submitted. If the value is set to 0,
all job source material will be dropped.

* api: avoid writing var content to disk for parsing

* api: move submission validation into RPC layer

* api: return an error if updating a job submission without namespace or job id

* api: be exact about the job index we associate a submission with (modify)

* api: reword api docs scheduling

* api: prune all but the last 6 job submissions

* api: protect against nil job submission in job validation

* api: set max job source size in test server

* api: fixups from pr
2023-04-11 08:45:08 -05:00
..
acl acl: JWT changelog entry and typo fix 2023-03-30 09:40:11 +02:00
operator renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
agent.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
allocations.mdx docs: fix alloc stop no_shutdown_delay (#16282) 2023-03-03 14:44:49 -05:00
client.mdx Workload Identity, Task API, and Dynamic Node Metadata Docs (#16102) 2023-02-09 16:03:43 -08:00
deployments.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
evaluations.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
events.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
index.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
jobs.mdx api: enable support for setting original job source (#16763) 2023-04-11 08:45:08 -05:00
json-jobs.mdx Add option to expose workload token to task (#15755) 2023-02-02 10:59:14 -08:00
libraries-and-sdks.mdx docs: remove Java and Scala SDKs from supported list. (#16555) 2023-03-20 15:35:02 +01:00
metrics.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
namespaces.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
nodes.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
plugins.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
quotas.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
recommendations.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
regions.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
scaling-policies.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
search.mdx renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
sentinel-policies.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
services.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
status.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
system.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
task-api.mdx docs: fix typos in task-api.mdx and workload-identity.mdx (#16309) 2023-03-03 08:37:59 -05:00
ui.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00
validate.mdx Change job init default to example.nomad.hcl and recommend in docs (#15997) 2023-02-02 11:47:47 -06:00
variables.mdx docs: slight tidy up of var create example payload (#16212) 2023-02-17 13:12:39 -06:00
volumes.mdx docs: Migrate link formats (#15779) 2023-01-25 09:31:14 -08:00