Repository navigation
v2.0.0 — Multi-cluster, write actions, dark mode, shortcuts
v2.0.0 — Multi-cluster, write actions, dark mode, shortcuts
OpenConsole 2.0.0 turns the dashboard from a single-cluster read-only viewer
into a full multi-cluster operator console with write actions, interactive
shells, structured observability, and a modern UI. Backend data is migrated
in place; everything else is drop-in.
Highlights
Multi-cluster
- Save many clusters, name them, switch via a dropdown in the header.
- Admin → Clusters: add / edit / activate / deactivate / delete each cluster
with validation against the live API server before saving. - Per-cluster RBAC: every permission row carries a
cluster_id
(NULL = "all clusters" wildcard). Rows written on 1.0.x automatically
become wildcards, so nothing breaks on upgrade. - Audit, logs and metrics all gain a cluster dimension.
Write actions (opt-in)
- Deployment restart (
deployments:restart) — rolling restart via
kubectl.kubernetes.io/restartedAtpatch. - Deployment scale (
deployments:scale) — Scale subresource,
bounded byMAX_REPLICAS(default 100), per-user rate limited. - Pod shell (
pods:exec) — interactive xterm.js terminal over SPDY,
with container picker, bash → ash → sh fallback, PS1 injection for images
that ship without a default prompt, 5-minute idle timeout, start/end
audit entries. - Deployment logs fan-out — one WebSocket, every pod×container
streamed with[pod/container]prefix, matching
kubectl logs -f -l … --all-containers --prefix. - Each write action is off by default on every role; admins opt in
per role + per namespace + per cluster.
Observability & security
- Structured logging via
log/slog.LOG_FORMAT=jsonfor Elastic /
Loki / Vector.X-Request-Idon every response, correlated with the
structured request log and the DB audit entry. - Prometheus
/metrics(zero-dep exposition) — HTTP request counters
by status bucket, duration sum, audit events, exec sessions, log
streams, deployment-action totals. /livez+/readyzsplit: liveness is process-only, readiness
pings SQLite and confirms the configured cluster is Ready.- Login brute-force gate: 5 fails per (IP, username) in 5 minutes
→ 429 +Retry-After, logged aslogin.locked. - Strict security headers: Content-Security-Policy, X-Frame-Options,
Referrer-Policy, Permissions-Policy on every response. - Admin guards: cannot delete your own account, cannot demote or
deactivate the last active administrator.
UI / UX
- Dark mode (Light / Dark / System). Persisted; follows OS when on
System. - Nav rail + section panel + content layout replaces the single
sidebar. Admin sub-sections live in the panel. - Card / List view toggle on every resource tab, remembered across
sessions via localStorage. Card view shows the hero chip + metrics;
List view is a dense sortable table with per-resource columns (Pods:
Ready / Restarts / Age; Deployments: Replicas; Services: Type /
Cluster IP / Ports; Jobs: Completions, etc.). Default is Card. - Sortable list columns — click any header to toggle asc → desc →
off. Sort choice persists per-tab via localStorage, so operators keep
their preferred ordering (Age descon Pods, say) across sessions. - Jobs tab (next to CronJobs) with its own status chips (Succeeded /
Running / Failed / Pending) and a Logs button that fans out across
every pod of the Job. The Pods tab no longer lists job-owned pods, so
CronJob runs and migration helpers stop cluttering the view. - Compact age column everywhere (
77d,3h,18m) alongside the
full timestamp on cards; list view shows the short form only. - Users / Groups / Roles: table + icon actions (✎ edit, 🗑 delete)
- Create/Edit modal with Enter-to-submit. Single Save replaces
Save / Save Groups / Save Roles trio.
- Create/Edit modal with Enter-to-submit. Single Save replaces
- Role Permissions: namespaces picker restricted to real values
(plus explicit* (all namespaces)wildcard) — no more typos saving
as "permissions" that silently never apply. - In-app confirm dialogs: every destructive action uses the themed
Modal instead of the browser's confirm/alert boxes. - Deployment restart uses a themed confirm modal; Scale opens a
compact dialog with ±1 stepper, Shift+↑/↓ for ±10, and offline warning
at 0 replicas. - Modals: ESC closes everything. Non-full modals clamp to viewport
so long content scrolls inside. All dropdowns portal to body so they
never fall behind cards or sidebars. - Pod cards: name truncates while the status chip stays on one line
(no more two-line headers). Healthy pods that have restarted show a
thin amber halo and the chip readsRunning · N restart(s). - Not Ready pods show an amber triangle inside the chip; hover reveals
the pod's latest Warning events (reason + message + lastSeen),
parsed from the Events API so you don't have to open a separate
modal to diagnose ImagePullBackOff / CrashLoopBackOff / etc. - Azure AD sign-in works under the new strict CSP — the callback
bootstrap script carries a per-response nonce. - Namespace tab preservation: switching namespace keeps the current
resource tab (Deployments, Pods, …) when the new namespace also
grants it. - Soft background: grid pattern replaced by a wide, low-opacity
gradient glow — eye-friendly for long sessions.
Keyboard shortcuts
⌘K/Ctrl+Kcommand palette (nav + namespaces + theme)?opens an in-app shortcut cheat sheet (also reachable via the
Shortcuts chip in the header)- Chord nav:
g d→ Dashboard,g a→ Admin - Theme chord:
t l / t d / t s - Dashboard:
[/]cycle tabs,rrefresh,/focus search,n
open palette - Log viewer:
ppause,wword wrap - Scale modal: Shift+Arrow for ±10
- Admin:
[/]cycle sub-sections [/]//are matched by physical key position, so Turkish Q
users pressğ/ü/.(same spot on the keyboard) and get the
same action — no need to reach for AltGr.
DX / release
- GitHub Actions CI: frontend build + backend vet/build/test + Docker
image build; publishes to GHCR onmain.
Upgrading from 1.0.x
The data migration is automatic. Pull the new image, roll the
Deployment, done. SQLite file stays where it is — the schema grows
(new clusters table + cluster_id column on namespace_permissions)
and the legacy kube_credentials row is copied into a cluster named
default with is_active=1 on the first boot so nothing goes offline.
# Optional: snapshot the SQLite file beforehand
kubectl -n kubernetes-openconsole exec deploy/kubernetes-openconsole -- \
cp /data/app.db /data/app.db.pre-2.0.0.bak
# Roll the image
kubectl -n kubernetes-openconsole set image deploy/kubernetes-openconsole \
openconsole=ghcr.io/vurulkan/kubernetes-openconsole:2.0.0
kubectl -n kubernetes-openconsole rollout status deploy/kubernetes-openconsoleClusterRole changes (only if you want write actions)
The new application permissions deployments:restart, deployments:scale,
and pods:exec are off by default. If you want to grant them to any role
through the Admin UI, the ServiceAccount's ClusterRole must also carry the
matching Kubernetes verbs:
# apps.deployments: patch → required for Restart
# apps.deployments/scale: get,update → required for Scale
# pods/exec: create → required for Pod Shell
rules:
- apiGroups: [""]
resources: [namespaces, pods, services, configmaps, events]
verbs: [get, list, watch]
- apiGroups: [""]
resources: [pods/log]
verbs: [get]
- apiGroups: [""]
resources: [pods/exec]
verbs: [create] # Pod Shell (optional)
- apiGroups: ["apps"]
resources: [deployments]
verbs: [get, list, watch, patch] # patch enables Restart
- apiGroups: ["apps"]
resources: [deployments/scale]
verbs: [get, update] # Scale
- apiGroups: ["networking.k8s.io"]
resources: [ingresses]
verbs: [get, list, watch]
- apiGroups: ["batch"]
resources: [cronjobs]
verbs: [get, list, watch]If you don't grant these verbs, 2.0.0 behaves exactly like 1.0.5 for your
users — read-only with the new UI. The write buttons remain hidden until
admins hand out the matching application permission.
New env variables (all optional, safe defaults)
| Variable | Default | Purpose |
|---|---|---|
LOG_LEVEL |
info |
debug / info / warn / error |
LOG_FORMAT |
text |
json for log shippers |
LOG_OUTPUT |
stdout |
stdout / stderr |
LOG_INCLUDE_AUDIT |
true |
Mirror audit DB rows to console |
LOG_ADD_SOURCE |
false |
Add file:line to every record |
APP_ENV, APP_VERSION |
— | Static labels in every log record |
MAX_REPLICAS |
100 |
Upper bound for the Scale action |
Rollback
Schema additions are backward compatible to a restore, not to the running
binary. If 2.0.0 misbehaves:
kubectl -n kubernetes-openconsole exec deploy/kubernetes-openconsole -- \
cp /data/app.db.pre-2.0.0.bak /data/app.db
kubectl -n kubernetes-openconsole set image deploy/kubernetes-openconsole \
openconsole=ghcr.io/vurulkan/kubernetes-openconsole:1.0.5Image
ghcr.io/vurulkan/kubernetes-openconsole:2.0.0ghcr.io/vurulkan/kubernetes-openconsole:latest