Repository navigation
Helm: mount Medic's gateway token Secret; NOTES prints the command that fills it - #4466
Merged
samarmstrong merged 2 commits intoNov 16, 2026
Merged
Conversation
…at fills it
- values: medic.gateway.tokenSecret.{name,key}; name "" means
<release>-medic-gateway-token. viewer.passwordSecret is now optional.
- The gateway mounts both Secrets through one projected volume, each source
optional, no subPath, so it starts with neither (no_credential) and picks up a
Secret filled later without a restart. VIGIL_MEDIC_GATEWAY_TOKEN_FILE is set.
- vigil.medic.required no longer requires the password Secret. The chart never
renders the token Secret, so helm upgrade can't overwrite it.
- NOTES prints one command: kubectl exec ... service_account token <user>
piped into kubectl create secret --dry-run=client -o yaml | kubectl apply.
- docs/medic/enable.md: Helm section rewritten (fresh install, GitOps and
external stores, moving an upgraded site); intro covers the token.
Closes #4430
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
|
🏭 Handed the merge conflicts back to the agent that opened this (1 of 3): merge conflicts with main. |
Resolve docs/medic/enable.md: Compose (#4458) and Helm (this PR) both read with a host-minted token now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
samarmstrong
deleted the
factory/4430-helm-the-gateway-mounts-a-token-c42e8c8a
branch
November 16, 2026 07:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4430 (part of #4425)
What changed
values.yaml: addsmedic.gateway.tokenSecret.name(if empty,<release>-medic-gateway-token) and.key(token).viewer.passwordSecretis now optional.viewer.usernamestays required, because it names the account thetokencommand creates._medic.tpl:vigil.medic.requiredno longer requirespasswordSecret.name. A new helper,vigil.medicGateway.tokenSecret, gives the token Secret's name. The chart never renders that Secret: no hook, no lookup, no minting. Sohelm upgradecan't overwrite what the operator put there.medic-gateway.yaml: mounts oneprojectedvolume at/run/secretswith twosecretsources, bothoptional: true:medic_gateway_token;medic_viewer_password, only when one is set.It keeps
defaultMode: 0440and the fsGroup, and uses no subPath and no env.VIGIL_MEDIC_GATEWAY_TOKEN_FILEis now set explicitly.NOTES.txt: prints one command,kubectl exec … python -m core.auth.service_account token <user> | kubectl create secret generic <tokenSecret> --from-file=token=/dev/stdin --dry-run=client -o yaml | kubectl apply -f -. The old password steps are gone.docs/medic/enable.md: the Helm section is rewritten to cover a fresh install with no password Secret, GitOps and external secret stores, and moving a site set up before tokens. The intro bullets now say how the gateway authenticates on each shape and describetoken. The Compose text is unchanged (Compose: enable-compose.sh mints Medic's token, and the gateway starts with either credential file missing #4429).Verification
Ran
helm lintandhelm templatewithci/default-values.yamland Medic on:passwordSecret.nameset, it has both sources.viewer.usernamestill fails, with the updated message./_gw/statusand a real read (GET /api/orchestrator/status) went through the gateway from Medic's pod. The command I ran was the one taken fromhelm get notes.{"state":"no_credential","credential":"none"}and the read returned 502. After running the printed command, the gateway reportedcredential: tokenwithin about 45 s and the read returned 200; state wasokshortly after. It was the same gateway pod, with 0 restarts.origin/main's chart with amedic-viewerpassword Secret and ranensure: reads returned 200 oncredential: password. Then I ranhelm upgradeto this chart with the same values:minted). The gateway moved tocredential: tokenwith the read returning 200, in the same pod with 0 restarts, and loggedauth_credential previous=password → token. A password login then returned 401.Did not run
medic-tests/kind/e2e.sh. It still installs with a password Secret, which this chart still accepts, and the CI Medic Helm workflow runs it.Blocked by the machine
helm templateandhelm lintfailed until I ranhelm dependency build. The kind run strips the dependencies, ase2e.shdoes.vigil-medic,vigil-medic-gateway,vigil-backend) and create a kind cluster myself.helm upgrade. This was a problem in my test setup, not in the chart.🤖 Generated with Claude Code