fix: adding the logic to download the cni-plugins (non-dalec) back...#7884
fix: adding the logic to download the cni-plugins (non-dalec) back...#7884awesomenix merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Reintroduces VHD-build-time caching for the legacy cni-plugins component (non-Dalec) to preserve backward compatibility with older provisioning/CSE logic that expects an extracted CNI directory under /opt/cni/downloads.
Changes:
- Add a
downloadCNIPluginshelper to download the legacycni-pluginstarball. - Add a new
components.jsonpackage handler for"cni-plugins"in the install loop to download + unpack it into the CNI downloads cache.
|
@copilot review |
…ing brace (#7886) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: djsly <4981802+djsly@users.noreply.github.com>
| ;; | ||
| "cni-plugins") | ||
| # cni-plugins is a special case that it is still in components.json for backward compatibility but we don't cache it. | ||
| testCNIPluginsInstalled "${downloadLocation}" "${PACKAGE_VERSIONS[@]}" |
There was a problem hiding this comment.
testPackagesInstalled forwards ${PACKAGE_VERSIONS[@]} into testCNIPluginsInstalled, but testCNIPluginsInstalled only reads $2 (one version). If cni-plugins ever has multiple versions (like azure-cni does), this special-case will silently validate only the first version. Make testCNIPluginsInstalled accept an array of versions (e.g., local versions=("${@:2}") and loop) or loop over versions in the case block before calling it.
| testCNIPluginsInstalled "${downloadLocation}" "${PACKAGE_VERSIONS[@]}" | |
| for version in "${PACKAGE_VERSIONS[@]}"; do | |
| testCNIPluginsInstalled "${downloadLocation}" "${version}" | |
| done |
…#7884) Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
What this PR does / why we need it:
fix: adding the logic to download the binary back...
Rlease Notes -- shows that we are now caching both CNI binaries.,,
Which issue(s) this PR fixes:
Fixes #