keisku / kubectl-explore

A better kubectl explain with the fuzzy finder
MIT License
352 stars 12 forks source link

[FEATURE REQ] Add export utility to generate yaml output #41

Closed bcdurden closed 3 months ago

bcdurden commented 4 months ago

Working with CRs that are large can be a bit annoying (especially when dealing with CAPI and kubevirt resources), so having a way to walk through the explorer and select an export of the current line or maybe just the parent Kind to a yaml file would be nice for accelerating templating of CRDs that don't support native create

Example: 1) Running kubectl explore ns 2) Choosing an export of the type 3) yaml file is generated as below with canned values

apiVersion: v1
kind: Namespace
metadata: 
  name: "string"
  annotations:
    "string": "string"
  labels:
    "string": "string"
spec: {}

I hope what I am asking makes sense

keisku commented 4 months ago

Thanks for your feedback, @bcdurden

For my better understanding of your request...

Choosing an export of the type

Can you clarify this part?

After running kubectl explore ns, kubectl-explore waits for user-input as below.

2024-06-12_23-56-38

What action would user do to get "yaml file is generated as below with canned values"?

keisku commented 3 months ago

I am going to close this issue. I am looking forward to review your PR!