Skip to content

feat(k8s): pod manifest view with masked env values in the dashboard #808

Closed as not planned

Description

@dan-petty

Context & Rationale

#686 asked for y to show a pod's manifest YAML. read_namespaced_pod plus the Kubernetes client's serializer would produce it. But pod specs can carry literal env[].value secrets, and this view would put them on screen. mask_secrets already exists (src/devops_cli/security/sanitizer.py:269, imported at src/devops_cli/k8s/service.py:19). kubectl get pod -o yaml and k9s (a managed tool, src/devops_cli/commands/install_tools.py:476-478) already show manifests.

Scope & Deliverables

  • Deliverable: y on the highlighted pod opens a scrollable dialog with the pod's YAML. metadata.managedFields is removed, and every literal env value is masked.
  • Acceptance criteria:
    • A fake pod with env TOKEN=abc123 renders with the value masked and no managedFields.
    • The fetch runs on a worker thread, and an API error shows inside the dialog.
  • Key questions: mask every literal env value, or only ones that look secret? Every literal value (proposed), because a heuristic misses some.
  • Constraint: the view only reads from the cluster, and tests fake the API.

Strategic Alignment

Proposed design

Problem statement

The issue proposes a pod manifest view with masked env values in the dashboard Kubernetes tab. Issue #2231 deletes that tab because k9s v0.51.0 already shows pod manifests. The only value k9s does not provide is masking of literal env[].value secrets. A person must decide whether to close this item or re-scope it to a masked-manifest command outside the dashboard.

Acceptance criteria

  • Criterion 1: A fake pod with env TOKEN=abc123 renders with the value masked and no managedFields.
    Verification: Run the unit test that creates a fake pod object with env TOKEN=abc123, calls the render function, and asserts the output contains a masked placeholder and does not contain managedFields or abc123.
  • Criterion 2: The fetch runs on a worker thread, and an API error shows inside the dialog.
    Verification: Run the unit test that mocks the Kubernetes API to raise an exception, and assert the dialog displays the error message and the fetch did not block the main thread.

Key questions

  • Mask every literal env value, or only ones that look secret?: Mask every literal env value. A heuristic that checks whether a value looks like a secret will miss some secrets. (proposed)
  • Close this item as not planned, or re-scope it to a masked-manifest command outside the dashboard?: Pending. A person has not yet decided. Issue refactor(ui): Delete the Kubernetes and Logs dashboard tabs #2231 deletes the Kubernetes tab, and k9s already shows pod manifests. The only unique value is masking literal env values, which needs a different surface. (proposed)

Fit

Fits in one pull request.

Suspected block

A person must decide: close as not planned, or re-scope to a masked-manifest command outside the dashboard. Issue #2231 removes the Kubernetes tab that this feature targets.

Dependencies

None.

Activity

  1. added
    type/feature
    scope/k8s
    priority/p3-low
    on Oct 1, 2026
  2. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Linked: #807, #809 and #811. All four split from #686 and add to the Kubernetes tab's BINDINGS (ui/dashboard.py:169-183); this item proposes y. Found by the 2026-10-08 backlog review.

  3. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    This item cannot be built as written. It adds a view to the Kubernetes tab of devops dashboard, and #2231 deletes that tab.

    Evidence (origin/main bb46660, 2026-10-28):

    No code was written. A person decides: close as not planned, or re-scope to a masked-manifest command outside the dashboard.

  4. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Refine cannot set this item to Ready at bb46660 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

  5. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Closed as not planned. The item conflicts with a more recent project direction:

    The evidence is in the comment above. If a masked pod manifest is still necessary, file it again as a devops k8s command outside the dashboard.

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

    priority/p3-lowscope/k8stype/feature

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions