Currently when I run kube-dump cls it is creating a file for each resource, but these files would be a list of every resource of that kind due to the kubectl get cmd lacking the resource name when it fetches the manifest. In the case of ClusterRole resources, each file was ending up at nearly 5k lines long since every one of them contained all For example, cluster/default_Namespace.yaml would be written like this:
What this PR accomplishes is correctly writing a single item per file, so this file is instead written as it should be (with similar single-item files for kube-public and kube-system etc):
Currently when I run
kube-dump cls
it is creating a file for each resource, but these files would be a list of every resource of that kind due to the kubectl get cmd lacking the resource name when it fetches the manifest. In the case ofClusterRole
resources, each file was ending up at nearly 5k lines long since every one of them contained all For example,cluster/default_Namespace.yaml
would be written like this:What this PR accomplishes is correctly writing a single item per file, so this file is instead written as it should be (with similar single-item files for
kube-public
andkube-system
etc):