* Fix describe/list commands with json/yaml output format
Makes sure to always set proper GroupVersionKind on unstructured objects and lists to avoid marshalling errors when printing in json/yaml output format.
* Deliberately decide to add GVK only to list/read operations in the tests
* rebased and cleaned up
* add some unit tests
Co-authored-by: Roland Huß <rhuss@redhat.com>
* feat: "kn service apply"
This commit introduces a client-side apply with a plain JsonPatchMerge. This is more limited than a StrategicPatchMerg as it does not allow to merge lists (they are just overwritten). Also is not a real 3-way merger that would lead to a conflict when both the, the server-side and the provide update overlapp in fields that updated, compared to the shared original configuration. This is a problem of JsonThreeWayMerger itself, as pointed out in https://github.com/kubernetes/kubernetes/pull/40666#pullrequestreview-502804243.
This limitation is shared with kubectl, which suffers from the same issue if using `kubectl apply` with a custom resource (i.e. with everything that has schema that is not registered within kubectl).
Tests are missing, too, but will come soon
* chore: Add tests for 'kn apply'
* refactor: Removed PatchService from pulic API interface
* fix: Display of service URL at the end, when no changes apply
* chore: Add initial E2E test
* chore: Implemented review suggestions
* More tests
* Example for kn service apply
* Remove commented-out code
* lint fixes
* fix formatting of kn service apply doc
* fixing go.sum
* chore: Update deps