Hi,
I’m using drone/cli from [Docker Hub](https://hub.docker.com/r/drone/cli)
to compile my jsonnet configuration to produce drone-config.yaml. And I can’t find a way how to compile node_selector part to output yaml configuration. Here’s a snippet:
build(NAME, TYPE, ENVS): {
kind: ‘pipeline’,
type: ‘kubernetes’,
name: NAME,
clone: {
depth: 1,
},
trigger: {
event: [‘push’],
},
node_selector: {
Type: ‘spot-8’,
},
steps: [
build_steps.step_restore(),
build_steps.step_deps(),
build_steps.step_build(NAME, ENVS),
build_steps.step_image_ecr(NAME, TYPE),
],
},
For better readability, here’s a picture:
Unfortunately, the “node_selector” part doesn’t propagate to the outputted YAML.
Although the YAML is normally generated out of jsonnet source I managed to hard-code the “node_selector” part, commit and run this pipeline and it works, so I don’t think the syntax is the problem.
When I use other jsonnet compiler, it works. In my experience, I already know, that drone jsonnet compiler ommits some parts if it considers useless ( happened to me with triggers). But I don’t see a reason here, why would it ommit this “node_selector” part.
Thanks for the answer. I’m desperate with this one