At the moment, only node affinity is supported via Juju constraint tags.
juju deploy myapp --constraints "tags=foo=bar|bar2,^baz=bar"
would create a pod with node affinity (hopefully no typos)
- key: foo
- key: baz
An initial thought is that we could look to extend the syntax to account for “node” and “pod” affinity
juju deploy myapp --constraints "tags=node.foo=bar,pod.baz=bar2"
(default would be “node”).
We’d need to think it through to be comfortable with the syntax etc; there’s limited options available whilst preserving compatibility with what can be supported.