From af54905c4a2a2c2e398f0e6767ccb5e99af36edb Mon Sep 17 00:00:00 2001 From: Jagatguru Prasad Mishra Date: Fri, 10 May 2024 02:37:22 -0400 Subject: [PATCH] Add "node-role.kubernetes.io/control-plane" toleration Harbor pods were not getting scheduled on K8s v1.28.4 due to untolerated taint 'node-role.kubernetes.io/control-plane'. This change adds this toleration to the harbor pods. TestPlan: PASS: build-pkgs && build-image PASS: AIO-SX: application apply/upload/remove/delete PASS: Standard: Harbor pods are deployed on both the controllers. PASS: Standard: verify if toleration 'node-role.kubernetes.io/control-plane' is added to pods Story: 2010721 Task: 50069 Change-Id: I7c5567522b2fb5888a7aeda7a6d53eca60bf5a8d Signed-off-by: Jagatguru Prasad Mishra --- .../harbor-helm/debian/deb_folder/changelog | 2 +- ...control-plane-toleration-to-the-pods.patch | 156 ++++++++++++++++++ .../debian/deb_folder/patches/series | 1 + .../harbor-helm/debian/meta_data.yaml | 4 +- stx-harbor-helm/debian/deb_folder/control | 1 - 5 files changed, 160 insertions(+), 4 deletions(-) create mode 100644 helm-charts/upstream/harbor-helm/debian/deb_folder/patches/0002-adding-control-plane-toleration-to-the-pods.patch diff --git a/helm-charts/upstream/harbor-helm/debian/deb_folder/changelog b/helm-charts/upstream/harbor-helm/debian/deb_folder/changelog index 8ff5f3d..40ab65d 100644 --- a/helm-charts/upstream/harbor-helm/debian/deb_folder/changelog +++ b/helm-charts/upstream/harbor-helm/debian/deb_folder/changelog @@ -1,4 +1,4 @@ -harbor-helm (1.12-1) unstable; urgency=medium +harbor-helm (1.12-2) unstable; urgency=medium * Initial release. diff --git a/helm-charts/upstream/harbor-helm/debian/deb_folder/patches/0002-adding-control-plane-toleration-to-the-pods.patch b/helm-charts/upstream/harbor-helm/debian/deb_folder/patches/0002-adding-control-plane-toleration-to-the-pods.patch new file mode 100644 index 0000000..51e020e --- /dev/null +++ b/helm-charts/upstream/harbor-helm/debian/deb_folder/patches/0002-adding-control-plane-toleration-to-the-pods.patch @@ -0,0 +1,156 @@ +From 2970bb86d37ebf938faa7e365bb8f2e8b8bafe5c Mon Sep 17 00:00:00 2001 +From: Jagatguru Prasad Mishra +Date: Wed, 8 May 2024 08:42:33 -0400 +Subject: [PATCH 1/1] adding control-plane toleration to the pods + +--- + values.yaml | 70 ++++++++++++++++++++++++++++++++++++++--------------- + 1 file changed, 50 insertions(+), 20 deletions(-) + +diff --git a/values.yaml b/values.yaml +index aef6abf..8e89cee 100644 +--- a/values.yaml ++++ b/values.yaml +@@ -415,8 +415,11 @@ nginx: + nodeSelector: {} + tolerations: + - key: node-role.kubernetes.io/master +- operator: Exists +- effect: NoSchedule ++ operator: Exists ++ effect: NoSchedule ++ - key: node-role.kubernetes.io/control-plane ++ operator: Exists ++ effect: NoSchedule + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: +@@ -446,8 +449,11 @@ portal: + nodeSelector: {} + tolerations: + - key: node-role.kubernetes.io/master +- operator: Exists +- effect: NoSchedule ++ operator: Exists ++ effect: NoSchedule ++ - key: node-role.kubernetes.io/control-plane ++ operator: Exists ++ effect: NoSchedule + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: +@@ -481,8 +487,11 @@ core: + nodeSelector: {} + tolerations: + - key: node-role.kubernetes.io/master +- operator: Exists +- effect: NoSchedule ++ operator: Exists ++ effect: NoSchedule ++ - key: node-role.kubernetes.io/control-plane ++ operator: Exists ++ effect: NoSchedule + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: +@@ -556,8 +565,11 @@ jobservice: + nodeSelector: {} + tolerations: + - key: node-role.kubernetes.io/master +- operator: Exists +- effect: NoSchedule ++ operator: Exists ++ effect: NoSchedule ++ - key: node-role.kubernetes.io/control-plane ++ operator: Exists ++ effect: NoSchedule + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: +@@ -601,8 +613,11 @@ registry: + nodeSelector: {} + tolerations: + - key: node-role.kubernetes.io/master +- operator: Exists +- effect: NoSchedule ++ operator: Exists ++ effect: NoSchedule ++ - key: node-role.kubernetes.io/control-plane ++ operator: Exists ++ effect: NoSchedule + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: +@@ -717,8 +732,11 @@ trivy: + nodeSelector: {} + tolerations: + - key: node-role.kubernetes.io/master +- operator: Exists +- effect: NoSchedule ++ operator: Exists ++ effect: NoSchedule ++ - key: node-role.kubernetes.io/control-plane ++ operator: Exists ++ effect: NoSchedule + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: +@@ -749,8 +767,11 @@ notary: + nodeSelector: {} + tolerations: + - key: node-role.kubernetes.io/master +- operator: Exists +- effect: NoSchedule ++ operator: Exists ++ effect: NoSchedule ++ - key: node-role.kubernetes.io/control-plane ++ operator: Exists ++ effect: NoSchedule + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: +@@ -780,8 +801,11 @@ notary: + nodeSelector: {} + tolerations: + - key: node-role.kubernetes.io/master +- operator: Exists +- effect: NoSchedule ++ operator: Exists ++ effect: NoSchedule ++ - key: node-role.kubernetes.io/control-plane ++ operator: Exists ++ effect: NoSchedule + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: +@@ -832,8 +856,11 @@ database: + nodeSelector: {} + tolerations: + - key: node-role.kubernetes.io/master +- operator: Exists +- effect: NoSchedule ++ operator: Exists ++ effect: NoSchedule ++ - key: node-role.kubernetes.io/control-plane ++ operator: Exists ++ effect: NoSchedule + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: +@@ -901,8 +928,11 @@ redis: + nodeSelector: {} + tolerations: + - key: node-role.kubernetes.io/master +- operator: Exists +- effect: NoSchedule ++ operator: Exists ++ effect: NoSchedule ++ - key: node-role.kubernetes.io/control-plane ++ operator: Exists ++ effect: NoSchedule + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: +-- +2.25.1 + diff --git a/helm-charts/upstream/harbor-helm/debian/deb_folder/patches/series b/helm-charts/upstream/harbor-helm/debian/deb_folder/patches/series index 95059eb..02ad81f 100644 --- a/helm-charts/upstream/harbor-helm/debian/deb_folder/patches/series +++ b/helm-charts/upstream/harbor-helm/debian/deb_folder/patches/series @@ -1 +1,2 @@ 0001-AddNodeAffinityToPods.patch +0002-adding-control-plane-toleration-to-the-pods.patch diff --git a/helm-charts/upstream/harbor-helm/debian/meta_data.yaml b/helm-charts/upstream/harbor-helm/debian/meta_data.yaml index 64229f4..4fafbb4 100644 --- a/helm-charts/upstream/harbor-helm/debian/meta_data.yaml +++ b/helm-charts/upstream/harbor-helm/debian/meta_data.yaml @@ -1,6 +1,6 @@ --- debname: harbor-helm -debver: 1.12-1 +debver: 1.12-2 dl_path: name: harbor-1.12.0.tar.gz url: https://github.com/goharbor/harbor-helm/archive/refs/tags/v1.12.0.tar.gz @@ -9,7 +9,7 @@ src_files: - harbor-helm/files/Makefile revision: dist: $STX_DIST - stx_patch: 0 + stx_patch: 1 GITREVCOUNT: SRC_DIR: ${MY_REPO}/stx/app-harbor/helm-charts/upstream/harbor-helm BASE_SRCREV: e097b7cfda6e1258151c9143f274bebec31335c9 diff --git a/stx-harbor-helm/debian/deb_folder/control b/stx-harbor-helm/debian/deb_folder/control index e3d19b0..76eeebb 100644 --- a/stx-harbor-helm/debian/deb_folder/control +++ b/stx-harbor-helm/debian/deb_folder/control @@ -3,7 +3,6 @@ Section: libs Priority: optional Maintainer: StarlingX Developers Build-Depends: debhelper-compat (= 13), - helm, harbor-helm, python3-k8sapp-harbor-wheels, build-info