Skip to content

fix(install): wait up to 120s for the kubeconfig, like kubesoloctl - #230

Open
shubhamkapoor01 wants to merge 1 commit into
portainer:developfrom
shubhamkapoor01:install-kubeconfig-wait
Open

shubhamkapoor01 wants to merge 1 commit into
portainer:developfrom
shubhamkapoor01:install-kubeconfig-wait

Conversation

@shubhamkapoor01

Copy link
Copy Markdown

Problem

install.sh gives up waiting for the admin kubeconfig after 30s. A first boot on a small device can take longer (kubesoloctl already waits 120s for this reason), so the kubeconfig never gets merged.

Fix

Wait up to 120s, the same as kubesoloctl's kubeconfigWaitTimeout, and say the cluster may still be starting when it gives up. The exit code is unchanged.

Related to #158

Copilot AI lite review requested due to automatic review settings October 24, 2026 14:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Adjust the loop so it checks for the kubeconfig through the full 120-second timeout.

1 open issue
What changed in this PR

This pull request extends install.sh’s kubeconfig wait period from 30 to 120 seconds to better support slow first boots, and clarifies the timeout warning.

Changes:

  • Increases the kubeconfig polling limit to 120 seconds.
  • Updates the timeout message to indicate that the cluster may still be starting.
File Description
install.sh Extends the kubeconfig wait loop and updates the timeout warning; the final check may occur before the full 120-second deadline.

Review effort: Lite

Comment thread install.sh
echo "⏳ Waiting for kubesolo to generate kubeconfig..."
i=1
while [ $i -le 30 ]; do
while [ $i -le 120 ]; do

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, the counter now starts at 0 so the last check happens at 120s. The old 30s loop had the same off-by-one.

@shubhamkapoor01
shubhamkapoor01 force-pushed the install-kubeconfig-wait branch from 94d11b4 to 3b3bdbe Compare October 24, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants