Commit Graph

10 Commits

Author SHA1 Message Date
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
dr.max 43b37a6747 Fixes `limits-memory` and `requests-memory` descriptions (#198)
Erroneously showed ‘CPU’ for ‘memory’ in description strings
2019-06-28 12:04:08 -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
Roland Huß 8a1d412f52 fix(service update): Print success message after successful update (#169)
* fix(service update): Print success message after successful update

* chore(service update): Improve test, revert unneeded changes
2019-06-17 12:23:45 -07:00
Navid Shaikh d25ea5f1e7 Renames service 'get' to 'list' (#179)
* Renames service 'get' to 'list'

 As per title.

* Renames get references to list in e2e tests

* Replaces get to list in docs
2019-06-13 13:56:43 -07:00
Roland Huß b885e41974 feat(service create/update): Add support of minScale/maxScale/concurrency-target/concurrency-limit (#157)
Autoscaler concurrency annotations are added to the revision template if
--min-scale / --max-scale / --concurrency-target/--concurrency-limit
are provided to `kn service create` and `kn service update`

Fixes #151
2019-06-08 08:27:40 -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