Skip to content

Commit

Permalink
ci: scale up coredns to 3 replicas to prevent it from being affected …
Browse files Browse the repository at this point in the history
…by node down test cases

Signed-off-by: Yang Chiu <[email protected]>
  • Loading branch information
yangchiu committed Dec 6, 2024
1 parent eaa6312 commit 044b944
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pipelines/e2e/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions pipelines/utilities/coredns.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
scale_up_coredns(){
if [[ "${TF_VAR_k8s_distro_name}" == "rke2" ]]; then
kubectl get configmap -n kube-system rke2-coredns-rke2-coredns-autoscaler -oyaml | sed 's/\"min\": 0/\"min\": 3/' | kubectl apply -n kube-system -f -
else
kubectl patch deployment coredns -n kube-system --type='merge' -p '{"spec": {"replicas": 3}}'
fi
}
3 changes: 3 additions & 0 deletions test_framework/scripts/longhorn-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 044b944

Please sign in to comment.