Files
nomad/e2e/exec2/input/secrets.hcl
Daniel Bennett f3e08d8aa9 e2e: exec2: envoy binary version and tidying (#26558)
* e2e: update standalone envoy binary version

fix for:

> === FAIL: e2e/exec2 TestExec2/testCountdash (21.25s)
>     exec2_test.go:71:
> ...
> [warning][config] [./source/extensions/config_subscription/grpc/grpc_stream.h:155] DeltaAggregatedResources gRPC config stream to local_agent closed: 3, Envoy 1.29.4 is too old and is not supported by Consul

there's also this warning, but it doesn't seem so fatal:

> [warning][main] [source/server/server.cc:910] There is no configured limit to the number of allowed active downstream connections. Configure a limit in `envoy.resource_monitors.downstream_connections` resource monitor.

picked latest supported from latest consul (1.21.4):

```
$ curl -s localhost:8500/v1/agent/self | jq .xDS.SupportedProxies
{
  "envoy": [
    "1.34.1",
    "1.33.2",
    "1.32.5",
    "1.31.8"
  ]
}
```

* e2e: exec2: remove extraneous bits

 * reschedule: no reschedule for batch jobs
 * unveil: nomad paths get auto-unveiled with unveil_defaults
   https://github.com/hashicorp/nomad-driver-exec2/blob/v0.1.0/plugin/driver.go#L514-L522
2025-08-18 14:58:00 -04:00

53 lines
957 B
HCL

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
# This job writes and reads the secrets directory.
job "secrets" {
type = "batch"
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
group "group" {
restart {
attempts = 0
mode = "fail"
}
task "nomad-token" {
driver = "exec2"
identity {
file = true
}
config {
command = "cat"
args = ["${NOMAD_SECRETS_DIR}/nomad_token"]
}
resources {
cpu = 100
memory = 64
}
}
task "password" {
driver = "exec2"
lifecycle {
hook = "prestart"
sidecar = false
}
config {
command = "bash"
args = ["-c", "echo abc123 > ${NOMAD_SECRETS_DIR}/password.txt && cat ${NOMAD_SECRETS_DIR}/password.txt"]
}
resources {
cpu = 100
memory = 64
}
}
}
}