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

PodAntiAffinity support #8322

Open
AeroNotix opened this issue Oct 8, 2024 · 0 comments
Open

PodAntiAffinity support #8322

AeroNotix opened this issue Oct 8, 2024 · 0 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@AeroNotix
Copy link

Is PodAntiAffinity supported when using TaskRuns?

I'm attempting to ensure that specific jobs do not get scheduled together on the same node, to do this, I attempted to use a podTemplate section with the following:

{
 // ... rest of spec
  "podTemplate": {
    "affinity": {
      "podAntiAffinity": {
        "requiredDuringSchedulingIgnoredDuringExecution": [
          {
            "labelSelector": {
              "matchExpressions": [
                {
                  "key": "jobName",
                  "operator": "In",
                  "values": [
                    "maintenance"
                  ]
                }
              ]
            },
            "topologyKey": "kubernetes.io/hostname"
          }
        ]
      }
    }
  }
}

However, when the task run is created the pod for the job does no longer contain the affinity rules.

@vdemeester vdemeester added kind/feature Categorizes issue or PR as related to a new feature. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants