Skip to content

Commit

Permalink
feat: add script for port check
Browse files Browse the repository at this point in the history
Signed-off-by: baoyinghai_yewu <baoyinghai_yewu@cmss.chinamobile.com>
  • Loading branch information
OrangeBao committed Feb 21, 2025
1 parent cd2ce3e commit feab896
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hack/k8s-in-k8s/generate_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ nodeRegistration:
function GenerateStaticNginxProxy() {
config_path=/apps/conf/nginx
if [ "\$1" == \"true\" ]; then
if [ \""\$1"\" == \"true\" ]; then
config_path=\$PATH_FILE_TMP
fi
echo \"apiVersion: v1
Expand Down
6 changes: 3 additions & 3 deletions hack/k8s-in-k8s/kubelet_node_helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -307,9 +307,9 @@ function revert() {

while [ $elapsed_time -lt $KUBELET_CONF_TIMEOUT ]; do
if [ -f "${PATH_KUBERNETES}/${KUBELET_KUBE_CONFIG_NAME}" ]; then
rm -f "${PATH_KUBERNETES}/bootstrap-kubelet.conf"
echo "Deleted bootstrap-kubelet.conf file as kubelet.conf exists."
break
rm -f "${PATH_KUBERNETES}/bootstrap-kubelet.conf"
echo "Deleted bootstrap-kubelet.conf file as kubelet.conf exists."
break
fi
sleep 2
elapsed_time=$((elapsed_time + 2))
Expand Down
2 changes: 1 addition & 1 deletion hack/k8s-in-k8s/port_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ for node in "${node_array[@]}"; do
ip=$(echo $node | awk '{print $2}')

if check_port $ip 5678; then
echo ""
echo "success"
else
echo "节点: $name, IP: $ip 端口5678不可访问"
fi
Expand Down

0 comments on commit feab896

Please sign in to comment.