Skip to content

Conversation

@supreme-gg-gg
Copy link
Contributor

@supreme-gg-gg supreme-gg-gg commented Jan 29, 2026

Set serviceAccountName to use existing SA instead of creating a new SA for each agent pod. If not provided, will default to agent name and create a new SA. Alternatively, provide serviceAccountConfig that will be applied to every SA created by the agent controller. Close #1233

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Copy link
Contributor

@EItanya EItanya left a comment

Choose a reason for hiding this comment

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

One main comment, also can you add a golden test

Comment on lines 176 to 179
// +optional
ServiceAccountName *string `json:"serviceAccountName,omitempty"`
// +optional
ServiceAccountConfig *ServiceAccountConfig `json:"serviceAccountConfig,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a cel rule to ensure that only one of these can be set. If the ServiceAccountName is set, than we won't create the ServiceAccount. And if the config is set, then the name can't be changed.

Also can you add more comments to these fields to explain a bit about this interaction

Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
Signed-off-by: Jet Chiang <pokyuen.jetchiang-ext@solo.io>
@EItanya EItanya merged commit 7aa2010 into kagent-dev:main Jan 30, 2026
17 checks passed
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.

[FEATURE] Support k8s Service Account overrides in Agent templates

2 participants