Skip to content

Add read-only YAML view for a Kubernetes resource detailed view

Proposal

Add read-only YAML view into a drawer with the Kubernetes resource details.

This might speed up the delivery of features. You already created the metadata section and a Status field. I recommend keeping the metadata, and adding "the rest" as pure YAML.

For example:

  • deployments, pods, Flux resources would receive two more YAML fields in their details view:
    • spec
    • status
  • configmaps would receive
    • data
    • binarydata (it's binary, likely hex encoded?)
  • secrets would receive
    • data we would like to make a dedicated view for this as a follow up to initially hide the secret values from curious eyes, and to allow to hex-decode as well

Screenshot_2023-12-07_at_22.44.03

Implementation proposal

  1. Update the corresponding queries to fetch the whole status and spec fields.
  2. Update the workload details drawer to convert the objects from JSON to YAML and present them in a pre block.
  3. We already have a status item in the details drawer (which shows the status badge). If the full status field was provided - remove the badge and render the YAML instead.
Edited by Anna Vovchenko