-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Make artifact URL prefix configurable #13367
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Manuel Buil <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR makes the K3s artifact URL prefix configurable by introducing the INSTALL_K3S_ARTIFACT_URL environment variable, replacing the previous GITHUB_URL variable. This allows K3s to be downloaded from locations other than GitHub, such as private mirrors or alternative artifact repositories. The default behavior remains unchanged, pointing to the official GitHub releases.
Key changes:
- Added
INSTALL_K3S_ARTIFACT_URLenvironment variable with documentation - Implemented URL-safe encoding for version strings containing special characters (e.g., "+" becomes "%2B")
- Updated artifact download URLs to use the new configurable prefix
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| # --- download binary from github url --- | ||
| download_binary() { | ||
| VERSION_URLSAFE="$(echo ${VERSION_K3S} | sed 's/\+/%2B/g')" |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The VERSION_URLSAFE variable is computed identically in both download_hash() and download_binary() functions. Consider extracting this to a shared location or computing it once in get_release_version() after VERSION_K3S is set. This would improve maintainability and ensure consistency.
|
This should work for public endpoints, but what if Could possibly use support for specifying local artifact via filesystem path |
|
We don't need to solve all possibile problems now, just add parity with what the rke2 install script can do. |
Proposed Changes
Allow setting INSTALL_K3S_ARTIFACT_URL to override URL prefix for release artifacts, to allow downloading K3s from locations other than GitHub.
Breaking Variable Changes! It replaces the env var GITHUB_URL which was doing a similar thing but required the repo to be in Github
Types of Changes
New feature
Verification
Taking the install.sh script:
Testing
Linked Issues
#13366
User-Facing Change
Further Comments