Repository navigation
api: add the Gateway API and manifest validation - #567
Conversation
|
|
7e4dc85 to
63b9872
Compare
63b9872 to
3e7a1e9
Compare
spec.egress is Agent Substrate's EgressRule, so make generate links the Substrate protos from the Go module cache for buf. Part of google#549.
3e7a1e9 to
eeff36b
Compare
| ) | ||
|
|
||
| // ValidateGateway reports the first problem with a gateway that would make it | ||
| // unusable. Agent Substrate checks the rest of each egress rule. |
There was a problem hiding this comment.
nit: When does the substrate check the egress? During actor creation? If yes, can we make it clear here about the lifecycle because the our validation blocks the bad input before real actor creation while the substrate not?
There was a problem hiding this comment.
Substrate checks when the rules are written to the Task actor's EgressPolicy, at Task creation; the ValidateGateway runs earlier, when the Gateway is applied (wired in the follow-up PR).
I actually thought of validating everything Substrate validates but found it too heavy, I would prefer we can have a way to directly utilize Substrate's validators if possible. I updated the comments and left a TODO.
|
Lgtm overall with the small nit above |
eeff36b to
134ac31
Compare
mayawang
left a comment
There was a problem hiding this comment.
LGTM, really nice that it reuses Substrate's EgressRule directly. One doc nit: credential injection 403s unless the task's atespace is granted the secret's namespace in Substrate's credential-provider namespace policy (default deny). Worth a line in the "Injecting credentials" section so first-timers don't hit a mystery 403.
Add the Gateway YAML mapping, docs, and admission checks for egress rules. ax-server rejects spec.gateway until Gateways are served. Part of google#549.
134ac31 to
99767f1
Compare
Thanks! Good catch, I've added a line to "Injecting credentials". |
API for the
Gatewayresource (part of #549). Nothing is served yet:ax applydoes not acceptkind: Gateway, and ax-server rejects a task that setsspec.gateway.gateway.proto, the Gateway RPCs, andTaskSpec.gateway.spec.egressis Agent Substrate'sEgressRule, somake generatelinks the Substrate module for buf.ValidateGatewayrequires one kind per rule and rejects*,localhost, IP addresses, credentials outside exacthttpshosts, and passthrough rules without ports. Substrate validates the rest.docs/manifests.md.Follow-ups: (1) store, server, and CLI; (2) enforcement through the actor's Substrate
EgressPolicy, with E2E.