Sitelet https://github.com/kubernetes/kops/pull/18432
Skip to content

cilium: allow disabling masquerade in ENI IPAM mode - #18432

Merged
k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
hakman:cilium-masquerade
May 30, 2026
Merged

k8s-ci-robot merged 1 commit into
kubernetes:masterfrom
hakman:cilium-masquerade

Conversation

@hakman

@hakman hakman commented May 30, 2026 •

Copy link
Copy Markdown
Member

kOps forbids setting masquerade (disableMasquerade) when Cilium ENI IPAM is used, erroring with "Masquerade must be enabled when ENI IPAM is used". This blocks users who want Cilium's upstream no-masquerade behavior for ENI (e.g. private-topology clusters with NAT-gateway egress, or clusters using VPC endpoints), forcing them to patch the cilium-config ConfigMap after the fact, which races new nodes during rolling updates.

Remove the validation so masquerade can be set in either direction for ENI. The default is intentionally left unchanged (masquerade stays on): flipping it off by default breaks pod egress to external endpoints (e.g. IRSA -> STS) on public-topology clusters whose pod ENI IPs have no public address, as shown by a red pull-kops-e2e-cni-cilium-eni run. Users who can route pod egress without masquerading opt in via masquerade: false (or via extraConfig).

Fixes #18427

/cc @rifelpet @ameukam

@k8s-ci-robot
k8s-ci-robot requested review from ameukam and rifelpet May 30, 2026 06:16
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. area/api area/documentation labels May 30, 2026
@hakman hakman changed the title cilium: don't masquerade by default in ENI IPAM mode WIP cilium: don't masquerade by default in ENI IPAM mode May 30, 2026
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 30, 2026
@hakman
hakman force-pushed the cilium-masquerade branch from 921cbc8 to dbd8384 Compare May 30, 2026 07:51
@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 30, 2026
@hakman hakman changed the title WIP cilium: don't masquerade by default in ENI IPAM mode cilium: allow disabling masquerade in ENI IPAM mode May 30, 2026
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 30, 2026
kOps forbids setting masquerade (disableMasquerade) when Cilium ENI IPAM is
used, erroring with "Masquerade must be enabled when ENI IPAM is used". This
blocks users who want Cilium's upstream no-masquerade behavior for ENI (e.g.
private-topology clusters with NAT-gateway egress, or clusters using VPC
endpoints), forcing them to patch the cilium-config ConfigMap after the fact,
which races new nodes during rolling updates.

Remove the validation so masquerade can be set in either direction for ENI.
The default is intentionally left unchanged (masquerade stays on): flipping it
off by default breaks pod egress to external endpoints (e.g. IRSA -> STS) on
public-topology clusters whose pod ENI IPs have no public address, as shown by
a red pull-kops-e2e-cni-cilium-eni run. Users who can route pod egress without
masquerading opt in via masquerade=false (or via extraConfig).

Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
@hakman
hakman force-pushed the cilium-masquerade branch from dbd8384 to 80f06cf Compare May 30, 2026 07:57
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label May 30, 2026
@kubernetes kubernetes deleted a comment from k8s-ci-robot May 30, 2026
@ameukam

ameukam commented May 30, 2026

Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 30, 2026
@hakman

hakman commented May 30, 2026

Copy link
Copy Markdown
Member Author

/approve

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hakman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 30, 2026
@k8s-ci-robot
k8s-ci-robot merged commit 8a38af9 into kubernetes:master May 30, 2026
26 checks passed
@rifelpet

rifelpet commented May 30, 2026 •

Copy link
Copy Markdown
Member

@hakman should we disable masquerade in our cilium-eni grid jobs?

@hakman

hakman commented May 30, 2026

Copy link
Copy Markdown
Member Author

@rifelpet I tried in the first attempt and failed, we should create a private topology test and try there also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api area/documentation cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IPV4 masquerade cannot be disabled although it is recommended in cilium chart

4 participants