Skip to content

feat: add k8s deployment, session expiry, and logout button#881

Open
midy177 wants to merge 4 commits into
t8y2:mainfrom
midy177:main
Open

feat: add k8s deployment, session expiry, and logout button#881
midy177 wants to merge 4 commits into
t8y2:mainfrom
midy177:main

Conversation

@midy177

@midy177 midy177 commented Jun 8, 2026

Copy link
Copy Markdown

feat: add k8s deployment, session expiry, and logout button

wuly added 4 commits June 8, 2026 16:41
- deploy/k8s: add Kubernetes manifests (Deployment, Service, ConfigMap)
  with emptyDir storage and startup script to inject PG/Redis connections
  via API; supports standalone, sentinel, and cluster Redis modes
- auth: replace HashSet<String> sessions with HashMap<String, Instant>;
  sessions expire after DBX_SESSION_TTL_HOURS (default 12h); hourly
  background purge task added
- feat(toolbar): add logout button shown only when auth is required
- deploy/Dockerfile: add curl and jq to runtime stage; fix cross-compile
  deps for building amd64 on arm64 hosts

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Must Fix

1. CI failures

  • Frontend: AppToolbar.vue failed format check — run prettier to fix
  • Rust: compilation error in tests — connection.rs:214 still uses HashSet::new() but WebState.sessions has been changed to HashMap<String, Instant>. Replace it with HashMap::new()

2. Hardcoded password in deployment.yaml

- name: DBX_PASSWORD
  value: "ZpFoJGrche4lrUj0"

Real passwords should not be committed. Use a placeholder or a Kubernetes Secret instead.

3. Private registry references in README.md and deployment.yaml

hub.yeastardigital.com/novo-middleware/dbx:latest is an internal registry. Public repo docs and manifests should use a generic image name (e.g. t8y2/dbx or a placeholder).

🟡 Suggestions

4. Three unrelated changes in one PR (K8s deployment, session expiry, logout button) — consider splitting into separate PRs for easier review and rollback

✅ Well Done

  • Session expiry design is clean: HashMap<String, Instant> replacing HashSet<String>, with DBX_SESSION_TTL_HOURS env var and background cleanup
  • is_session_valid and purge_expired_sessions encapsulated on WebState, clear separation of concerns
  • Logout button only shown when needsAuth is true
  • i18n covers en + zh-CN

@t8y2 t8y2 force-pushed the main branch 6 times, most recently from 0eb730f to c9b3292 Compare June 14, 2026 18:27
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.

2 participants