File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ readonly KUBE_CONTAINER_RSYNC_PORT=8730
95
95
kube::build::get_docker_wrapped_binaries () {
96
96
local arch=$1
97
97
local debian_base_version=v2.0.0
98
- local debian_iptables_version=v12.0.0
98
+ local debian_iptables_version=v12.0.1
99
99
# ## If you change any of these lists, please also update DOCKERIZED_BINARIES
100
100
# ## in build/BUILD. And kube::golang::server_image_targets
101
101
local targets=(
Original file line number Diff line number Diff line change 16
16
17
17
REGISTRY? ="staging-k8s.gcr.io"
18
18
IMAGE =$(REGISTRY ) /debian-iptables
19
- TAG? =v12.0.0
19
+ TAG? =v12.0.1
20
20
ARCH? =amd64
21
21
ALL_ARCH = amd64 arm arm64 ppc64le s390x
22
22
TEMP_DIR: =$(shell mktemp -d)
Original file line number Diff line number Diff line change @@ -19,12 +19,22 @@ set -e
19
19
# Detect whether the base system is using iptables-legacy or
20
20
# iptables-nft. This assumes that some non-containerized process (eg
21
21
# kubelet) has already created some iptables rules.
22
+
23
+ # Bugs in iptables-nft 1.8.3 may cause it to get stuck in a loop in
24
+ # some circumstances, so we have to run the nft check in a timeout. To
25
+ # avoid hitting that timeout, we only bother to even check nft if
26
+ # legacy iptables was empty / mostly empty.
27
+
22
28
num_legacy_lines=$( (iptables-legacy-save || true ; ip6tables-legacy-save || true) 2> /dev/null | grep ' ^-' | wc -l)
23
- num_nft_lines=$( (iptables-nft-save || true ; ip6tables-nft-save || true) 2> /dev/null | grep ' ^-' | wc -l)
24
- if [ " ${num_legacy_lines} " -ge " ${num_nft_lines} " ]; then
29
+ if [ " ${num_legacy_lines} " -ge 10 ]; then
25
30
mode=legacy
26
31
else
27
- mode=nft
32
+ num_nft_lines=$( (timeout 5 sh -c " iptables-nft-save; ip6tables-nft-save" || true) 2> /dev/null | grep ' ^-' | wc -l)
33
+ if [ " ${num_legacy_lines} " -ge " ${num_nft_lines} " ]; then
34
+ mode=legacy
35
+ else
36
+ mode=nft
37
+ fi
28
38
fi
29
39
30
40
update-alternatives --set iptables " /usr/sbin/iptables-${mode} " > /dev/null
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ def debian_image_dependencies():
122
122
digest = _digest (_DEBIAN_IPTABLES_DIGEST , arch ),
123
123
registry = "k8s.gcr.io" ,
124
124
repository = "debian-iptables" ,
125
- tag = "v12.0.0 " , # ignored, but kept here for documentation
125
+ tag = "v12.0.1 " , # ignored, but kept here for documentation
126
126
)
127
127
128
128
container_pull (
You can’t perform that action at this time.
0 commit comments