You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an enterprise deployment that multi-tenants, we need to deploy our jobs into separate environments, such as UAT01, SIT04, DEV02, etc. The same jobspec can be targeted to any of those environments. Environments are implemented as namespaces. Nomad namespace in which the job runs and because its the same job name, it has its own consul namespace in which it registers, so a 'customer' service is not uniquely named across the platform but is unique in its namespace context.
All is fine with the CLI, we specify -namespace and -consul-namespace and job deploys and runs as expected.
We've decided that we can manage what runs in the namespaces by using terraform to perform deployments and manage state. This is essential to the way we want to deal with runtimes and the aggregation of jobs into applications into fully functional environments.
The nomad_job resource is not on parity with the CLI options. First problem is there's no nomad namespace arg. So, this would force us to add a boiler plate 'namespace' variable to every job spec then blend it into the job variables we need to pass in with the HCL2 vars. Then there's the question of specifying the consul namespace too. and I've not mentioned Vault...
We want to move to using Nomad Pack for template rendering. From the nomad-pack CLI, its similarly possible to specify the vault, consul and nomad namespaces. With no terraform support for nomad-pack we could use the nomad-pack render capability and take the HCL to feed into the nomad_job jobspec BUT.... we're back to the issue of not supporting namespaces and so all the generic packs are likely not to work or need butchering to add boilerplate namespace rendering, etc
So, the request here is for CLI parity and nomad_job resource to support namespace - For full parity this would be arguments of consul, nomad and vault namespace
The text was updated successfully, but these errors were encountered:
rt232
changed the title
nomad_job does missing namespace arguments
nomad_job has missing namespace arguments
Jul 27, 2023
Thanks for the suggestion. Unfortunately this is something we tried to implement in the past (#125) but learned that is not possible at this point because of #1, and the same apply to all other fields.
At the time we expected to have a fix for #1, but that turned out to not be feasible.
One alternative I thought of just now would be to have a separate block to override job values at submission, so it would be something like this:
Since they would be stored in a separate state path it would not clash with the computed attributes at the top-level. That block would be fairly limited in terms of which attributes would be supported, but that could be a good compromise for now.
In an enterprise deployment that multi-tenants, we need to deploy our jobs into separate environments, such as UAT01, SIT04, DEV02, etc. The same jobspec can be targeted to any of those environments. Environments are implemented as namespaces. Nomad namespace in which the job runs and because its the same job name, it has its own consul namespace in which it registers, so a 'customer' service is not uniquely named across the platform but is unique in its namespace context.
All is fine with the CLI, we specify -namespace and -consul-namespace and job deploys and runs as expected.
We've decided that we can manage what runs in the namespaces by using terraform to perform deployments and manage state. This is essential to the way we want to deal with runtimes and the aggregation of jobs into applications into fully functional environments.
The nomad_job resource is not on parity with the CLI options. First problem is there's no nomad namespace arg. So, this would force us to add a boiler plate 'namespace' variable to every job spec then blend it into the job variables we need to pass in with the HCL2 vars. Then there's the question of specifying the consul namespace too. and I've not mentioned Vault...
We want to move to using Nomad Pack for template rendering. From the nomad-pack CLI, its similarly possible to specify the vault, consul and nomad namespaces. With no terraform support for nomad-pack we could use the nomad-pack render capability and take the HCL to feed into the nomad_job jobspec BUT.... we're back to the issue of not supporting namespaces and so all the generic packs are likely not to work or need butchering to add boilerplate namespace rendering, etc
So, the request here is for CLI parity and nomad_job resource to support namespace - For full parity this would be arguments of consul, nomad and vault namespace
The text was updated successfully, but these errors were encountered: