Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

append /run/cluster-api/bootstrap-success.complete #79

Merged
merged 1 commit into from
Dec 6, 2023

Conversation

anmazzotti
Copy link
Contributor

This patch includes the creation of the /run/cluster-api/bootstrap-success.complete as documented by the Bootstrap provider contract

The reason for the one line is that cloud-init is going to execute all commands in the runcmd list, in spite of errors.
So the following would be incorrect, as the /run/cluster-api/bootstrap-success.complete would be created even in case of bootstrap failures.

runcmd:
  - 'curl -sfL https://get.k3s.io/ | INSTALL_K3S_VERSION=%s sh -s - server'
  - 'mkdir -p /run/cluster-api && echo success > /run/cluster-api/bootstrap-success.complete'

@@ -27,7 +27,7 @@ const (
{{template "files" .WriteFiles}}
runcmd:
{{- template "commands" .PreK3sCommands }}
- 'curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=%s sh -s - server'
- 'curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=%s sh -s - server && mkdir -p /run/cluster-api && echo success > /run/cluster-api/bootstrap-success.complete'
Copy link
Collaborator

Choose a reason for hiding this comment

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

what is your opinion of just adding this as a separate command rather than chaining it?

I prefer this approach as i find it more readable and easier to debug on failed nodes, but that is just my two cents.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A separate command would be incorrect, please check the comment above.

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh i see thanks. hmm we should probably make an issue to just create a bootstrap script like the kubeadm providers.

@zawachte zawachte merged commit 614692c into k3s-io:main Dec 6, 2023
4 checks passed
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