Skip to content

Commit

Permalink
Merge branch 'more-refactoring' of github.com:vitobotta/hetzner-k3s i…
Browse files Browse the repository at this point in the history
…nto more-refactoring
  • Loading branch information
vitobotta committed Aug 4, 2024
2 parents 9a60d92 + 5ca5e81 commit abfacb1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/Creating_a_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ networking:
allowed_networks:
ssh:
- 0.0.0.0/0
api:
api: # this will firewall port 6443 on the nodes; it will NOT firewall the API load balancer
- 0.0.0.0/0
public_network:
ipv4: true
Expand Down Expand Up @@ -50,7 +50,7 @@ datastore:

schedule_workloads_on_masters: false

# image: rocky-9 # optional: default is ubuntu-22.04
# image: rocky-9 # optional: default is ubuntu-24.04
# autoscaling_image: 103908130 # optional, defaults to the `image` setting
# snapshot_os: microos # optional: specified the os type when using a custom snapshot

Expand Down
2 changes: 1 addition & 1 deletion src/cluster/create.cr
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class Cluster::Create
instance = nil
begin
Retriable.retry(max_attempts: 3, on: Tasker::Timeout, backoff: false) do
Tasker.timeout(30.seconds) do
Tasker.timeout(60.seconds) do
instance = instance_creator.run
end
end
Expand Down
18 changes: 14 additions & 4 deletions templates/master_install_script.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
while [ ! -f /var/lib/cloud/instance/boot-finished ]; do
echo "Awaiting cloud/instance/boot-finished..."
sleep 5
done
fn_cloud="/var/lib/cloud/instance/boot-finished"
function await_cloud_init {
echo "🕒 Awaiting cloud config (may take a minute...)"
while true; do
for _ in $(seq 1 10); do
test -f $fn_cloud && return
sleep 1
done
echo -n "."
done
}
test -f $fn_cloud || await_cloud_init
echo "Cloud init finished: $(cat $fn_cloud)"


touch /etc/initialized

Expand Down
17 changes: 13 additions & 4 deletions templates/worker_install_script.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
while [ ! -f /var/lib/cloud/instance/boot-finished ]; do
echo "Awaiting cloud/instance/boot-finished..."
sleep 5
done
fn_cloud="/var/lib/cloud/instance/boot-finished"
function await_cloud_init {
echo "🕒 Awaiting cloud config (may take a minute...)"
while true; do
for _ in $(seq 1 10); do
test -f $fn_cloud && return
sleep 1
done
echo -n "."
done
}
test -f $fn_cloud || await_cloud_init
echo "Cloud init finished: $(cat $fn_cloud)"

touch /etc/initialized

Expand Down

0 comments on commit abfacb1

Please sign in to comment.