https://flyte.org logo
#ask-the-community
Title
# ask-the-community
c

Carlos Cervantes

10/27/2022, 12:46 AM
Hi! I'm having trouble understanding what's supposed to happen with k8s pod specs in Flyte. I have a default-node-selector set like so:
Copy code
configmap:
...
  k8s:
    plugins:
      k8s:
...
        default-node-selector:
          algorithm-node: "true"
          "<http://cloud.google.com/gke-smt-disabled|cloud.google.com/gke-smt-disabled>": "false"
but in my pod task, I add a V1PodSpec with a different node-selector
Copy code
@task(task_config=Pod(pod_spec=V1PodSpec(
        node_selector={
            "large-ssd-node": "true",
            "<http://cloud.google.com/gke-large-ssd|cloud.google.com/gke-large-ssd>": "true",
        },
...)
def mytask():
However, when I look at the yaml that ultimately gets generated, it seems to be a merge of the two different node-selectors
Copy code
nodeSelector:
    algorithm-node: "true"
    <http://cloud.google.com/gke-large-ssd|cloud.google.com/gke-large-ssd>: "true"
    <http://cloud.google.com/gke-smt-disabled|cloud.google.com/gke-smt-disabled>: "false"
    large-ssd-node: "true"
Is this expected behavior? If so, is there a way to replace the default-node-selector, so I only end up with
Copy code
nodeSelector:
    <http://cloud.google.com/gke-large-ssd|cloud.google.com/gke-large-ssd>: "true"
    large-ssd-node: "true"
y

Yee

10/27/2022, 7:42 PM
we are looking into this.
@Carlos Cervantes would all the tasks that fall into this category happen to be in its own namespace?
@Carlos Cervantes can you make an issue for this?
there’s a way around this that will require a code change - but don’t want to commit to doing it just yet.
c

Carlos Cervantes

10/27/2022, 10:56 PM
Thanks, @Yee. Yeah, all tasks were in the same namespace. I'll create an issue now.
77 Views