Skip to content

deploy/k8s: sticky SH_REFRESH_* settings in moca-settings (follow-up to #467) #470

Open

Description

@pdettori

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

Scope

  1. Add the three variables to setup.sh next 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.
  2. Add the configMapKeyRef env entries to base/control-plane.yaml.
  3. Document them in deploy/k8s/README.md §2's sticky-settings list.
  4. Extend the existing deploy/k8s setup 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.sh with a message that names both variables.
  • The deploy-scripts tests pass.

Activity

  1. added
    enhancement
    on Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions