Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57184

Kubernetes Plugin inversely applies NodeSelector

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • kubernetes-plugin
    • None
    • Jenkins version 2.173
      Host OS: CentOS 7
      openjdk version "1.8.0_181"
      Kubernetes Plugin version: 1.15.1
      Kubernetes version: 1.13.2
      Kubernetes nodes: Container Linux by CoreOS 1911.4.0 (Rhyolite)

      Adding a NodeSelector to slaves provisioned with the Kubernetes appears to apply an anti-affinity to that NodeSelector rather than actually using the NodeSelector.

      We share our Kubernetes Cluster with Jenkins and a number of other projects. For our Jenkins slaves, we only want certain fast nodes, so they're labeled with `jenkins-slave=true` and our slow nodes do not have that corresponding label.

       

      When configuring slaves in Jenkins, we applied the NodeSelector with the given label:

       

      With the expectation it would only run on the fast nodes. But instead it only ran on the slow nodes without the label.

      It seems like rather than apply a NodeSelector, it's applying the opposite of the NodeSelector (anti-affinity).

      We can't do too much testing on our production instance of Jenkins, so for now we've just removed the NodeSelector and are letting Jenkins Slaves run everywhere, but this is very frustrating when a slave is scheduled on our slow nodes.

            Unassigned Unassigned
            darrien Darrien Glasser
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: