By this I mean: Instead of purging a job entirely, you set the count
parameter to a value of 0
so that the job ceases to run.
As far as I have seen/can tell, it has ostensibly the same effect (but there are some caveats [1] to this approach as Nomad doesn’t officially support this method of stopping a job).
My team has found this approach to be useful when launching a new service for the first time and only wanting to deploy it to our development environment (our deployment pipeline is identical for both dev and prod save for the count
value – and a few other env-specific variable values – being derived from an env-specific Levant [2] variable file.
All said… I was just curious if anyone else leverages a “scale-to-zero” approach in their Nomad jobs because if this is actually something that a large-ish group of folks are doing, then perhaps it merits me filing a GitHub Issue feature request for officially supporting “scale-to-zero”.
[1] This simply does not work with multiregion {}
jobs and the workload will be allocated with a default count
value of 1
(regardless of the explicitly defined count
value of 0
).
[2] Yes, I know that its due time I migrate away from Levant.