planetscale / planetscale/vitess-operator

[Feature] After configuring TabletPool Affinity, the Zone configuration will become invalid

Open
#649 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
372
Forks
102
Avg merge
3d 5h
Merged PRs (30d)
15

Description

Our Vitess will configure the following affinity, but this will cause the Zone to no longer take effect, causing the zone to not be as expected.

          tabletPools:
          - affinity:
              nodeAffinity:
                requiredDuringSchedulingIgnoredDuringExecution:
                  nodeSelectorTerms:
                  - matchExpressions:
                    - key: alpha.eksctl.io/nodegroup-name
                      operator: In
                      values:
                      - vitess-20
            cell: ap2d

The relevant code implementation is that after specifying any affinity, the default rule will no longer take effect.
Can we open nodeSelector or other methods/parameters to make custom affinity and zone configuration take effect at the same time?
https://github.com/planetscale/vitess-operator/blob/f36568a7ba67422adac8cc33cde4898d0b908294/pkg/operator/vttablet/pod.go#L359-L377

Reference: #604

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the YAML configuration and reading pkg/operator/vttablet/pod.go around lines 359-377, where the issue identifies the relevant implementation. Trace how custom affinity affects the default zone behavior, then verify that generated tablet pod scheduling configuration preserves both the requested affinity and zone settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.