From d90237b933a12681e15356edede013b99c2af373 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Fri, 26 Jul 2024 00:49:08 +1000 Subject: [PATCH] update node affinity for PVs --- .../app-volumes/env/k3s-cluster/templates/coder-pv.yaml | 7 ++++++- .../app-volumes/env/k3s-cluster/templates/gitea-pv.yaml | 7 ++++++- .../app-volumes/env/k3s-cluster/templates/minio-pv.yaml | 4 ++-- .../app-volumes/env/k3s-cluster/templates/mongodb-pv.yaml | 7 ++++++- .../env/k3s-cluster/templates/plex-config-pv.yaml | 7 ++++++- .../env/k3s-cluster/templates/postgresql-primary-pv.yaml | 4 ++-- .../env/k3s-cluster/templates/postgresql-replica-pv.yaml | 4 ++-- .../env/k3s-cluster/templates/redis-master-pv.yaml | 4 ++-- .../env/k3s-cluster/templates/redis-replica-pv.yaml | 4 ++-- .../env/k3s-cluster/templates/sonarqube-pv.yaml | 4 ++-- 10 files changed, 36 insertions(+), 16 deletions(-) diff --git a/resources/app-volumes/env/k3s-cluster/templates/coder-pv.yaml b/resources/app-volumes/env/k3s-cluster/templates/coder-pv.yaml index fefb66d..dd1c10e 100644 --- a/resources/app-volumes/env/k3s-cluster/templates/coder-pv.yaml +++ b/resources/app-volumes/env/k3s-cluster/templates/coder-pv.yaml @@ -27,4 +27,9 @@ spec: - key: kubernetes.io/arch operator: In values: - - arm64 \ No newline at end of file + - arm64 + - matchExpressions: + - key: kubernetes.io/os + operator: In + values: + - linux \ No newline at end of file diff --git a/resources/app-volumes/env/k3s-cluster/templates/gitea-pv.yaml b/resources/app-volumes/env/k3s-cluster/templates/gitea-pv.yaml index ad0e65a..40ab908 100644 --- a/resources/app-volumes/env/k3s-cluster/templates/gitea-pv.yaml +++ b/resources/app-volumes/env/k3s-cluster/templates/gitea-pv.yaml @@ -27,4 +27,9 @@ spec: - key: kubernetes.io/arch operator: In values: - - arm64 \ No newline at end of file + - arm64 + - matchExpressions: + - key: kubernetes.io/os + operator: In + values: + - linux \ No newline at end of file diff --git a/resources/app-volumes/env/k3s-cluster/templates/minio-pv.yaml b/resources/app-volumes/env/k3s-cluster/templates/minio-pv.yaml index bb99b46..f66dc94 100644 --- a/resources/app-volumes/env/k3s-cluster/templates/minio-pv.yaml +++ b/resources/app-volumes/env/k3s-cluster/templates/minio-pv.yaml @@ -24,7 +24,7 @@ spec: required: nodeSelectorTerms: - matchExpressions: - - key: kubernetes.io/hostname + - key: kubernetes.io/os operator: In values: - - k3s-cluster-node-2 \ No newline at end of file + - linux \ No newline at end of file diff --git a/resources/app-volumes/env/k3s-cluster/templates/mongodb-pv.yaml b/resources/app-volumes/env/k3s-cluster/templates/mongodb-pv.yaml index 5a2c168..5a7c7db 100644 --- a/resources/app-volumes/env/k3s-cluster/templates/mongodb-pv.yaml +++ b/resources/app-volumes/env/k3s-cluster/templates/mongodb-pv.yaml @@ -27,4 +27,9 @@ spec: - key: kubernetes.io/arch operator: In values: - - amd64 \ No newline at end of file + - amd64 + - matchExpressions: + - key: kubernetes.io/os + operator: In + values: + - linux \ No newline at end of file diff --git a/resources/app-volumes/env/k3s-cluster/templates/plex-config-pv.yaml b/resources/app-volumes/env/k3s-cluster/templates/plex-config-pv.yaml index ef19681..e1097cc 100644 --- a/resources/app-volumes/env/k3s-cluster/templates/plex-config-pv.yaml +++ b/resources/app-volumes/env/k3s-cluster/templates/plex-config-pv.yaml @@ -27,4 +27,9 @@ spec: - key: kubernetes.io/arch operator: In values: - - amd64 \ No newline at end of file + - amd64 + - matchExpressions: + - key: kubernetes.io/os + operator: In + values: + - linux \ No newline at end of file diff --git a/resources/app-volumes/env/k3s-cluster/templates/postgresql-primary-pv.yaml b/resources/app-volumes/env/k3s-cluster/templates/postgresql-primary-pv.yaml index 7164c5b..26563df 100644 --- a/resources/app-volumes/env/k3s-cluster/templates/postgresql-primary-pv.yaml +++ b/resources/app-volumes/env/k3s-cluster/templates/postgresql-primary-pv.yaml @@ -24,7 +24,7 @@ spec: required: nodeSelectorTerms: - matchExpressions: - - key: kubernetes.io/hostname + - key: kubernetes.io/os operator: In values: - - k3s-cluster-node-2 \ No newline at end of file + - linux \ No newline at end of file diff --git a/resources/app-volumes/env/k3s-cluster/templates/postgresql-replica-pv.yaml b/resources/app-volumes/env/k3s-cluster/templates/postgresql-replica-pv.yaml index 5bacc48..098fc6a 100644 --- a/resources/app-volumes/env/k3s-cluster/templates/postgresql-replica-pv.yaml +++ b/resources/app-volumes/env/k3s-cluster/templates/postgresql-replica-pv.yaml @@ -24,7 +24,7 @@ spec: required: nodeSelectorTerms: - matchExpressions: - - key: kubernetes.io/hostname + - key: kubernetes.io/os operator: In values: - - k3s-cluster-node-2 \ No newline at end of file + - linux \ No newline at end of file diff --git a/resources/app-volumes/env/k3s-cluster/templates/redis-master-pv.yaml b/resources/app-volumes/env/k3s-cluster/templates/redis-master-pv.yaml index 9ee2001..1c07c53 100644 --- a/resources/app-volumes/env/k3s-cluster/templates/redis-master-pv.yaml +++ b/resources/app-volumes/env/k3s-cluster/templates/redis-master-pv.yaml @@ -24,7 +24,7 @@ spec: required: nodeSelectorTerms: - matchExpressions: - - key: kubernetes.io/hostname + - key: kubernetes.io/os operator: In values: - - k3s-cluster-node-2 \ No newline at end of file + - linux \ No newline at end of file diff --git a/resources/app-volumes/env/k3s-cluster/templates/redis-replica-pv.yaml b/resources/app-volumes/env/k3s-cluster/templates/redis-replica-pv.yaml index ed9eb0d..7ab5473 100644 --- a/resources/app-volumes/env/k3s-cluster/templates/redis-replica-pv.yaml +++ b/resources/app-volumes/env/k3s-cluster/templates/redis-replica-pv.yaml @@ -24,7 +24,7 @@ spec: required: nodeSelectorTerms: - matchExpressions: - - key: kubernetes.io/hostname + - key: kubernetes.io/os operator: In values: - - k3s-cluster-node-2 \ No newline at end of file + - linux \ No newline at end of file diff --git a/resources/app-volumes/env/k3s-cluster/templates/sonarqube-pv.yaml b/resources/app-volumes/env/k3s-cluster/templates/sonarqube-pv.yaml index da59108..ea6e576 100644 --- a/resources/app-volumes/env/k3s-cluster/templates/sonarqube-pv.yaml +++ b/resources/app-volumes/env/k3s-cluster/templates/sonarqube-pv.yaml @@ -24,7 +24,7 @@ spec: required: nodeSelectorTerms: - matchExpressions: - - key: kubernetes.io/hostname + - key: kubernetes.io/os operator: In values: - - rpi5-cluster-node-1 \ No newline at end of file + - linux \ No newline at end of file