From 98651cf9d96d98ef244e958a6fefb84b17ac6751 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sat, 22 Jun 2024 19:47:48 -0500 Subject: [PATCH] jenkins: Force iSCSI volume on specific nodes Instead of routing iSCSI traffic from the Kubernetes network, through the firewall, to the storage network, nodes now have a second network adapter connected to directly to the storage network. The nodes with such an adapter are labelled `network.du5t1n.me/storage`, so we can pin the Jenkins PersistentVolume to them via a node affinity rule. --- jenkins/iscsi.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/jenkins/iscsi.yaml b/jenkins/iscsi.yaml index 3651b12..b90ca25 100644 --- a/jenkins/iscsi.yaml +++ b/jenkins/iscsi.yaml @@ -47,4 +47,11 @@ spec: fsType: ext4 secretRef: name: iscsi-chap - + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: network.du5t1n.me/storage + operator: In + values: + - 'true'