[JIRA] (JENKINS-57184) Kubernetes Plugin inversely applies NodeSelector
Title: Message Title Carlos Sanchez edited a comment on JENKINS-57184 Re: Kubernetes Plugin inversely applies NodeSelector I can't reproduce, the pod is created with this yaml which is correct {code}apiVersion: v1kind: Podmetadata: creationTimestamp: "2019-04-25T14:42:23Z" labels:jenkins: slavejenkins/node-selector-test: "true" name: node-selector-test-59d36 namespace: jx...spec:... nodeSelector:jenkins-slave: "true" priority: 0 restartPolicy: Never schedulerName: default-scheduler securityContext: {} serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 tolerations: - effect: NoExecutekey: node.kubernetes.io/not-readyoperator: ExiststolerationSeconds: 300 - effect: NoExecutekey: node.kubernetes.io/unreachableoperator: ExiststolerationSeconds: 300status: conditions: - lastProbeTime: nulllastTransitionTime: "2019-04-25T14:42:23Z"message: '0/1 nodes are available: 1 node(s) didn''t match node selector.'reason: Unschedulablestatus: "False"type: PodScheduled phase: Pending qosClass: BestEffort{code} Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57184) Kubernetes Plugin inversely applies NodeSelector
Title: Message Title Carlos Sanchez commented on JENKINS-57184 Re: Kubernetes Plugin inversely applies NodeSelector I can't reproduce, the pod is created with this yaml apiVersion: v1 kind: Pod metadata: creationTimestamp: "2019-04-25T14:42:23Z" labels: jenkins: slave jenkins/node-selector-test: "true" name: node-selector-test-59d36 namespace: jx ... spec: ... nodeSelector: jenkins-slave: "true" priority: 0 restartPolicy: Never schedulerName: default-scheduler securityContext: {} serviceAccount: default serviceAccountName: default terminationGracePeriodSeconds: 30 tolerations: - effect: NoExecute key: node.kubernetes.io/not-ready operator: Exists tolerationSeconds: 300 - effect: NoExecute key: node.kubernetes.io/unreachable operator: Exists tolerationSeconds: 300 status: conditions: - lastProbeTime: null lastTransitionTime: "2019-04-25T14:42:23Z" message: '0/1 nodes are available: 1 node(s) didn''t match node selector.' reason: Unschedulable status: "False" type: PodScheduled phase: Pending qosClass: BestEffort Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-57184) Kubernetes Plugin inversely applies NodeSelector
Title: Message Title Darrien Glasser created an issue Jenkins / JENKINS-57184 Kubernetes Plugin inversely applies NodeSelector Issue Type: Bug Assignee: Carlos Sanchez Attachments: Screen Shot 2019-04-25 at 9.20.37 AM.png Components: kubernetes-plugin Created: 2019-04-25 14:16 Environment: 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) Priority: Minor Reporter: Darrien Glasser 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.