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

Make cni_plugins download url configurable with a template string #82

Merged

Conversation

olavst-spk
Copy link
Contributor

Pull Request (PR) description

This PR makes the download URL for the CNI plugins configurable by adding a new parameter to the cni_plugins class. The parameter is a template string, which is rendered using the k8s::format_url function.

NOTE: The k8s::format_url function auto-detects the CPU architecture, so the arch parameter is no longer required. I am therefore removing it from the class. This could be a breaking change if users have set arch to something other than their system's actual CPU architecture. I don't think anyone is doing that though, since you would end up installing the k8s binaries for one architecture and the cni plugins for another.

This Pull Request (PR) fixes the following issues

The download URL is currently hard-coded to github.com. This makes it difficult to use the module in air-gapped environments.

@ananace ananace requested a review from rwaffen February 16, 2024 11:31
@olavst-spk
Copy link
Contributor Author

Can this be merged now? I have squashed the fixup commit to make the history a bit nicer.

@rwaffen rwaffen merged commit 4393ce5 into voxpupuli:master Feb 20, 2024
3 checks passed
@bastelfreak bastelfreak added the enhancement New feature or request label Feb 21, 2024
@h-haaks h-haaks deleted the cni_plugins_download_url branch February 23, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants