diff --git a/services/jenkins/configmap-jcasc.yaml b/services/jenkins/configmap-jcasc.yaml index 16304c68..d0a3fe84 100644 --- a/services/jenkins/configmap-jcasc.yaml +++ b/services/jenkins/configmap-jcasc.yaml @@ -488,6 +488,40 @@ data: podRetention: Never serviceAccount: "jenkins" slaveConnectTimeoutStr: "100" + yaml: | + spec: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: atlas.bstein.dev/spillover + operator: DoesNotExist + - weight: 95 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: NotIn + values: + - titan-13 + - titan-15 + - titan-17 + - titan-19 + - weight: 85 + preference: + matchExpressions: + - key: hardware + operator: In + values: + - rpi5 + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: + jenkins/jenkins-jenkins-agent: "true" yamlMergeStrategy: override inheritYamlMergeStrategy: false slaveAgentPort: 50000 diff --git a/services/jenkins/deployment.yaml b/services/jenkins/deployment.yaml index 5e531218..39bbd8cd 100644 --- a/services/jenkins/deployment.yaml +++ b/services/jenkins/deployment.yaml @@ -70,6 +70,21 @@ spec: affinity: nodeAffinity: preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: atlas.bstein.dev/spillover + operator: DoesNotExist + - weight: 95 + preference: + matchExpressions: + - key: kubernetes.io/hostname + operator: NotIn + values: + - titan-13 + - titan-15 + - titan-17 + - titan-19 - weight: 90 preference: matchExpressions: