Skip to content

Commit 4e27477

Browse files
committed
nodeup: include Ubuntu in markSecondaryENIsUnmanaged guard
Add Ubuntu >= 22.04 to the guard clause so kops writes the Unmanaged=yes .network file for secondary ENIs on Ubuntu, mirroring the existing AL2023 / Debian 12+ handling. Without this, systemd-networkd keeps DHCP-ing on secondary ENIs managed by Cilium / AWS VPC CNI.
1 parent 324ae1e commit 4e27477

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

nodeup/pkg/model/networking/eni_networking.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,12 @@ MACAddressPolicy=none
121121
// markSecondaryENIsUnmanaged tells systemd-networkd to ignore secondary ENIs (ens6+).
122122
// Without this, systemd-networkd fully manages secondary ENIs via DHCP, creating
123123
// competing routes that interfere with CNI networking.
124-
// AL2023 and Debian 12+.
124+
// AL2023, Debian 12+, and Ubuntu 22.04+.
125125
// ref: https://github.com/aws/amazon-vpc-cni-k8s/issues/3524
126126
func markSecondaryENIsUnmanaged(c *fi.NodeupModelBuilderContext, dist distributions.Distribution) {
127127
if !(dist == distributions.DistributionAmazonLinux2023 ||
128-
(dist.IsDebian() && dist.Version() >= 12)) {
128+
(dist.IsDebian() && dist.Version() >= 12) ||
129+
(dist.IsUbuntu() && dist.Version() >= 22.04)) {
129130
return
130131
}
131132

0 commit comments

Comments
 (0)