itaysk/kubectl-neat

Few wrong results when using kubectl-neat with kubevirt CRD (VirtualMachineInstance)

oshoval opened this issue · 1 comments

Hi, thanks for the great tool

This is a bug report / feature request.
When trying to use kubectl-neaton VirtualMachineInstance yaml
The result is great beside few problems (https://www.diffchecker.com/H6mj1YnW)

  1. The following fields should be left untouched please if possible
      interfaces:	
      - masquerade: {}	
        name: default	
      rng: {}
 networks:	
  - name: default	
    pod: {}

Maybe a robust concept like profiles which say what fields to touch / untouch can help in such cases ?
Unless this specific case can be solved hardcoded.

  1. The following fields should be removed please if possible.
    I understand some of it is not feasible to auto detect, unless there is a configurable filter,
    Can a filter be implemented ? such as it will say remove all annotations / labels beside xyz that maybe the user do want to keep.
metadata:
  annotations:
    kubevirt.io/latest-observed-api-version: v1
    kubevirt.io/storage-observed-api-version: v1
    kubevirt.io/vm-generation: "1"
  labels:
    kubevirt.io/nodeName: node02
    kubevirt.io/vm: vm-fedora

Thanks

1 is duplicate of #18
2 is by design and you should use other tools to clean if that's your goal