From c073fb7d6930115bc0ce9e79fce339df237d444d Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Fri, 26 Jul 2024 00:46:33 +1000 Subject: [PATCH 1/2] enable sonarqube --- apps/sonarqube/env/k3s-cluster/config.json | 12 ++++++++++++ apps/sonarqube/env/k3s-cluster/values.yaml | 1 + 2 files changed, 13 insertions(+) create mode 100644 apps/sonarqube/env/k3s-cluster/config.json diff --git a/apps/sonarqube/env/k3s-cluster/config.json b/apps/sonarqube/env/k3s-cluster/config.json new file mode 100644 index 0000000..6e7454a --- /dev/null +++ b/apps/sonarqube/env/k3s-cluster/config.json @@ -0,0 +1,12 @@ +{ + "appName": "sonarqube", + "userGivenName": "sonarqube", + "namespace": "sonarqube", + "destNamespace": "sonarqube", + "destServer": "https://kubernetes.default.svc", + "srcPath": "apps/sonarqube/env/k3s-cluster", + "srcRepoURL": "https://github.com/3dwardch3ng/home-cluster-ops.git", + "srcTargetRevision": "", + "labels": null, + "annotations": null +} \ No newline at end of file diff --git a/apps/sonarqube/env/k3s-cluster/values.yaml b/apps/sonarqube/env/k3s-cluster/values.yaml index 7e8cf72..514308d 100644 --- a/apps/sonarqube/env/k3s-cluster/values.yaml +++ b/apps/sonarqube/env/k3s-cluster/values.yaml @@ -1,4 +1,5 @@ priorityClassName: system-cluster-critical +podAntiAffinityPreset: "" namespaceOverride: "sonarqube" clusterDomain: sonarqube.cluster.edward.sydney sonarqubeUsername: sonarqube From d90237b933a12681e15356edede013b99c2af373 Mon Sep 17 00:00:00 2001 From: Edward Cheng Date: Fri, 26 Jul 2024 00:49:08 +1000 Subject: [PATCH 2/2] 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