Skip to content

feat(config): store synced service account tokens in secrets by default - #4277

Open
blacksoxx wants to merge 1 commit into
loft-sh:mainfrom
blacksoxx:satokens-secrets-default
Open

blacksoxx wants to merge 1 commit into
loft-sh:mainfrom
blacksoxx:satokens-secrets-default

Conversation

@blacksoxx

@blacksoxx blacksoxx commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

What issue type does this pull request address?
/kind enhancement

What does this pull request do? Which issues does it resolve?
resolves #4276

Flips the default of sync.toHost.pods.useSecretsForSATokens to true, so the service account tokens of synced pods are stored in a Secret owned by the host pod instead of in a host pod annotation. The comment now says what the annotation mode exposes. chart/values.yaml and chart/values.schema.json are regenerated from the config sources. Setting the value to false restores the previous behaviour.

Please provide a short message that should be published in the vcluster release notes
Service account tokens of synced pods are now stored in Secrets by default (sync.toHost.pods.useSecretsForSATokens: true); set it to false to keep the previous pod annotation behaviour.

What else do we need to know?
The e2e configurations and test/commonValues.yaml already run with the secrets mode. Existing host pods are not touched; new pods get the Secret.


Note

Medium Risk
Changes default credential storage for newly synced pods and could affect RBAC/Secret volume expectations; existing pods are unchanged but upgrades behave differently unless explicitly set to false.

Overview
Default storage for synced pod service account tokens now uses Secrets (useSecretsForSATokens: true) in config/values.yaml and chart/values.yaml, with matching schema/docs updates in config/config.go and chart/values.schema.json.

Comments now call out that the legacy pod annotation path exposes tokens to anyone who can read pods in the host namespace. Set sync.toHost.pods.useSecretsForSATokens to false to keep the old annotation behavior.

Reviewed by Cursor Bugbot for commit dd4ab2f. Bugbot is set up for automated code reviews on this repo. Configure here.

With sync.toHost.pods.useSecretsForSATokens unset, the token requested for a synced pod's service account was written into a host pod annotation and mounted through the downward API, where everyone who can read pods in the host namespace can read it. The default is now true, so the token lives in a Secret owned by the host pod. Setting the value to false keeps the previous behaviour. chart/values.yaml and chart/values.schema.json are regenerated.

Signed-off-by: Youssef Omar Bouden <youssef.bouden2002@gmail.com>

This branch has not been deployed

No deployments
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.

Service account tokens of synced pods are stored in host pod annotations by default

1 participant