Skip to content

gateway: add Kind E2E for egress rules and credential injection - #588

Merged
yongruilin merged 2 commits into
google:mainfrom
yongruilin:gateway-egress-e2e
Nov 14, 2026
Merged

yongruilin merged 2 commits into
google:mainfrom
yongruilin:gateway-egress-e2e

Conversation

@yongruilin

@yongruilin yongruilin commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Add the Kind E2E for Task.spec.gateway (part of #549): a task reaches what its Gateway allows, with the credential injected, and nothing else.

  • TestE2E_GatewayEgress checks that an in-cluster HTTPS echo server receives the labeled Secret's value instead of the task's placeholder.
  • It also checks that a credential from an unlabeled Secret, a host without a rule, ax-server (though a rule names it), and a task without a Gateway are refused, and that editing or deleting the Gateway does not affect a running task.
  • The E2E setup enables Substrate's Kubernetes credential provider and runs Substrate's own script that lets the egress gateway trust the echo server's CA.

An in-cluster echo server shows that the allowed host receives the
credential instead of the task's placeholder. The E2E setup enables the
Kubernetes credential provider for it.

@mayawang mayawang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, great coverage of the credential and refusal paths. Could the suite also check that a task can't reach ax-server through a Gateway rule that names it? That's the follow-up from #582

The test's Gateway names ax-server and the task gets the egress gateway's
503. Also retry the echo request after each resume, for up to two minutes
as Substrate's own tests do.
@yongruilin

Copy link
Copy Markdown
Collaborator Author

LGTM, great coverage of the credential and refusal paths. Could the suite also check that a task can't reach ax-server through a Gateway rule that names it? That's the follow-up from #582

Yea.. I missed this part. Added.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants