Commit Graph

24 Commits

Author SHA1 Message Date
Jordan 385f848cbc add route describe feature and test (#251) 2019-07-12 05:06:37 -07:00
Roland Huß 9fb6a436e8 chore(wait): Fixes for Smoke Tests + help messages (#250)
* Increase wait timeout to 240s (to avoid test failures like in https://storage.googleapis.com/knative-prow/pr-logs/pull/knative_client/244/pull-knative-client-integration-tests-latest-release/1148472118510358531/build-log.txt)
* Fixed duplicate default help message for `kn service create --help`
2019-07-10 13:36:12 -07:00
Roland Huß 9f62341dcf fix: Update root docs for removing Build reference. (#244) 2019-07-10 10:48:14 -07:00
savitaashture 3eb6e41751 get a particular service and revision based on name parameter (#150) 2019-07-10 02:39:05 -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
Joan Edwards 0cbc4e1b18 Bulleted components in kn.md (#243) 2019-07-08 03:25:33 -07:00
Navid Shaikh fc9b24c1e5 Add custom comparison for checking multiple substrings (#227)
* Adds custom comparison for checking multiple substrings

 This changeset introduces custom comparison for checking if a target
 string has given multiple substrings, namely `ContainsMultipleSubstrings`.

 Also removes `commands.TestContains` function and replaces all references
 of `commands.TestContains` with `gotest.tools/assert.Check` function and
 uses `ContainsMultipleSubstrings` as comparison function.

* Renames and makes the compare function variadic

 New name: ContainsAll
 New location: pkg/util/compare.go
 Also the function now takes target string as first arg,
 and accepts any number of substrings to check.
 Removed the message arg, the compare function composes the error message.
 For eg:
```
        Actual output: foo-abcd   foo       <unknown>   0 OK / 0     <unknown>   <unknown>
        Missing strings: foo-abcd1, foo1
```

* Adds tests for compare utility ContainsAll

* Update vendor/modules.txt
2019-07-05 10:07:32 -07:00
dr.max 500b7d1371 fixes(issue #111) generically for all command groups (#218)
Explores all sub-commands from root and adds a RunE for all
commands that are groups with child commands and without a RunE.
The added RunE will return the correct errors when the command
is called with empty sub-command or with an unknown sub-command.
It will also print the command help message first.

Added a gotest.tools test for root.go.
2019-07-02 23:50:32 -07:00
Navid Shaikh aac0ec265e Adds kn route list command (#202)
- Accepts an argument name for listing particular route
- Enables the machine readable output flags
- Updates docs for kn route command group
- Adds unit tests for route command group and route list
- Adds integration tests for route list in basic workflow test
- Updates tests and getting namespace
- Adds more unit tests for code in pkg/kn/commands/route/list_flags.go
- Adds route list command in smoke tests
- Updates vendor/modules.txt
- Clean up imports
- Addresses review comments
 - replaces knative to Knative
 - uses reflect.DeepEqual for slice comparison
 - removes few code comments
 - removes irrelevant tests modifications from the PR
2019-07-02 11:25: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
Navid Shaikh 9c865a6115 List revisions for a given service (#194)
* Lists revisions for a given service

 Fixes #127

* Adds unit tests for listing revisions of a service

* Adds integration tests for listing revisions of a service

* Updates docs for listing revisions of a service

* Updates vendor/modules.txt
2019-06-20 13:29:00 -07:00
Naomi Seyfer 32ccc334e3 Revert #173 and #139, reinstating having a config file. (#193)
* Revert #173 and #139

* Change default layout to have a hidden kn dir

* Update deps
2019-06-19 18:12:58 -07:00
Navid Shaikh 5d26faa4ff Renames revision 'get' to 'list' (#180)
* Renames revision 'get' to 'list'

 As per title.

* Renames revision get references to revision list in docs
2019-06-13 13:56:51 -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
Kenjiro Nakayama 1b471d587f Remove unused `--config` option (#139)
* Remove unused `--config` option

Currently `--config` option in kn command is not used from anywhere.
This patch removes the option from the command.

* update auto gen files

* Update deps by hack/update-deps.sh
2019-06-08 09:03:41 -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
Roland Huß c10092ffae fix: Update cli-runtime to include fix for cli options help (#137)
The update to kubernetes-1.13.5 for cli-runtime introduces a fix for #135 (i.e. sorting the keys for the options)
2019-05-21 09:54:27 -07:00
dr.max 3189c30275 Adds Zsh completion (finishes issue #130) (#132) 2019-05-20 08:54:29 -07:00
Naomi Seyfer a4242b3bb5 Copy-edit documentation, and make user guide start with installation. (#125)
* Copy edit docs and add getting-started section.

* Remove hash

* list to get

* list to get
2019-05-17 16:22:16 -07:00
dr.max d8e710f389 Updates generated Cobra docs for commands and ... (#108)
Also:

1. New docs for commands
* service get
* revision get

2. Removes auto generated docs tags

3. Auto run generated docs when building to pick up any command changes
2019-05-15 15:00:32 -07:00
dr.max 95808278d4 Adds Cobra generated docs and means to generate them and first cut of other docs (#93)
* Added Cobra generated docs and ways to generate them

* Adds docs/README.md and first user's guide for Kn
2019-05-06 17:39:36 -07:00