Skip to content

feat(chart): pass agent token hashes to the controller - #52

Merged
TheMeinerLP merged 1 commit into
mainfrom
feat/chart-agent-tokens
Nov 25, 2026
Merged

TheMeinerLP merged 1 commit into
mainfrom
feat/chart-agent-tokens

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Problem

Hosts that run Grus instances outside the cluster authenticate to the controller with a token. The controller only accepts a token whose hash it knows, and it learns those hashes from an environment variable. The chart had no way to set that variable, so an operator who deployed the controller with the chart could not enable an agent host without patching the Deployment by hand.

Approach

The chart now takes an existing Secret, the same way it already takes the admin token. Operators create the Secret with the hashes, and the controller reads them at start. Nothing changes when the Secret is not named, so existing releases render exactly as before.

Testing

Rendered the chart with the default values, with the CI lint values and with the S3 template backend, before and after the change: the output is byte-identical. With the Secret named, the controller container receives the variable from that Secret. helm lint passes with the CI values and with the Secret named.

The controller reads GRUS_AGENT_TOKENS to authenticate agent hosts, but
the chart never set it. Add agents.tokens.existingSecret and key; when
the Secret is named, the controller gets the variable from it. The
Secret holds only SHA-256 hashes of the agent tokens.
@TheMeinerLP
TheMeinerLP merged commit ccc250b into main Nov 25, 2026
7 checks passed
@TheMeinerLP
TheMeinerLP deleted the feat/chart-agent-tokens branch November 25, 2026 10:10
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.

1 participant