Skip to content

Commit

Permalink
Avoid second run of bootstrap script for flatcar with cloud-init (#366)
Browse files Browse the repository at this point in the history
Signed-off-by: Waleed Malik <[email protected]>
Co-authored-by: Waleed Malik <[email protected]>
  • Loading branch information
kubermatic-bot and ahmedwaleedmalik authored Feb 28, 2024
1 parent d718b3d commit c0f05b3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deploy/osps/default/osp-flatcar-cloud-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ spec:
#!/bin/bash
set -xeuo pipefail
# Check if bootstrap phase has already completed. This is required when we run `cloud-init init` again since it tries to re-run
# the bootstrap cloud-config as well, from the userdata.
if [ -f /etc/bootstrap-complete ]; then
exit 0
fi
{{- /* Configure proxy as the first step to ensure that all the phases of provisioning respect the proxy environment. */}}
{{- template "configureProxyScript" }}
Expand Down Expand Up @@ -262,6 +268,10 @@ spec:
systemctl enable --now kubelet
systemctl enable --now --no-block kubelet-healthcheck.service
# Bootstrap phase for the machine is complete.
touch /etc/bootstrap-complete
systemctl disable setup.service
- path: /opt/bin/health-monitor.sh
Expand Down

0 comments on commit c0f05b3

Please sign in to comment.