deploy/k8s: sticky SH_REFRESH_* settings in moca-settings (follow-up to #467)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Start from parse_args and write_settings in deploy/k8s/setup.sh, following how the SH_API_TOKEN_TTL_SECONDS path from #464 is handled, then add the three SH_REFRESH_* keys beside it. Add matching configMapKeyRef entries in deploy/k8s/base/control-plane.yaml, and document them in deploy/k8s/README.md §2. Done when the existing deploy-scripts tests cover storing, reusing, clearing and hash changes, and a max below idle is refused with a message naming both variables.
Written by the indexing model from the issue text.
Description
Follow-up from #467 (B14, #395), deferred there by review agreement.
Goal
An operator of deploy/k8s can set the refresh-token limits the same way as the token TTLs: as sticky setup.sh inputs stored in the moca-settings ConfigMap.
Current state
- #467 adds three control-plane settings with defaults in
packages/control-plane/src/main.ts:SH_REFRESH_IDLE_TTL_SECONDS(30 days)SH_REFRESH_MAX_TTL_SECONDS(90 days; must be ≥ idle, refused at boot otherwise)SH_REFRESH_REUSE_GRACE_SECONDS(30 s, 1–300)
- They are wired into
deploy/compose/docker-compose.ymlanddeploy/vm/env/control-plane.env.example. They are not wired intodeploy/k8s, where only the defaults apply. - #464 added the sticky plumbing for
SH_API_TOKEN_TTL_SECONDSandSH_SESSION_TOKEN_TTL_SECONDS:setup.sh'sparse_argsvalidation,write_settings(stored inmoca-settings, included in the settings hash that rolls the control plane), anddeploy/k8s/base/control-plane.yaml'sconfigMapKeyRefenv entries.
Scope
- Add the three variables to
setup.shnext to the token TTLs:- sticky, as the TTLs are (unset keeps the stored value, empty means the default);
- validated as whole seconds;
- grace limited to 1–300;
- max ≥ idle checked at setup time, so a bad pair fails the run instead of crash-looping the control plane.
- Add the
configMapKeyRefenv entries tobase/control-plane.yaml. - Document them in
deploy/k8s/README.md§2's sticky-settings list. - Extend the existing
deploy/k8ssetup tests for the new keys: stored, reused, cleared, and the hash changes.
Acceptance
SH_REFRESH_MAX_TTL_SECONDS=604800 deploy/k8s/setup.sh …stores the value, rolls the control plane once, and a re-run without it keeps the value.- A max below the idle limit is refused by
setup.shwith a message that names both variables. - The deploy-scripts tests pass.
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 9
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 139
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rossoctl/moca
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rossoctl/moca#421 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
Similar issues
-
area:desktop bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anthropics/claude-code#104801 ·
Maintainers usually reply within 1 day
-
check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
spudly/design-system#110 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixPossibly taken @ItsDeadlyProgrammer claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
appsmithorg/appsmith#42471 · 1 comment ·
Maintainers usually reply within 2 days