itaysk / kubectl-neat

Clean up Kubernetes yaml and json output to make it readable
Apache License 2.0
1.68k stars 100 forks source link

[FR] Filter openshift-related fields for Pod resource #71

Open Drugoy opened 3 years ago

Drugoy commented 3 years ago

This ticket is a feature request to filter fields related to Red Hat OpenShift Container Platform (RHOCP), which is a kubernetes flavor. kubectl-neat doesn't filter out some useless fields when I do kubectl get pod/mypod -yaml | kubectl-neat that need to be filtered and I suppose were not considered simply because they are custom fields used by RHOCP. The output of the above command has these useless pieces:

apiVersion: v1
kind: Pod
metadata:
  annotations:
    k8s.v1.cni.cncf.io/network-status: |-
      [{
          "name": "",
          "interface": "eth0",
          "ips": [
              "10.240.16.148"
          ],
          "default": true,
          "dns": {}
      }]
    k8s.v1.cni.cncf.io/networks-status: |-
      [{
          "name": "",
          "interface": "eth0",
          "ips": [
              "10.240.16.148"
          ],
          "default": true,
          "dns": {}
      }]
    openshift.io/deployment-config.latest-version: "6"
    openshift.io/deployment-config.name: "my-deployment-config"
    openshift.io/deployment.name: "my-deployment-config-6"
    openshift.io/scc: restricted
itaysk commented 2 years ago

related: #74