Commit Graph

14 Commits

Author SHA1 Message Date
makocchi 04a55b27f2 Remove namespace from args (#386) 2019-08-22 18:00:12 -07:00
Naomi Seyfer 25c726453e Update serving dependency to 0.8; change all import paths (#368)
* Update serving to 0.8. Try building.

* Find the right serving version

* Change our own import path to knative.dev to match

* Remove dependency on old version of client

* Update yaml template

* Add sleep to test to deal with race

* fix merge conflict

* Update vendor modules
2019-08-15 18:09:08 -07:00
Naomi Seyfer b707702973 Always create in new format rather than old (#361)
* Always create in new format rather than old

* Rejigger tests and make them independent of filesytem

* Fix test on mergeout
2019-08-15 16:01:07 -07:00
Doug Davis 6af3edb789 Add 'creator' annotation on create --force (#341)
Closes #340

Signed-off-by: Doug Davis <dug@us.ibm.com>
2019-08-06 13:25:55 -07:00
Roland Huß 875e8da2a5 feature(service): Wait on update for service to become ready. (#271)
* feature(service): Wait on update for service to become ready.

The behaviour is now the same as for `kn service create`. This should also fix some flakiness in the tests again.

* chore: Fixed changelog

* chore(service): Adapt help message for update

* fix(test): Updated renamed method
2019-07-22 10:52:35 -07:00
Roland Huß e1614f95e6 fix(service update): Retry an update in case of a conflict. (#240)
* fix(service update): Retry an update in case of a conflict.

Is related to #224 and should fix one flake.

* chore(service): Fixed retry-loop for kn service create/update
2019-07-10 11:18:10 -07:00
Roland Huß 2ae037f3be refactor(service): Removed io.writer from of KnClient.WaitForService() (#248)
This puts all the console output to the command, where it belongs too.
One could add a ProgressHandler for more fine granular feedback (like suggested in #234) but for now this is not needed.
2019-07-08 11:57:34 -07:00
Roland Huß 98184eafbc refactor(serving): KnClient interface for single point of cluster access (#134)
* fix(serving): Remove hardcoded GVK and look it up from schema

Fixes #133.

* chore(serving): Add test for "WaitForService()"

* refactor(service): Add listRoutes() to client + generic way for list options

* chore(serving): Fixing rebase conflicts
2019-07-08 10:08:34 -07:00
Roland Huß d51a3a8d91 fix(serving): Fix logic 'service create --force' and some bogus tests (#216)
* fix(servicing): Fix logic 'service create --force' and some bogus tests

Now a more meaningful error is returned when the user tries to create
a service that already exists. Until know the service is tried
to be created even if the client already knows that it exists.

Also some broken (broken in the sense that the test was nonsense) tests has been fixed.

* chore(serving): Use constant instead of string lateral in test
2019-07-02 12:19:32 -07:00
savitaashture 4cc5c84264 Added changes to support container port information while creating/updating service (#191) 2019-06-28 10:48:08 -07:00
Navid Shaikh 65f1c081ee Add kn revision delete command (#207)
* Adds kn revision delete command

* Adds unit tests for revision delete command

* Adds integration tests for revision delete command

 Added revision delete command tests in new workflow namely
 TestRevisionWorkflow.

* Removes extra line and renames an import alias

* Adds 10 seconds sleep between service create and revision delete

 Also adds check for 'No resources found' while grabbing revision name.

* Clean up imports

* Removes the pause after service create

* Updates testing output strings in unit and e2e

* Updates post goimports on hack and test dirs
2019-06-28 10:21:08 -07:00
Roland Huß a7d1bc9dc0 feat(service create): Wait for a service to be ready when its created (#156)
* feat(service create): Added --no-wait and --wait-timeout

By default, `kn service create` blocks until the service is either
created or an error occured during service creation.

With the option --no-wait the behaviour can be switched to an
async mode so that that kn returns immediately after the service is
created without waiting for a successful Ready status condition.

The timeout for how long to wait can be configured with --wait-timeout
If a timeout occur, that doesn't mean that the service is not created,
but the wait just returns. The default value is 60 seconds.

In wait mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.

Fixes #54

* chore(service create): Tolerate if obeservedGeneration has not been set yet during startup

* chore(service create): Refactored based on review comments

* Introduced an --async flag (replacing --wait and --no-wait)
* Added proper retry handling on the list watch
* Updated help message

* chore(service wait): Added a new test for sync behaviour
2019-06-28 05:57:06 -07:00
Kenjiro Nakayama 13ff277095 Set current namespace from kubeconfig by default (#172)
* Set current namespace from kubeconfig by default

Currently kn command does not pick up namespace from kubeconfig but
hardcorded default namespace.

This patch fixes to get namespace from kubeconfig.

Fixes https://github.com/knative/client/issues/7

* Use NamespaceFactory to get current namespace

* Update unit tests

* Add nil check for ClientConfig
2019-06-24 11:23:05 -07:00
dr.max 0800d7c4d3 Regroups code to use subpackages. Finishes issue #66 (#145)
Creates four subpackages for now:

1. kn/commands - inludes types.go for common
   struct and other common files and misc commands
2. kn/commands/service - all 'kn service *' commands
3. kn/commands/revision - all 'kn revision *' commands
4. kn/core - contains the root.go and other top level
   for code and testing
5. refactors:
   a. split .../commons/human_readable_flags.go into three
   b. modifies the HumanReadableFlags.ToPrinter to get pass
      a function that sets the columns and fields

Had to refactor all tests to avoid cycles.
2019-06-05 16:30:38 -07:00