From 95598bbf3f013b17107f33bf1904a397839d85f7 Mon Sep 17 00:00:00 2001 From: Yang Chiu Date: Fri, 6 Dec 2024 09:35:06 +0800 Subject: [PATCH] ci: scale up coredns to 3 replicas to prevent it from being affected by node down test cases Signed-off-by: Yang Chiu --- pipelines/e2e/scripts/longhorn-setup.sh | 2 ++ pipelines/utilities/coredns.sh | 3 +++ test_framework/scripts/longhorn-setup.sh | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 pipelines/utilities/coredns.sh diff --git a/pipelines/e2e/scripts/longhorn-setup.sh b/pipelines/e2e/scripts/longhorn-setup.sh index 7f7f317bd..591840330 100755 --- a/pipelines/e2e/scripts/longhorn-setup.sh +++ b/pipelines/e2e/scripts/longhorn-setup.sh @@ -55,6 +55,8 @@ main(){ install_backupstores install_csi_snapshotter + scale_up_coredns + # msg="failed to get package manager" error="operating systems amzn are not supported" if [[ "${TF_VAR_k8s_distro_name}" != "eks" ]] && \ [[ "${DISTRO}" != "talos" ]]; then diff --git a/pipelines/utilities/coredns.sh b/pipelines/utilities/coredns.sh new file mode 100644 index 000000000..1fe8cd79c --- /dev/null +++ b/pipelines/utilities/coredns.sh @@ -0,0 +1,3 @@ +scale_up_coredns(){ + kubectl patch deployment coredns -n kube-system --type='merge' -p '{"spec": {"replicas": 3}}' +} diff --git a/test_framework/scripts/longhorn-setup.sh b/test_framework/scripts/longhorn-setup.sh index b091c3a9b..66d79baa5 100755 --- a/test_framework/scripts/longhorn-setup.sh +++ b/test_framework/scripts/longhorn-setup.sh @@ -6,6 +6,7 @@ source test_framework/scripts/kubeconfig.sh source pipelines/utilities/longhorn_manifest.sh source pipelines/utilities/longhorn_ui.sh source pipelines/utilities/install_metrics_server.sh +source pipelines/utilities/coredns.sh # create and clean tmpdir TMPDIR="/tmp/longhorn" @@ -563,6 +564,8 @@ main(){ enable_mtls fi + scale_up_coredns + # msg="failed to get package manager" error="operating systems amzn are not supported" if [[ "${TF_VAR_k8s_distro_name}" != "eks" ]] && \ [[ "${DISTRO}" != "talos" ]]; then