Skip to content

feat(ateapi): a default egress policy on the ActorTemplate - #1868

Closed
Quentin Bisson (QuentinBisson) wants to merge 1 commit into
agent-substrate:mainfrom
giantswarm:upstream/actortemplate-default-egress-policy
Closed

Quentin Bisson (QuentinBisson) wants to merge 1 commit into
agent-substrate:mainfrom
giantswarm:upstream/actortemplate-default-egress-policy

Conversation

@QuentinBisson

Copy link
Copy Markdown
Contributor

Problem

A golden Actor is created by the template reconciler, so no client can create its EgressPolicy before it boots. atenet denies every request of an Actor without a policy, and a workload that fetches skills or plugins during the golden boot (kagent-dev/kagent#2604) fails with 403 and never gets its snapshot. #1324 discusses the design.

Change

ActorTemplate.default_egress_policy, an EgressPolicyTemplate (the rules of an EgressPolicy). CreateActor copies it onto the Actor as its default policy in the same transaction as the Actor row; a policy the caller passes wins; a template without the field behaves as before; the copy is a snapshot. Store contract and control-API tests cover the transactional write and the precedence.

@QuentinBisson

Copy link
Copy Markdown
Contributor Author

One gap this does not close: the credential provider resolves Secrets per atespace, and the golden Actor boots in the reconciler's atespace (ate-golden), not the template's. An installation must grant ate-golden the same namespaces as the template's atespace for the injected credentials to resolve during the golden boot; a follow-up could let the template name the atespace its golden Actor should inherit policies from.

@zoez7

Copy link
Copy Markdown
Collaborator

Calling UpdateActor(new_template) will update the actor's template, it's not clear to me what should happen to the actor's egress policy during the update? Is it expected to merge the egress policy from the new template?

ActorTemplate.default_egress_policy (an EgressPolicyTemplate: the rules
of an EgressPolicy) is copied onto every Actor created from the template
as its "default" EgressPolicy, in the same transaction as the Actor row.
That covers the golden Actor the template reconciler creates, which no
client can give a policy before it boots; without one atenet denies all
of its egress, so a workload that fetches skills or plugins before
readyz never gets its golden snapshot. A policy passed by the caller
wins over the template's; a template without the field behaves as
before. The copy is a snapshot: a later template change does not touch
existing Actors.

Refs agent-substrate#1324

Signed-off-by: QuentinBisson <quentin@giantswarm.io>
@QuentinBisson
Quentin Bisson (QuentinBisson) force-pushed the upstream/actortemplate-default-egress-policy branch from 37b367a to 8f2c715 Compare September 25, 2026 13:28
@QuentinBisson

Copy link
Copy Markdown
Contributor Author

Closing in favour of #1558, which implements the #1324 design and predates this one.

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

Labels

area/api User-facing API changes area/api-machinery area/network kind/feature An enhancement / feature request or implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants