redhat-developer / kam

GitOps Application Manager: An opinionated CLI that generates the Kubernetes resources for managing your Tekton-based CI manifests, ArgoCD-based CD manifests and Application manifests in Git.
Apache License 2.0
144 stars 84 forks source link

Support exporting resources from kam #62

Open gnunn1 opened 4 years ago

gnunn1 commented 4 years ago

Is your feature request related to a problem? Please describe. kubectl and oc have deprecated and removed the --export option. In OpenShift it's common to use tools like oc new-app or odo to bootstrap an application. However when you want to GitOps the application you need to export those resources and remove all of the cruft (managedFields, status, etc) from the result.

It would be nice if kam could handle exporting resources and even nicer if kam could do it based on the schema for the selected object to export only the relevant fields.

Describe the solution you'd like Exporting to pure yaml at a minimum would be very useful but being able to bootstrap resources to a kustomize base or a helm chart would be totally awesome as well.

Describe alternatives you've considered Using a bash script which pipes the resource through yq to strip unneeded fields.

bigkevmcd commented 4 years ago

We could consider how https://github.com/itaysk/kubectl-neat works (which is a plugin for kubectl to do this).