Make cni_plugins download url configurable with a template string #82
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thek8s::format_url
function.NOTE: The
k8s::format_url
function auto-detects the CPU architecture, so thearch
parameter is no longer required. I am therefore removing it from the class. This could be a breaking change if users have setarch
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.