Skip to content

Commit 35d3015

Browse files
Merge pull request #134 from trakrf/worktree-miks2u+tra-843-preview-jwt-ttl-900
feat(trakrf-backend): per-env JWT access-token TTL → 900 (preview + prod) (TRA-843)
2 parents 9bcc587 + 6d88bef commit 35d3015

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

argocd/root/templates/trakrf-backend.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
*/ -}}
1616
{{- range $env, $cfg := $.Values.envs }}
1717
{{- $base := printf "database:\n name: trakrf\n user: trakrf-app\n credentialsSecret: trakrf-app-credentials\n host: %s\nmigrate:\n database: trakrf\n user: trakrf-migrate\n credentialsSecret: trakrf-migrate-credentials\n host: %s\nconfig:\n appEnv: %s\n environmentLabel: %q\n" $cfg.dbHost $cfg.dbHost $env $cfg.environmentLabel }}
18+
{{- /* Per-env access-token TTL (TRA-843). Appended to the config block BEFORE
19+
the top-level image: key below. Empty falls back to the chart default in
20+
helm/trakrf-backend/values.yaml ("3600"). */ -}}
21+
{{- if $cfg.jwtExpirationSeconds }}
22+
{{- $base = printf "%s jwtExpirationSeconds: %q\n" $base $cfg.jwtExpirationSeconds }}
23+
{{- end }}
1824
{{- if $cfg.imageTag }}
1925
{{- $base = printf "%simage:\n tag: %q\n" $base $cfg.imageTag }}
2026
{{- end }}

argocd/root/values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ namespaces:
4141
# index.html. Empty / "prod" / "production" → no
4242
# banner. Same main image everywhere; the banner is
4343
# purely this runtime value.
44+
# jwtExpirationSeconds — access-token TTL (seconds) → backend JWT_EXPIRATION
45+
# (TRA-843). Per-env so the short-TTL half of the
46+
# refresh design can land on preview ahead of prod.
47+
# Empty falls back to the chart default
48+
# (helm/trakrf-backend/values.yaml: "3600").
49+
# preview="900" (refresh live + soaked). prod also
50+
# "900" (Mike's call, 2026-05-30 cutover) — assumes
51+
# PR #416's refresh endpoint is on the :prod image;
52+
# if not, prod users hit 15-min re-logins. Takes
53+
# effect only on the next apply-root-app.sh.
4454
# dbCluster.enabled — false skips emitting the CNPG Cluster
4555
# Application entirely.
4656
# dbCluster.fullnameOverride — drives CNPG Cluster name + Argo App name.
@@ -57,6 +67,7 @@ envs:
5767
mqttIp: ""
5868
imageTag: ""
5969
environmentLabel: preview
70+
jwtExpirationSeconds: "900"
6071
dbCluster:
6172
enabled: true
6273
fullnameOverride: trakrf-db-preview
@@ -74,6 +85,11 @@ envs:
7485
# window; it flips to empty (no banner) as part of the Saturday cutover.
7586
imageTag: prod
7687
environmentLabel: GKE pre-prod
88+
# TRA-843: prod short-TTL realized here too (Mike's call, 2026-05-30 cutover
89+
# window). Assumes the refresh endpoint (PR #416) is on the :prod image —
90+
# otherwise prod users hit 15-min re-logins with no refresh. Takes effect on
91+
# the next scripts/apply-root-app.sh against the live cluster.
92+
jwtExpirationSeconds: "900"
7793
dbCluster:
7894
enabled: true
7995
fullnameOverride: trakrf-db-prod

0 commit comments

Comments
 (0)