Uploaded image for project: 'OpenShift Migration Toolkit for Containers'
  1. OpenShift Migration Toolkit for Containers
  2. MIG-964

Investigate kubectl-neat as Tekton ClusterTask

XMLWordPrintable

    • False
    • False
    • ToDo

      Meaningful conversation in https://issues.redhat.com/browse/MIG-849 about kubectl-neat and it's ability (from [itaysk/kubectl-neat|https://github.com/itaysk/kubectl-neat] ) to:

      When you create a Kubernetes resource, let's say a Pod, Kubernetes adds a whole bunch of internal system information to the yaml or json that you originally authored. This includes:

      Metadata such as creation timestamp, or some internal IDs

      Fill in for missing attributes with default values

      Additional system attributes created by admission controllers, such as service account token

      Status information

       We could leverage kubectl-neat in the form of a ClusterTask that simply cleans up the resources and saves them to disk in a readable/maintainable form.

      NOTE:

      After some research, it is pretty clear that kubectl-neat is doing a lot more than just removing the default values the APIServer would have populated (ie. https://github.com/itaysk/kubectl-neat#common-mutating-controllers) even handling things like the spec.nodeName and metadata.uid of a pod. We could consider implementing some of this logic via plugin(s) or in the "export" subcommand directly, more discussion is needed.

              Unassigned Unassigned
              rh-ee-dzager David Zager
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: