Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use node labels to schedule vttablet pods. #604

Open
bluecrabs007 opened this issue Sep 20, 2024 · 2 comments
Open

Unable to use node labels to schedule vttablet pods. #604

bluecrabs007 opened this issue Sep 20, 2024 · 2 comments
Assignees

Comments

@bluecrabs007
Copy link

bluecrabs007 commented Sep 20, 2024

Currently, the operator uses a standard NodeSelector topology.kubernetes.io/zone which is exposed via the spec.Zone in the VitessCluster custom resource.
This means, the vttablets' pod spec's nodeSelector can only specify a label, such as, topology.kubernetes.io/zone=<value> and nothing else. Reference
For usecases where we want to direct the VTOP to schedule the vttablets onto nodes that have a specific label, for example hardware=intel, this is currently not possible.

Would be nice if the operator exposes a way to pass arbitary set of labels via the VTTablet's nodeSelector
https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector

@GenLN
Copy link

GenLN commented Sep 24, 2024

but you can use affinity inside tablet pools like

keyspaces:
- name: keyspace1
  ....
  partitionings:
  - equal:
      parts: 2
      shardTemplate:
        databaseInitScriptSecret:
          name: init
          key: init_db.sql
        tabletPools:
        - cell: cellName
          affinity:
            podAntiAffinity:
            nodeAffinity:
          type: replica
          replicas: 3
          ....

@mattlord mattlord self-assigned this Sep 24, 2024
@mattlord
Copy link
Collaborator

@bluecrabs007 Are there reasons why you cannot or would not want to use the affinity options that @GenLN mentioned?

Generally these allow you to do what you can do with nodeSelector's and then some: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity

If there's some feature gap here then we could of course add nodeSelectors as well, but I'm not aware of what those might be. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants