Commit Graph

4 Commits

Author SHA1 Message Date
Christoph Deppisch 09f14b1056
Fix describe/list commands with json/yaml output format (#1278)
* 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>
2021-09-21 05:32:37 -07:00
Roland Huß 8ca97c7920
Feature: "kn service apply" (#964)
* 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
2020-11-02 00:36:35 -08:00
Josh Soref 4939c5ede3
Fix various misspellings and linter items (#1057)
* spelling: additional

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: bindings

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: blocked

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: bootstrap

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: channel

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: channel

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: commands

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: comparison

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: configuration

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: controller

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: convert

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: desired

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dynamic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: entry

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: execute

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: explicit

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: hardcoded

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: information

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: inject

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: item

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: kubectl

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: latest

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: message

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: namespace

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: namespaces

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: output

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: overriding

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: parameters

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: revision

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: separated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: separator

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: service

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specified

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specifies

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: splitting

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: subscription

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: trigger

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unknown

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unstructured

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: workflow

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* chore: Address golinter complaint for (c *MockKnServingClient) GetBaseRevision

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* chore: update changelog for spelling fixes (#1057)
2020-10-12 21:24:30 -07:00
Ying Chun Guo d725ef594a
Fix error when output is set to name (#775)
* fix error when output is set to name

* add e2e test

* change to flags/listprint.go
2020-04-13 21:58:15 -07:00