FEATURES:
- scheduler: Enable deployments for system jobs [GH-26708]
- secrets: Adds secret block for fetching and interpolating secrets in job spec [GH-26681]
BREAKING CHANGES:
| # There can only be a single job definition per file. This job is named | |
| # "example" so it will create a job with the ID and Name "example". | |
| # The "job" block is the top-most configuration option in the job | |
| # specification. A job is a declarative specification of tasks that Nomad | |
| # should run. Jobs have a globally unique name, one or many task groups, which | |
| # are themselves collections of one or many tasks. | |
| # | |
| # For more information and examples on the "job" block, please see | |
| # the online documentation at: |
| package main | |
| import ( | |
| "bufio" | |
| "bytes" | |
| "fmt" | |
| "log" | |
| "net" | |
| "strings" | |
| "time" |
| // TestRead_Interrupted asserts that blocked reads without a deadline are | |
| // interrupted when a session is closed. | |
| func TestRead_Interrupted(t *testing.T) { | |
| client, server := testClientServer() | |
| defer client.Close() | |
| defer server.Close() | |
| stream, err := client.Open() | |
| if err != nil { | |
| t.Fatalf("unexpected error opening a new stream: %v", err) |
| enable_debug = true | |
| log_level = "DEBUG" | |
| data_dir = "/tmp/nomad-devagent" | |
| client { | |
| enabled = true | |
| } | |
| server { |
| job "nginx-proxy" { | |
| group "nginx" { | |
| network { | |
| port "http" { | |
| static = 8080 | |
| to = 8080 | |
| } | |
| } |
RS256 only:
| job "example" { | |
| type = "batch" | |
| task t { | |
| driver = "exec" | |
| config { | |
| command = "/bin/sh" | |
| args = ["-c", "echo '>> /proc'; grep ^Cap /proc/self/status; echo '>> getpcaps'; getpcaps 0; echo '>> prlimit'; prlimit"] | |
| } | |
| } | |
| } |
| variable "vault_version" { | |
| type = string | |
| default = "1.14.0" | |
| } | |
| job "vault" { | |
| datacenters = ["*"] | |
| type = "service" | |
| group "vault" { | |
| count = 1 |
| enable_debug = true | |
| log_level = "debug" | |
| name = "mixed1" | |
| data_dir = "/tmp/nomad-mixed1" | |
| client { | |
| enabled = true | |
| servers = ["127.0.0.1:4647"] | |
| } |