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

Custom k3s_binary_url #211

Open
bconn98 opened this issue Aug 16, 2023 · 6 comments
Open

Custom k3s_binary_url #211

bconn98 opened this issue Aug 16, 2023 · 6 comments

Comments

@bconn98
Copy link

bconn98 commented Aug 16, 2023

Summary

Allow for overriding of k3s_binary_url for use in FOSS controlled environments. My employer requires that we pull FOSS components from a company controlled nexus mirror and this does not appear to be supported by the role currently.

Issue Type

  • Feature Request

User Story

As an ansible user, I want to override the k3s_binary_url variable so that I can pull from sources other than GitHub.

@dbrennand
Copy link
Contributor

Hi @bconn98

If your control node has connectivity to the Nexus mirror, you could have a pre_tasks section in your playbook to download the k3s binary to the {{ playbook_dir }}/files directory, and then invoke the role with k3s_airgap: true.

@xanmanning @onedr0p what are you thoughts on this? If something was implemented for this, could the usage be something like:

k3s_airgap: true
k3s_binary_url: https://nexus.company.com/path/to/k3s
k3s_checksum_url: https://nexus.company.com/path/to/checksum.txt

And modify the ensure_uploads.yml playbook to run some get_url tasks when the above two variables are defined with k3s_airgap?

@onedr0p
Copy link
Collaborator

onedr0p commented Aug 17, 2023

We're open to PRs on that implementation.

Copy link

stale bot commented Dec 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 15, 2023
@xanmanning
Copy link
Member

We're open to PRs on that implementation.

agree, happy to take a look if you have a solution in mind to implement

@stale stale bot removed the wontfix This will not be worked on label Dec 15, 2023
dbrennand added a commit to dbrennand/ansible-role-k3s that referenced this issue Dec 22, 2023
@dbrennand
Copy link
Contributor

dbrennand commented Dec 22, 2023

Implemented logic for this (untested) in dbrennand@56db9e8.

Usage:

k3s_airgap: true
k3s_binary_url: https://nexus.company.com/path/to/k3s
k3s_hash_url: https://nexus.company.com/path/to/checksum.txt

@onedr0p
Copy link
Collaborator

onedr0p commented Jan 26, 2024

That implementation seems fine to me.

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

No branches or pull requests

4 participants