Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connectivity: Run echo-ingress-l7-via-hostport-with-encryption for IPsec #2759

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions connectivity/builder/echo_ingress_l7.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,27 @@ func (t echoIngressL7) build(ct *check.ConnectivityTest, _ map[string]string) {
WithCondition(func() bool {
return versioncheck.MustCompile(">=1.16.0")(ct.CiliumVersion)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll probably need to update this a bit then, to account for the fix backport.

}).
WithFeatureRequirements(
features.RequireEnabled(features.L7Proxy),
// Once https://github.com/cilium/cilium/issues/33168 is fixed, we
// can enable for IPsec too.
features.RequireMode(features.EncryptionPod, "wireguard"),
// Otherwise pod->hostport traffic will be policy
// denied on the ingress of dest node when
// routing=vxlan + kpr=1 + bpf_masq=1
features.RequireEnabled(features.EncryptionNode),
).
WithCondition(func() bool {
if ok, _ := ct.Features.MatchRequirements(features.RequireEnabled(features.L7Proxy)); !ok {
return false
}
// wireguard requires node encryption, otherwise
// pod->hostport traffic will be policy denied on the
// ingress of dest node when routing=tunnel + kpr=1.
if ok, _ := ct.Features.MatchRequirements(features.RequireMode(features.EncryptionPod, "wireguard")); ok {
ok, _ = ct.Features.MatchRequirements(features.RequireEnabled(features.EncryptionNode))
return ok
}
// ipsec can't do node encryption, so just skip the test when routing=tunnel + kpr=1.
if ok, _ := ct.Features.MatchRequirements(features.RequireMode(features.EncryptionPod, "ipsec")); ok {
ok, _ = ct.Features.MatchRequirements(
features.RequireEnabled(features.Tunnel),
features.RequireEnabled(features.KPRMode),
)
return !ok
}
return false
}).
WithCiliumPolicy(echoIngressL7HTTPPolicyYAML). // L7 allow policy with HTTP introspection
WithScenarios(tests.PodToHostPort()).
WithExpectations(expectation)
Expand Down
Loading