diff --git a/prog/weave-kube/launch.sh b/prog/weave-kube/launch.sh index bf081547..6706f7b0 100755 --- a/prog/weave-kube/launch.sh +++ b/prog/weave-kube/launch.sh @@ -27,14 +27,17 @@ setup_iptables_backend() { fi fi printf "iptables backend mode: %s\n" "$mode" - if [ "$mode" = "nft" ]; then + # The weave-kube image uses the iptables-nft tools as default + # from weave 2.9.0 onwards, but includes the legacy tools. If + # legacy is detected, change the default symlinks. + if [ "$mode" = "legacy" ]; then [ -n "$WEAVE_DEBUG" ] && echo "Changing iptables symlinks..." rm /sbin/iptables rm /sbin/iptables-save rm /sbin/iptables-restore - ln -s /sbin/iptables-nft /sbin/iptables - ln -s /sbin/iptables-nft-save /sbin/iptables-save - ln -s /sbin/iptables-nft-restore /sbin/iptables-restore + ln -s /sbin/iptables-legacy /sbin/iptables + ln -s /sbin/iptables-legacy-save /sbin/iptables-save + ln -s /sbin/iptables-legacy-restore /sbin/iptables-restore fi } diff --git a/reweave/CHANGELOG.md b/reweave/CHANGELOG.md index fa758900..eaef5041 100644 --- a/reweave/CHANGELOG.md +++ b/reweave/CHANGELOG.md @@ -2,6 +2,27 @@ All changes made to the weave net codebase since the fork will be documented in this file. +## 2.9.0-beta1 + +From this version onwards, we will assume that the default backend for `iptables` is `iptables-nft`. For backward compatibility, we will include `iptables-legacy` in the weave images, and provide a way to use that if required. + +### Changed + +* Upgraded golang.org/x/crypto to v0.31.1 +* Upgraded golang.org/x/net to v0.33.0 +* Which upgraded: + golang.org/x/mod v0.17.0 + golang.org/x/sync v0.10.0 + golang.org/x/term v0.27.0 + golang.org/x/text v0.21.0 +* Ran `go mod tidy` and `go mod vendor` + +### Added + +* The Dockerfile was modified to keep the default iptables backend (nft) for all Alpine-based images, and to include the legacy backend but not set it as default. +* The `weave` script was modified to accept and propogate a new environment variable called `IPTABLES_BACKEND`, whose default value is `nft`. If its value is set to `legacy`, the script will use the command `iptables-legacy` instead of `iptables` when invoking that tool. +* The `launch.sh` script, which is the entry point for the `weave-kube` and `weave-npc` images, was modified to assume the `nft` backend as default, and to change the backend only if legacy mode was autodiscovered or set via the existing environment variable `IPTABLES_BACKEND`. + ## 2.8.10 ### Changed diff --git a/reweave/build/Dockerfile b/reweave/build/Dockerfile index c930b456..9e7e6145 100644 --- a/reweave/build/Dockerfile +++ b/reweave/build/Dockerfile @@ -86,7 +86,7 @@ EOMAKE # Stage 3: Alpine Base # This stage exists in case there are any additional tweaks # required in the alpine base image. -FROM --platform=linux/${TARGETARCH} ${ALPINE_BASEIMAGE} as alpinebase +FROM --platform=linux/${TARGETARCH} ${ALPINE_BASEIMAGE} AS alpinebase # Any additional tweaks will appear here # Last update on top of alpine:3.19.1 RUN apk update \ @@ -124,11 +124,13 @@ RUN <