-
Notifications
You must be signed in to change notification settings - Fork 245
chore: install container-networkingplugins from dalec packages replacing old share #7781
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?
Changes from all commits
a57d623
2143454
87bd630
fd0a926
1813d63
d3d343d
7057b3b
44fadc8
9731d5e
2c2d1b7
7dc4223
ea5e013
1317f20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -93,6 +93,12 @@ installCriCtlPackage() { | |
| stub | ||
| } | ||
|
|
||
| installCNI() { | ||
| retrycmd_get_tarball 120 5 "${CNI_DOWNLOADS_DIR}/refcni.tar.gz" "https://${PACKAGE_DOWNLOAD_BASE_URL}/cni-plugins/v1.6.2/binaries/cni-plugins-linux-amd64-v1.6.2.tgz" || exit $ERR_CNI_DOWNLOAD_TIMEOUT | ||
| extract_tarball "${CNI_DOWNLOADS_DIR}/refcni.tar.gz" "$CNI_BIN_DIR" | ||
|
Comment on lines
+97
to
+98
|
||
| } | ||
|
|
||
|
|
||
| installStandaloneContainerd() { | ||
| stub | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,14 @@ installCriCtlPackage() { | |
| stub | ||
| } | ||
|
|
||
| installCNI() { | ||
| #This is an old version because dalec needs to be updated for osguard/flatcar | ||
| # https://github.com/Azure/dalec-build-defs/blob/main/specs/containernetworking-plugins/containernetworking-plugins-1.9.0.yaml | ||
| retrycmd_get_tarball 120 5 "${CNI_DOWNLOADS_DIR}/refcni.tar.gz" "https://${PACKAGE_DOWNLOAD_BASE_URL}/cni-plugins/v1.6.2/binaries/cni-plugins-linux-amd64-v1.6.2.tgz" || exit $ERR_CNI_DOWNLOAD_TIMEOUT | ||
| extract_tarball "${CNI_DOWNLOADS_DIR}/refcni.tar.gz" "$CNI_BIN_DIR" | ||
|
Comment on lines
+18
to
+19
|
||
| } | ||
|
|
||
|
|
||
| # CSE+VHD can dictate the containerd version, users don't care as long as it works | ||
| installStandaloneContainerd() { | ||
| local desiredVersion="${1:-}" | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -68,6 +68,48 @@ installDeps() { | |||||||||
| fi | ||||||||||
| } | ||||||||||
|
|
||||||||||
|
||||||||||
| # The version used to be determined by RP/toggle but is now just hardcoded in the VHD as it rarely changes and requires a node image upgrade anyway | |
| # Latest VHD should have the untar, older should have the tgz. And who knows will have neither. |
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.
we shouldn't have references to RP/ "toggles" if we can help it
Copilot
AI
Feb 4, 2026
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.
Same issue as Ubuntu: The error message says "WARNING" but the code exits fatally. This should say "ERROR" or handle the multiple versions gracefully.
| echo "WARNING: containernetworking-plugins package versions array has more than one element." | |
| echo "ERROR: containernetworking-plugins package versions array has more than one element." |
Copilot
AI
Feb 3, 2026
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.
Spelling error in comment: "vesion" should be "version"
Copilot
AI
Feb 4, 2026
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.
Whitespace-only change that removes trailing whitespace. While this is good hygiene, it's unrelated to the main PR purpose of changing CNI plugin installation.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -52,6 +52,49 @@ installDeps() { | |||||
| fi | ||||||
| } | ||||||
|
|
||||||
| # Reference CNI plugins is used by kubenet and the loopback plugin used by containerd 1.0 (dependency gone in 2.0) | ||||||
| # The version used to be deteremined by RP/toggle but are now just hardcoded in vhd as they rarely change and require a node image upgrade anyways | ||||||
| # Latest VHD should have the untar, older should have the tgz. And who knows will have neither. | ||||||
| installCNI() { | ||||||
| echo "installing ubuntu containernetworking-plugins" | ||||||
| # Old versions of VHDs will not have components.json. If it does not exist, we will fall back to the hardcoded download for CNI. | ||||||
| # Network Isolated Cluster / Bring Your Own ACR will not work with a vhd that requires a hardcoded CNI download. | ||||||
| if [ ! -f "$COMPONENTS_FILEPATH" ] || ! jq '.Packages[] | select(.name == "containernetworking-plugins")' < $COMPONENTS_FILEPATH > /dev/null; then | ||||||
| # For older VHDs which do not have containernetworking-plugins in components.json, it should have the older cni-plugins tgz extracted and installed at VHD build time. | ||||||
| # We will just use what is already installed on the VHD. | ||||||
| echo "components.json not found or containernetworking-plugins not found in components.json, assuming older VHD with cni-plugins already installed." | ||||||
| return | ||||||
| fi | ||||||
|
|
||||||
| #always just use what is listed in components.json so we don't have to sync. | ||||||
| cniPackage=$(jq ".Packages" "$COMPONENTS_FILEPATH" | jq ".[] | select(.name == \"containernetworking-plugins\")") || exit $ERR_CNI_VERSION_INVALID | ||||||
|
|
||||||
| os=${OS} | ||||||
| os_version=${UBUNTU_RELEASE} | ||||||
| PACKAGE_VERSIONS=() | ||||||
| updatePackageVersions "${cniPackage}" "${os}" "${os_version}" | ||||||
| if [ ${#PACKAGE_VERSIONS[@]} -eq 0 ]; then | ||||||
| echo "no containernetworking-plugins versions for ${os} ${os_version}" | ||||||
| return | ||||||
| fi | ||||||
|
|
||||||
| # Ensure exactly one containernetworking-plugins package version is present; multiple versions are not supported. | ||||||
| # shellcheck disable=SC3010 | ||||||
| if [ ${#PACKAGE_VERSIONS[@]} -gt 1 ]; then | ||||||
| echo "WARNING: containernetworking-plugins package versions array has more than one element." | ||||||
|
||||||
| echo "WARNING: containernetworking-plugins package versions array has more than one element." | |
| echo "ERROR: containernetworking-plugins package versions array has more than one element." |
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.
we've been on 1.6.2 this whole time? :D
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.
yes. Paul confirmed it's intended.