WIP: jenkins: rank the controller above its own build agents #49
@ -16,6 +16,7 @@ spec:
|
|||||||
name: flux-system
|
name: flux-system
|
||||||
targetNamespace: jenkins
|
targetNamespace: jenkins
|
||||||
dependsOn:
|
dependsOn:
|
||||||
|
- name: core
|
||||||
- name: helm
|
- name: helm
|
||||||
- name: harbor
|
- name: harbor
|
||||||
- name: vault-hermes-jenkins-token-seed
|
- name: vault-hermes-jenkins-token-seed
|
||||||
|
|||||||
17
infrastructure/modules/base/priorityclass/jenkins.yaml
Normal file
17
infrastructure/modules/base/priorityclass/jenkins.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# infrastructure/modules/base/priorityclass/jenkins.yaml
|
||||||
|
apiVersion: scheduling.k8s.io/v1
|
||||||
|
kind: PriorityClass
|
||||||
|
metadata:
|
||||||
|
name: jenkins-core
|
||||||
|
value: 500
|
||||||
|
globalDefault: false
|
||||||
|
description: "For the Jenkins controller; must outrank the build agents it owns"
|
||||||
|
---
|
||||||
|
apiVersion: scheduling.k8s.io/v1
|
||||||
|
kind: PriorityClass
|
||||||
|
metadata:
|
||||||
|
name: jenkins-agent
|
||||||
|
value: 50
|
||||||
|
globalDefault: false
|
||||||
|
preemptionPolicy: Never
|
||||||
|
description: "For ephemeral Jenkins build agents; lower than the controller and non-preempting"
|
||||||
@ -4,5 +4,6 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- scavenger.yaml
|
- scavenger.yaml
|
||||||
- cassandra.yaml
|
- cassandra.yaml
|
||||||
|
- jenkins.yaml
|
||||||
- media.yaml
|
- media.yaml
|
||||||
- veles.yaml
|
- veles.yaml
|
||||||
|
|||||||
@ -795,6 +795,7 @@ data:
|
|||||||
slaveConnectTimeoutStr: "100"
|
slaveConnectTimeoutStr: "100"
|
||||||
yaml: |
|
yaml: |
|
||||||
spec:
|
spec:
|
||||||
|
priorityClassName: jenkins-agent
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsUser: 1000
|
runAsUser: 1000
|
||||||
runAsGroup: 1000
|
runAsGroup: 1000
|
||||||
|
|||||||
@ -71,6 +71,12 @@ spec:
|
|||||||
bstein.dev/restarted-at: "2026-05-20T09:40:31Z"
|
bstein.dev/restarted-at: "2026-05-20T09:40:31Z"
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: jenkins
|
serviceAccountName: jenkins
|
||||||
|
# The controller must outrank the build agents it schedules. Without this
|
||||||
|
# the controller and its agents are both priority 0, so a Recreate
|
||||||
|
# rollout can free the controller's slot only for one of its own agents
|
||||||
|
# to take it, leaving the controller permanently Pending with the
|
||||||
|
# scheduler reporting "No preemption victims found for incoming pod".
|
||||||
|
priorityClassName: jenkins-core
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
kubernetes.io/arch: arm64
|
kubernetes.io/arch: arm64
|
||||||
node-role.kubernetes.io/worker: "true"
|
node-role.kubernetes.io/worker: "true"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user