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

Slight overhaul to enhance readability, safety, and consistency #61

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bonesmoses
Copy link

I made several changes to the k3s.sh script to augment its existing capabilities. As the commit message attests, there are several modifications as well as a couple bug fixes. Primarily among these:

  • No more files in $HOME that are not strictly required. Whether they are curl file downloads or other artifacts produced by the script, all have been relocated to a temporary directory.
  • SSH and all related tools now have a single set of applied options, which also includes disabling of strict host key checks as originally defined.
  • Several redundant user-level variables were removed in favor of bash markup. If the user specifies a list of master nodes and a list of worker nodes, they no longer have to provide any of the other arrays, and the script simply combines or slices them where necessary to get the previous effects.

I could have gone further, but this was meant to be a minimally invasive modification. Future changes should likely include status checks for each of the important commands so there's an exit on error, rather than assuming all steps have succeeded.

- Added formatting functions for consistent user-status output.
- Moved all pre-deploy resources to beginning of process to break early if any are unavailable.
- Added extra status messages from script for time-consuming steps.
- Added user option to avoid re-copying SSH keys in home.
- Moved all temporary deployment files to a temporary directory.
- No longer permanently modify local SSH config to disable host key checking.
- Removed redundant ipAddressPool deployment which may fail.
- Fixed issue where user-specified Kube-VIP option was ignored.
@JamesTurland
Copy link
Owner

Thank you for taking the time to do this, I will test it.

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.

None yet

2 participants