Remove iptables-wrapper from trixie distroless-iptables build #4612
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.46) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 456 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.366
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #4612"
general
weight: 0.35
danwinship
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
k8s 1.38 no longer requires the iptables-wrapper script (https://github.com/kubernetes/kubernetes/pull/143065) so this drops it, simplifying the image.
Older k8s releases still require iptables-wrapper and won't work correctly without it. It seems that we've currently forked into using the trixie build for master/1.38 only, and the bookworm build for older releases (https://github.com/kubernetes/release/pull/4531#discussion_r403358322). So I only changed things for the trixie build and left the bookworm build as it was. Can someone confirm that I understood this correctly, and this is OK (we don't expect to move older releases away from bookworm)? (@cpanato @saschagrunert?)
/assign @BenTheElder @aojea
diff from the current image:
/etc/alternatives/should have been there before, but there was a bug iniptables-wrapper-installer.shthat made it use the plain symlink install method on Debian rather than usingupdate-alternativesas was intended, so in the old image,/usr/sbin/iptablesended up being a symlink directly to/usr/sbin/iptables-wrapperrather than being a symlink to/etc/alternatives/iptableswhich was a symlink to/usr/sbin/iptables-wrapper. But anyway, it's just symlinks, so it doesn't hurt anything having it in the image, and it's easier to do it this way than to write the symlinks by hand. (Also, the symlinks don't count as being part of the dpkg, and since we're creating them from the build stage rather than the (almost-)final stage now, we have to explicitly copy them over.)The addition of
/usr/share/base-files/(and the empty/usr/share/man/dir) is because we need to do theclean-distroless.shstep in the build stage rather than the (almost-)final stage now since we no longer have things likermin the latter stage. But that means we're only cleaning out stuff from the debian base, not from the distroless base. We could fix this by rearranging the steps a little, but it seems like the files are small and this doesn't really matter?Does this PR introduce a user-facing change?
``
release-noteiptables-wrapperThe trixie version of distroless-iptables no longer includes the
binary.
``