From 135eb0aec2f3f3a241b6e746dbb088b3717e25f2 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Wed, 8 May 2024 15:01:27 +0200 Subject: [PATCH] feat(forgejo): configure anti-affinity and node selector --- forgejo/resources/runners/act-runner-amd64.yaml | 13 ++++++++----- forgejo/resources/runners/act-runner-arm64.yaml | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/forgejo/resources/runners/act-runner-amd64.yaml b/forgejo/resources/runners/act-runner-amd64.yaml index 15bcafe..e470447 100644 --- a/forgejo/resources/runners/act-runner-amd64.yaml +++ b/forgejo/resources/runners/act-runner-amd64.yaml @@ -87,15 +87,18 @@ spec: mountPath: /data securityContext: fsGroup: 1000 + nodeSelector: + kubernetes.io/arch: amd64 affinity: - nodeAffinity: + podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch + - topologyKey: kubernetes.io/hostname + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name operator: In values: - - amd64 + - act-runner volumes: - name: runner-data emptyDir: diff --git a/forgejo/resources/runners/act-runner-arm64.yaml b/forgejo/resources/runners/act-runner-arm64.yaml index eab0124..ff82b1b 100644 --- a/forgejo/resources/runners/act-runner-arm64.yaml +++ b/forgejo/resources/runners/act-runner-arm64.yaml @@ -88,15 +88,18 @@ spec: mountPath: /data securityContext: fsGroup: 1000 + nodeSelector: + kubernetes.io/arch: arm64 affinity: - nodeAffinity: + podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch + - topologyKey: kubernetes.io/hostname + labelSelector: + matchExpressions: + - key: app.kubernetes.io/name operator: In values: - - arm64 + - act-runner volumes: - name: runner-data emptyDir: