New command is now `kubectl diff` rather than `kubectl alpha diff` since
it's moving out of alpha soon, and will be using dry-run apply to
produce the diff rather than the custom merge logic.
The current interface is kind of clunky and not super easy to use, since
you have to specify parameters to specify which versions to diff. Also
the default isn't the most useful setting.
Change the interface by removing all the parameters and force only one
useful use-case, that is: diffing what's currently live against
what would be live if applied.
Since we're saving nil in an interface rather than the implementation,
we can't compare to nil to check if the remote object exists or
not. Change the struct to save in the implementation.
Local and Live functions where doing and returning the same thing,
giving empty results by default. Fix the local function by copying the
objects before fetching the live version.
Reduce all uses of Unstructured to the simpler form, and avoid asking
for mapper or typer unless it is required. Use Typed() for places that
previously used VersionedObject, and remove paths for versioned objects
from code that is now using unstructured.
`kubectl alpha diff` lets you diff your resources against live
resources, or last applied, or even preview what changes are going to be
applied on the cluster.
This is still quite premature, and mostly untested.