From a16de1a6cb11aee3b5e2c6580ac84d77d633c22b Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Sat, 25 Nov 2023 12:36:07 +0100 Subject: [PATCH] refactor: configure affinity to arm nodes --- forgejo/config/values.forgejo.yaml | 13 ++++++++++++- homepage/resources/deployment.yaml | 10 ++++++++++ nocodb/resources/deployment.yaml | 10 ++++++++++ vikunja/resources/api/deployment.yaml | 10 ++++++++++ vikunja/resources/ui/deployment.yaml | 12 +++++++++++- zipline/resources/deployment.yaml | 10 ++++++++++ 6 files changed, 63 insertions(+), 2 deletions(-) diff --git a/forgejo/config/values.forgejo.yaml b/forgejo/config/values.forgejo.yaml index c49d6dc..b79b876 100644 --- a/forgejo/config/values.forgejo.yaml +++ b/forgejo/config/values.forgejo.yaml @@ -104,4 +104,15 @@ gitea: postgresql: - enabled: false \ No newline at end of file + enabled: false + +affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + preference: + matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - arm64 \ No newline at end of file diff --git a/homepage/resources/deployment.yaml b/homepage/resources/deployment.yaml index ad178aa..d7c7e19 100644 --- a/homepage/resources/deployment.yaml +++ b/homepage/resources/deployment.yaml @@ -56,6 +56,16 @@ spec: limits: memory: 100Mi cpu: 20m + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - arm64 volumes: - name: homepage-config secret: diff --git a/nocodb/resources/deployment.yaml b/nocodb/resources/deployment.yaml index c1fbe68..e7d0127 100644 --- a/nocodb/resources/deployment.yaml +++ b/nocodb/resources/deployment.yaml @@ -67,6 +67,16 @@ spec: drop: - ALL readOnlyRootFilesystem: true + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - arm64 volumes: - name: nocodb-metadata persistentVolumeClaim: diff --git a/vikunja/resources/api/deployment.yaml b/vikunja/resources/api/deployment.yaml index 3a70ed2..8774b50 100644 --- a/vikunja/resources/api/deployment.yaml +++ b/vikunja/resources/api/deployment.yaml @@ -72,6 +72,16 @@ spec: runAsGroup: 1000 runAsUser: 1000 runAsNonRoot: false + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - arm64 volumes: - name: vikunja-config secret: diff --git a/vikunja/resources/ui/deployment.yaml b/vikunja/resources/ui/deployment.yaml index c64ee88..2b34188 100644 --- a/vikunja/resources/ui/deployment.yaml +++ b/vikunja/resources/ui/deployment.yaml @@ -30,4 +30,14 @@ spec: memory: "128Mi" cpu: "50m" ports: - - containerPort: 8080 \ No newline at end of file + - containerPort: 8080 + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - arm64 \ No newline at end of file diff --git a/zipline/resources/deployment.yaml b/zipline/resources/deployment.yaml index 4267856..0470eac 100644 --- a/zipline/resources/deployment.yaml +++ b/zipline/resources/deployment.yaml @@ -41,6 +41,16 @@ spec: drop: - ALL readOnlyRootFilesystem: true + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 100 + preference: + matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - arm64 volumes: - name: temp emptyDir: