juju uses the constraint tags that are prefixed with "pod." or "anti-pod." or "node." into pod affinity selectors.
your constraints are: --constraints="tags=mldatanode=true,^mlgpunode=true"
The tag keys don't have the required prefixes to be translated into affinity selection expressions.
juju uses the constraint tags that are prefixed with "pod." or "anti-pod." or "node." into pod affinity selectors. "tags=mldatanod e=true, ^mlgpunode= true"
your constraints are: --constraints=
The tag keys don't have the required prefixes to be translated into affinity selection expressions.
A contrived example.
juju deploy somecharm --constraints= "tags=node. foo=a|b| c,^bar= d|e|f,^ foo=g|h, pod.foo= 1|2|3,^ pod.bar= 4|5|6,anti- pod.afoo= x|y|z,^ anti-pod. abar=7| 8|9"
would result in
kubectl get -o json statefulset. apps/somecharm | jq .spec.template. spec.affinity ringSchedulingI gnoredDuringExe cution" : { nodeSelectorTer ms": [
"matchExpres sions": [
"key": "bar",
"operator" : "NotIn",
"values" : [
"d",
"e",
"key": "foo",
"operator" : "NotIn",
"values" : [
"g",
"key": "foo",
"operator" : "In",
"values" : [
"a",
"b", ringSchedulingI gnoredDuringExe cution" : [
"labelSelector ": {
"matchExpres sions": [
"key": "bar",
"operator" : "NotIn",
"values" : [
"4",
"5",
"key": "foo",
"operator" : "In",
"values" : [
"1",
"2",
"topologyKey" : "" ity": { ringSchedulingI gnoredDuringExe cution" : [
"labelSelector ": {
"matchExpres sions": [
"key": "abar",
"operator" : "NotIn",
"values" : [
"7",
"8",
"key": "afoo",
"operator" : "In",
"values" : [
"x",
"y",
"topologyKey" : ""
{
"nodeAffinity": {
"requiredDu
"
{
{
"f"
]
},
{
"h"
]
},
{
"c"
]
}
]
}
]
}
},
"podAffinity": {
"requiredDu
{
{
"6"
]
},
{
"3"
]
}
]
},
}
]
},
"podAntiAffin
"requiredDu
{
{
"9"
]
},
{
"z"
]
}
]
},
}
]
}
}