Repository navigation
v2.6.0 — YAML view/edit with Monaco + server dry-run
v2.6.0 — YAML view/edit with Monaco + server dry-run
Every resource that already had a YAML button now opens a view/edit modal
powered by Monaco. Operators can audit the YAML, flip to Edit, run a
server-side dry-run, and apply with a confirmation — all without leaving the
console.
Flow
- View (default) — the YAML button opens a read-only Monaco pane with
syntax highlighting. Non-editors stop here. - Edit — a visible toggle (only when you have the new
{resource}:edit
permission) flips the body to a side-by-side DiffEditor: left is the
server copy, right is your editable buffer. - Dry-run — sends the draft to the API server with
DryRun=All. The
canonicalized object (defaulted fields, timestamps) replaces the left pane
so you see what the cluster would actually store. - Apply — gates behind a confirmation and persists. The modal swaps in
the freshresourceVersionso you can iterate without reopening.
Permissions
- New per-resource action
edit. The admin wildcard includes it on every
resource; non-admins get it via a role grant. - Role Permissions "Add" matrix shows
editas a destructive-tinted chip
(rose) so operators can grant it deliberately. - SRE template now also grants
editondeployments,statefulsets,
configmapsso bumping an env var or scaling via YAML doesn't need an
Admin role.
Backend
POST /api/namespaces/{ns}/{resource}/{name}/applywith
{yaml, dryRun}. Supported resources: pods, deployments, daemonsets,
statefulsets, hpas, services, configmaps, ingresses, cronjobs, jobs.- Guardrails:
metadata.nameandmetadata.namespacemust match the URL;
metadata.resourceVersionis required (optimistic concurrency — a stale
edit fails with 409 instead of clobbering). - Audit entries:
{resource}.apply.{success,denied,rate_limited,failed}
withbefore/aftersha256 prefixes stored in the row'sResourceName
— enough to distinguish writes without logging full YAML. - Per-user rate limiter (shared with scale/restart buckets).
CDN / air-gapped note
Monaco loads from https://cdn.jsdelivr.net by default. CSP widens to allow
that CDN and worker-src blob: so Monaco can spawn its web workers.
Air-gapped deployments can self-host the vs folder and point
@monaco-editor/react's loader.config({ paths: { vs: '/vs' } }) at a local
path, then tighten CSP back to self.
Upgrade
docker pull ghcr.io/vurulkan/kubernetes-openconsole:2.6.0
docker rm -f openconsole && \
docker run -d --name openconsole -p 8080:8080 -e DATA_PATH=/tmp/app.db \
ghcr.io/vurulkan/kubernetes-openconsole:2.6.0
No schema change. Monaco is lazy-loaded, so first page open is unchanged;
opening the YAML modal pulls Monaco from the CDN on first use.
Rollback
docker pull ghcr.io/vurulkan/kubernetes-openconsole:2.5.2