I have a jenkins and most jobs do some ansible work and need 300mb of ram tops with 50m cpu, but I'v got few massive integration testing jobs that take 14000m cpu(14vcpus) or more, i know there is there a way to have 2 node pools (one with small instances 4gb, and one with the massive 30vcpu machines), and if I had 2 microserwices I could make them use NodeSelector, but jenkins is one microserwice, can I make it somehow spawn different job agents in different node pools?
Asked
Active
Viewed 239 times
1 Answers
1
You should be able to spawn Jenkins agents using another node pool, as NodeSelector
is one of the parameter that could be defined.
Based on kubernetes-plugin GitHub Repo, NodeSelector
can be defined as anything you want to match the second node pool.
Example could be found on sample file of the repo:
podTemplate(yaml: '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: jnlp
image: jenkins/jnlp-agent:latest-windows
nodeSelector:
beta.kubernetes.io/os: windows
'''
) {
node(POD_LABEL) {
bat 'dir'
powershell 'Get-ChildItem Env: | Sort Name'
}
}

Christoper Hans
- 625
- 4
- 19