Support resolving other meta data variables inside the meta stanza
Open
theme/hcl
theme/jobspec
type/enhancement
- Dominant language
- Go
- Stars
- 17k
- Forks
- 2.1k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 105
Description
Hi all,
I've noticed that interpolation feature seems not working correctly on [meta stanza] but on application parameter: following job file example is very similar what normally is done for software parameters configuration.
As suggestion perhaps could help to activate variables resolution also in meta stanza.
If filing a bug please include the following:
### Nomad version
until 0.8.3
### Operating system and Environment details
tested on linux darwin
### Nomad Server logs
There are not particular logs
### Nomad Client logs
There are not particular logs
### Job file
job "MY_JOB" {
datacenters = ["dc1"]
type = "batch"
id = "MY_JOB"
name = "MY_JOB"
meta {
RELEASE_VERSION = "2018.1.1.0"
MY_HOME = "/opt/mysoftware-${NOMAD_META_RELEASE_VERSION}"
MY_BIN = "${NOMAD_META_MY_HOME}/bin"
MY_CFG = "${NOMAD_META_MY_HOME}/cfg"
MY_EXECUTABLE = "${NOMAD_META_MY_BIN}/myExecutable" // could be an option
MY_CFG_FILE = "${NOMAD_META_MY_CFG}/mySoftware.conf" // could be an option
}
group "MyGroup" {
task "MyTask" {
driver = "raw_exec"
config = {
command = "${NOMAD_META_MY_BIN}/myExecutable"
args = [
"--notWorks", "${NOMAD_META_MY_CFG_FILE}",
"--thisWorks", "/opt/mysoftware-${NOMAD_META_RELEASE_VERSION}/cfg/mySoftware.conf"
]
}
}
}
}
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.