* Added flag to configure wait-window between intermediate errors during service create
* Added waitconfig struct
* Moved --wait-window flag to shared flags
* Refactor waiting loop to use resourceVersion
* Add test coverage for delete ops
* Reformat code
* Move helper function to test file
* Add more test coverage
* Refactor: add ctx param to KnServingClient funs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Passing ctx from knServingClient to ServingV1Interface
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Making wait function cancellable
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Test using background ctx
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Using cmd.Context() in pkg/kn/commands
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Handling SIGINT and SIGTERM
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Refactor: add ctx param to KnEventingClient funs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Passing ctx from knServingClient to knative.dev interfaces
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Using cmd.Context() in pkg/kn/commands
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Test using background ctx
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup style
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Removing unnecessary dependency
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Refactor: add ctx param to KnChannelsClient funs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Passing ctx from knServingClient to knative.dev interfaces
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Using cmd.Context() in pkg/kn/commands
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Refactor: add ctx param to KnSubscriptionsClient funs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Passing ctx from subscriptionsClient to knative.dev interfaces
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Using cmd.Context() in pkg/kn/commands
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Refactor: add ctx param to KnSinkBindingClient funs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Passing ctx from knBindingClient to knative.dev interfaces
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Using cmd.Context() in pkg/kn/commands
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Test using background ctx
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Refactor: add ctx param to KnDynamicClient funs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Passing ctx from knDynamicClient to knative.dev interfaces
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Using cmd.Context() in pkg/kn/commands
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Test using background ctx
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Refactor: add ctx param to KnAPIServerSourcesClient funs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Passing ctx from APIServerSourcesRecorder to knative.dev interfaces
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Using cmd.Context() in pkg/kn/commands
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Test using background ctx
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Refactor: add ctx param to KnContainerSourcesClient funs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Passing ctx from containerSourcesClient to knative.dev interfaces
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Using cmd.Context() in pkg/kn/commands
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Test using background ctx
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Refactor: add ctx param to KnPingSourcesClient funs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Passing ctx from pingSourcesClient to knative.dev interfaces
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Using cmd.Context() in pkg/kn/commands
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Test using background ctx
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Removing ctx param from RawClient()
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* ctx for watch/polling
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix per review request
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Refactor: extract ctx
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Refactor: Namespace not requiring ctx
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Revert "Handling SIGINT and SIGTERM"
This reverts commit 9598646fda.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Update CHANGELOG
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Add test for Wait()
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Add test for Wait()
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* update: Change default to server-side generated revision names
Fixes#1144
* update: Fix wait loop for synthetic events for which the generations are already in sync
* fix assertion as a service label change does not create a new revision
* fix: --cluster-local does not create a new revision but just changes a service's label
* chore: Fixed formatting
* update: Check generation in update already before doing a watch
* fixed lint issue
* fix test assertions
* 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
* feature(service update): Add generic mechanism to include retries on conflicts
Move the retry logic for retrying in case of a resource conflict into the KnClient.
* chore: Update unit tests
* feature(serving): Update API to serving.knative.dev/v1
Due to an issue with 0.12.0 (a missing constant) the update also includes an update
to the latest knative-serving and knative-eventing dependencies from master
(as reflected in version.go)
Signed-off-by: Roland Huß <roland@ro14nd.de>
* fix(serving): Bogus import removed
* fix(serving): Add missing go.sum entry