Commit Graph

224 Commits

Author SHA1 Message Date
Navid Shaikh ff7dffc0a3 Add --pull-secret flag (#617)
* Add --pull-secrets flag

 Fixes #616

 - Add --pull-secrets flag for service create/update operations
 - Setting empty string to flag clears the pull secrets
 - List ImagePullSecrets for service in `service describe` default output
 - Run e2e tests against latets serving v0.12.0 (ImagePullSecrets introduced in v0.11.1 release)

* Space separated field name for describe and update flag help msg

 - Update the key name in service describe:
  - ImagePullSecrets --> Image Pull Secrets
  - ServiceAccount --> Service Account
 - Update the help message for --service-account and --pull-secrets
2020-01-22 06:57:25 -08:00
Roland Huß 5001dcdc16 feature(serving): Add --autoscale-window (#614)
* feature(serving): Add --autoscale-window

Fixes #613

* chore: Update help-text for --autoscale-window

* chore: Add missing generated files
2020-01-22 00:18:23 -08:00
Ying Chun Guo 71c9238b7e Enable trigger filter to be optional (#603)
* Enable trigger filter to be optional

* remove RemoveFilters from builder
2020-01-13 23:33:04 -08:00
Roland Huß b10580ff72 chore(trigger): Cleanup Trigger create API (#561)
* further updates

* chore: Fix calls to apiserver create

* fix namespace issue

* fix
2019-12-17 13:39:04 -08:00
Navid Shaikh 6380fc5eaf Add cronjob and apiserver source list commands (#559)
* Add kn source cronjob list command

* Add kn source apiserver list command
2019-12-17 08:29:04 -08:00
Ying Chun Guo 8b1434b789 Add trigger update command (#562)
* add trigger update command

* add trigger update test
2019-12-17 07:10:04 -08:00
Ying Chun Guo 60b88017a9 add trigger list (#558) 2019-12-17 01:00:08 -08:00
Navid Shaikh 6ac25cdc00 Add ApiServer source update and describe commands (#556)
* Dont return created ApiServer source object but only error

 - After ApiServer source object is created, we don't need it to pass
   around in caller function.

* Align creating ApiServer source client, removes unit tests

* Add ApiServer source update command

* Rename TestMockKnClient to TestMockKnCronJobSourceClient

* Add mock client for ApiServer Source and its tests

* Add mock unit tests for create, delete and update

* Add e2e tests for apiserver source update

 - Add a test for apiserver source sink update
 - Verify the updated sink name after the apiserver source is created
 - Update resource names in existing tests

* Uses builder pattern for ApiServer source create command

* Update ApiServer source create/update flags and required config

* Uses builder pattern for ApiServer source update command

* Align create/update/delete description and error messages

* Add unit tests for get/create/update/delete in apiserver_client.go

* Update e2e tests expected output per change in commands output

* Golint fixes, Api -> API and add exported method docs

* Rename a test method and source update command description

* Add ApiServer source describe command

 - Add command and unit tests
 - TODO for later: Add 'Controller Selector' section for --verbose
2019-12-16 09:42:01 -08:00
Ying Chun Guo 7def9f49eb Add command for creation of a plain trigger (#541) 2019-12-16 07:41:01 -08:00
Roland Huß 0ca6f14d4a feature(source cronjobs): Implementation of CronJobSource management (#542)
* feature(source cronjobs): Implementation of CronJobSource management

Contains create/delete/update/describe but not tests yet.

Still todo:

* Think how to provide a namespace for the sink
* Support for more sinks
* Synchronous mode for create & update
* Add list (or implement "source list")

* chore: Add a mock test for cronjob source

* addd missing license headers

* cosmetic changes

* chore(cronjobsource): Add tests

* fixup

* chore(cronjob source): Improved test coverage

* chore(cronjob source): some review polishing
2019-12-13 01:27:53 -08:00
Navid Shaikh 7dbb5a5bb0 kn source list-types (builtin types) (#536)
* feat: kn source list-types (builtin types)

 - Only lists the builtin source types
 - Uses client-go dynamic client for listing CRDs
 - Adds DyanmicClient interface to KnParams
 - Adds printing options

* chore(lint): Address golint suggestions

* Rebase and update venodr/modules.txt

* Adds unit tests for DynamicClient in types.go

* Add kn source list-types command in smoke tests

* Constants for the CRD GVR and source identifier label key value

 GVR as:
   - Group: apiextensions.k8s.io
   - Version: v1beta1
   - Resource: customresourcedefinitions
 Label as:
   {"duck.knative.dev/source": "true"}

* Add tests for dynamic client

* Add description about SinkBinding source type

  as - "Binding Pattern for ContainerSource"

* Remove unused imports

* Adds unit tests for list-types command processing

* More unit tests for flags

* Adds e2e tests for kn source list-types

  - also test the YAML output

* Sort the source types while listing them

 - Update the unit tests accordingly

* Add examples

* Add unit tests for CreateDynamicTestKnCommand

* Fix typo in unit tests

* golint fixes

* Updates to vendor/modules.txt after rebase

* Remove the extra lines
2019-12-10 11:20:47 -08:00
Ying Chun Guo 003dba3616 Add creating ApiServerSource event source to Client (#415) 2019-12-10 03:52:46 -08:00
Navid Shaikh 619b64cbb3 chore(docs): Updates basic workflow doc (#502)
- Updated to reflect the service create/update/describe/delete output
2019-11-13 05:16:27 -08:00
Navid Shaikh c4a919718d Add completion to help message (#478)
Fixes #477
2019-11-12 01:32:23 -08:00
Ingwon Song 9d759ca6e4 Add support for envFrom and volumeMounts (#393)
* Add support for envFrom, volumeMounts, serviceAccountName, and imagePullPolicy

* Add comments for added functions

* Add test functions for --env-from

* Add test functions for --volume-mount

* Add test functions for --service-account-name and --image-pull-policy

* Add testing functions to cover the case "service update --env-from"

* Add test functions to cover the case "service update --volume-mount"

* Add missing test functions for config_changes.go

* Add testing functions for pkg/util/parsing_helper.go

* Fix a bug on a test case, caused by ignoring random orderedness of map

* Remove image-pull-policy because it is not supported by Knative

* Fix comments to clarify it as well as to fix a typo

* Remove service-account-name flags in order to submit it as a seperate PR

* Split --volume-mount flag into --volume-mount and --volume flags in order to enable multiple times mounting for the same volume

* Change the name of local variable to simplify

* Update docs

* Change the flag "--volume-mount" into "--mount", and fix it to make volume automatically when the config-map or secret is directley used. In addition, the test cases are changed to new unit test style. To keep the original orderedness given via flags, OrderedMap implementation is added as well

* Fix usage descriptions for the mount flag

* Factor out the name existence checking from createEnvFromSource

* Fix the usage description for --mount

* Sanitize a generated volume name
2019-11-06 04:15:03 -08:00
Naomi Seyfer 4874b9a384 Human-readable revision describe (#475)
* Revision describe rebaseable

* Fix up for rebase

* Some tests

* moretests

* Forgot part of the refactor!

* Fix unit tests

* Change e2e tests and respond to feedback
2019-11-05 17:43:02 -08:00
Navid Shaikh a269d2910d Adds kn nightly and latest release image URL in docs (#466)
* Nightly: `gcr.io/knative-nightly/knative.dev/client/cmd/kn`
 * Latest release: `gcr.io/knative-releases/knative.dev/client/cmd/kn`
2019-10-31 00:51:12 -07:00
Roland Huß 6328a73c98 fix(service): Set default timeout for update to the same value as for create (#446)
Also, added accidentally removed seperator lines during create/update
2019-10-16 04:51:15 -07:00
Roland Huß a2d1ef7d83 chore(service): Improvements for waiting on service readiness (#431)
* Increased default timeout to 600s. This timeout will be triggered
  only when the Ready condition stays in UNKNOWN for that long. If its
  True or False then the command will return anyway sooner.
  So it makes sense to go for a much longer timeout than 60s
* Enhanced output to indicate the progress

This change needs some updates to the API and introduces a 'MessageCallback'
type which is calle for each intermediate event with the "Ready" condition message.
2019-10-10 06:06:06 -07:00
Joan Edwards e386b4e2ae Add navigation for management section (#436)
* Add navigation for management section

* Update management.md

* Update management.md
2019-10-08 07:47:36 -07:00
Joan Edwards 9467b25331 Update README.md (#437) 2019-10-08 06:35:35 -07:00
Joan Edwards 8ec74e686a Minor grammar corrections (#435) 2019-10-08 05:00:40 -07:00
Navid Shaikh 2f7fa6a7c2 feat(annotations): Adds annotation flag for service create and update (#422)
* feat(annotations): Adds annotation flag for service create and update

  - Adds specified annotations to service object meta and revision template meta
  - Adds --annotation / -a flag to service create and update options
  - User can specify '-' at the end of the annotation key to remove an annotation
  - Adds unit and e2e tests
  - Updates docs and changelog accordingly

* Adds example for service create with annotation

* Adds mock unit tests for service update with annotations

* Removes the short hand -a for annotation flag
2019-10-04 06:40:05 -07:00
dr.max d543b0e5a3 fixes(#414): change plugins config to use - instead of camel case (#428)
This solves 414 by adopting new format for config keys and thereby
bypassing the need for case sensitivity in Viper. Also changed
`lookupPluginsInPath` key to `lookup-plugins` and also same for the
persistent flag. The PATH part is implied and can be read from
help.
2019-10-04 00:48:08 -07:00
Naomi Seyfer b27e366dcb Service describe: information about revision status, tags, latest [created, ready] revisions, and latest traffic (#379)
* Change symbols, add latest and latest ready

* More info on what is latest and tags. Filter annotations and labels.

* Make current tests pass

* More tests

* No longer require Annotations in test

* Add error

* Adjust tests to match adjusted output

* Respond to review comments

* one more

* Fix double printing of revisions + test for it

* Differentiate between latest traffic and latest ready w/o that being reason for traffic

* Re-build with go 1.12

* Rebased

* Limit non-verbose output to error and image

* Fix tests for new format
2019-10-03 11:33:08 -07:00
Navid Shaikh e73a1c0348 fix(docs): Fixes kn nightly build link for Mac OS X (#427)
Fixes #425
 - Updates the link to https://storage.googleapis.com/knative-nightly/client/latest/kn-darwin-amd64
2019-10-01 07:11:08 -07:00
dr.max dba0d11320 Fixes issue #338 by adding documentation for the Kn config (#411) 2019-10-01 02:44:08 -07:00
Joan Edwards ffbf6841c2 Restructure Docs (#421) 2019-09-30 07:33:45 -07:00
Ying Chun Guo 7a813be35e update the description of flag namespace (#419) 2019-09-30 01:12:51 -07:00
Ingwon Song 14ec594e56 Add --service-account-name flag (#401)
* Add --service-account-name flag

* Change the flag --service-account-name to --service-account, and change its default value from "-" to an empty string. In addition, CHANGELOG.adoc is changed.

* Update docs with ./hack/build.sh
2019-09-23 04:45:13 -07:00
Navid Shaikh 2985e550cd docs: Adds documentation for traffic splitting support in kn (#331)
- Add summary about operations, their usage and examples
 - Flags precendence explained
 - Summary column explaining if repetition is allowed or not
 - Example of different scenarios
 - Add case where tagOfOneTarget==revisionOfAnotherTarget, prefrence goes to tagOfOneTarget
   as Tags are unique while revions in a traffic block aren't.
 - Updating tag requires using `--untag` flag
 - Update doc to mention the tag update operation and example
 - Add notes about
	- assigning multiple tags for same revision
        - creating a new target in traffic if same revision is tagged with new tag
 - Update CHANGELOG
 - Add an example per sub-section of flag description
2019-09-03 13:40:01 -07:00
Komal Dhull 679096194a Added --no-headers flag for resource listing (#262) 2019-09-03 00:31:00 -07:00
Naomi Seyfer 0ff537ad98 By default, set `Image` to the image of the prev. revision by digest (#373)
* Option to freeze revision to digest

* Tests pass. Checkpoint.

* Tests for env now check pinning to digest

* Bool flag using convention. Tweak usage.

* Describing the image carefully using the annotation and digest

* lint

* Test matrix of locking to digest behaviors

* Expose both flags, and rewrite help text again

* Unit tests.

* Removed unsed method

* Add tests for getting base revision

* Make tests actually test stuff better

* Make tests actually test stuff better

* A mergeout killed a returning of error. Restore it

* Help text again
2019-08-27 11:42:40 -07:00
dr.max e36089f260 Add reference to plugin in README.md (#363)
* Add reference to plugin in README.md

Working on various plugins docs. This is first of three PRs.

* typo and clarification

* fix links
2019-08-15 23:16:09 -07:00
Navid Shaikh 746dacc47c feature(service): Implements traffic splitting and tagging targets (#345)
- Add e2e tests
 - Use '=' for traffic and tag assignment instead of ':'
 - Use --tag and --untag flags for tagging traffic targets
 - Use --traffic flag for setting traffic portions
 - Allow --traffic portion to either take revisionName or tagName
 - Uses @latest identifier for referencing latest revision of service
 - Dont throw error if requested revision=tag pair is same
 - Support having multiple tags for a revision
	 - creates a new target in traffic block if revision present in traffic block with new tag requested
	 - creates N new targets in traffic block if revision absent in traffic block with Nxnew tags requested
 - Ensure updating tag of @latest requires --untag flag
	 - streamline updating tag for latestReadyRevision
	 - adds respective tests
	 - adds tests for ensuring given traffic sum to 100 on CLI and fail fast
 - Add note about preference of order in case where tagOfOneRevision == revisionOfAnother,
   first tags are checked and assigned traffic if any, as tags are supposed to be
   unique in traffic block and should be referenced in such scenario.
 - Remove the examples from flag description, moves it to service update command example section
 - Pass only traffic block to compute trffic, makes it better to consume.
 - Cover more error cases for invalid value format for assignments, covers a=b=c, a=, =b, or variants of them
 - Separate and improves the error messages
 - Add unit tests for traffic computing
 - Add sanity checks in dedicated function verifyInputSanity
 	  - traffic perents should sum to 100
          - individual percent should be in 0-100
          - repetition of @latest or tagName or revisionRef is disallowed
 - Verify traffic percents sum to 100 on client side and fail fast
 - Add e2e tests for traffic splitting
	 - create and update service, assign tags and set traffic to make an existing state
	 - run the scenario on existing state of service
	 - form the desired state traffic block
	 - extract the traffic block and form the traffic block struct actual state
	 - assert.DeepEqual actual and desired traffic blocks
 - Use logic to generate service name in the same way as namespace, use different service name per test case
 - Run e2e test for traffic splitting in parallel
 - Use timeout duration of 30m for e2e tests, use timeout parameter for go_test_e2e library function
 - Use tagName in flag description of --untag, avoiding conflict with --tag flag
 - Update CHANGELOG
2019-08-15 10:56:08 -07:00
Naomi Seyfer ffe80b9f87 Specify names on service update and generate names client-side. (#282)
* Groundwork for naming revisions automatically and deliberately

* Tests for name updates

* Add godoc comments

* Changelog entry for naming flags

* Error when trying to BYO revision name to an old-format service

* fix tests again

* Template the names

* Polsh, remove unused flags, generate helptext, add better helptext

* Decapitalize error msg

* Respond to Roland comments

* Forgot to add test file

* Be a good citizen, add more tests, try to get coverage happy.

* true dat

* Re-add implicit service prefix if one was not added.
2019-08-14 15:31:07 -07:00
Aaron Lerner 27d8f4330a Service and Revision labels (#342)
* Add support for service labels with --label or -l

* Add tests

* Fix typo

* Move MapToArray helper method to separate file

* Allow unsetting labels by passing empty value

* Fix test

* Add test case for label removal

* Wrap error message with flag

* Update docs to include --label

* Update labels on both services and revisions

* Add some test cases around weirder user input

* Change unset behavior and allow setting empty env and label

* Update docs for new unset behavior

* Make single keys to map to empty values

* Move helper to util

* Use assert.DeepEqual

* Use new mock test + check both service and revision

* Use new method and correct year
2019-08-13 17:07:06 -07:00
Doug Davis 74b3e10f76 Add support for -A variant of --all-namespaces (#356)
* Add support for -A variant of --all-namespaces

-A is my newest favorite kubectl flag, it's so much easier/faster to type
than --all-namespaces. kn users should benefit from it too!

Signed-off-by: Doug Davis <dug@us.ibm.com>

* tweak tests

Signed-off-by: Doug Davis <dug@us.ibm.com>
2019-08-09 07:01:05 -07:00
Roland Huß 3594b39659 refactor(plugins): Improved and simplified verifier and plugin list (#313)
* refactor(plugins): Improved and simplified verifier and plugin list

* Added proper executable check for current user
* Refactor plugin_list to make it more straightforward
* Seperate errors and warnings
* Don't return an error when no plugin is installed and `plugin list` is called
* Simplified tests
* Check assumption that a prefix is given in verify()

* fix(plugins): Fixed broken homedir expansion

* fix(plugin): Adapted to proper permission handling

E.g. if u-x, g+x and the user has the group of the file, but is also owner of the file then he is not allowed to execute the file.

* test(plugins): Added checks for the execution check for plugins

* chore(plugins): optimized tests to reflect the real unix behaviour

* chore(plugins): Moved plugin seenMap to top-level verify method.

Also, allow symlinks without warnings.

* refactor(plugins): Split up some methods in plugin_verifier to make them shorter

* fix: Tuned `plugin list` for better handling when no plugin directory exists
2019-08-08 14:30:59 -07:00
Roland Huß b4b254f64c feature(service describe): Output of service details (#252)
* feature(service describe): Output of service details

`kn service show` mimics `kubectl describe <sth>` as that it output detail information in human readable output.

A future extension should add machine readable output with `-o` to export
a single object in json/yaml (that is missing from `kn service list`)

This command shows information about the service itself, but also a summary about the associated revisions.

It also knows about scaling and concurrency options.

Options:

`--details`    : Print more information. By default only are shorter summary is shown

* chore: Cleanup up and refreshed dependencies

* fix(service describe): Integration test fix (revert "show" to "describe")

* fix: go.sum

* fix go.sum

* feature(service describe): Add printing of resources (requests/limits) + machine readable output with -o

* chore(service describe): Simplified digest handling

* chore(service describe): Sort maps by key when printed

* chore: Adapt mock framework

* chore(service describe): Test fixes

* chore: Added some tests

* more tests

* test: Moar tests

* chore: Even moar tests

* more, more tests

* changelog update

* fix(service describe): golint fixes
2019-08-08 08:23:56 -07:00
Naomi Seyfer d30beba541 Add --log-http option (#326)
* Add --log-http option

* Oh yeah build it and change docs and stuff

* And some test

* Actually test the thing I meant to

* There was a way to remove the downcast

* Test for http transport

* Some deps

* Elide sensitive headers from logging

* Test for eliding errors

* Feedback from CL
2019-08-05 23:49:55 -07:00
dr.max 59b2855d04 Implements Kn plugins re-using some code from kubectl plugins. (#249)
This version contains the following:

1. wraps the main root Kn command to support plugin
2. plugins are any executable in kn's config new pluginDir
   variable which defaults to $PATH
3. plugins must have name kn-*
4. 'kn plugin list' sub-command to list found kn plugins
5. skips any kn plugins found with name that match core
   commands, e.g., kn-service would be ignored
6. can execute any valid kn plugins found, e.g.,
   `kn valid` where the plugin file `kn-valid` is in path
   specified in 2.
7. unit tests (using gotest.tools)

And is missing:

1. integration tests
2. plugin install command
3. plugin repository command
4. plugin / Knative server version negotiation
5. anything else we agree on in plugin req doc

I plan to create issues for the things missing so we don't
end up with an even bigger PR. It's already big as is but is a
good MVP as per plugins requirement doc.
2019-07-26 13:29:48 -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ß 55073029b4 fix(build): Minor build optimizations (#265)
* Check that every generated file has been regenerated for CI
* No color when not on a tty which is useful for build logs
* Always do updates when called without args
* Removed -u option and added -c for codegen only (dep update, docs gen, formatting, license check)
2019-07-15 13:21:27 -07:00
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
Joan Edwards 314be82e0a Correct minor grammatical issue (#238) 2019-07-07 23:48:33 -07:00
Ashleigh Brennan 38a4a6fc18 Added link to OpenShift kubeconfig creation docs (#226) 2019-07-06 00:43:31 -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
Ali Ok e010ca816d Fix typo in README.md (#181) 2019-06-13 13:42: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 4280715ec3 Adds IBM's IKS to the list of services (update docs) (#131) 2019-05-20 08:57:30 -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 08a12e112f Updates docs/workflows.md (#109)
* checked each command and add any ouput
* removes all `service list` since that's no longer a command
* adds `service get` and output
2019-05-15 14:37:32 -07:00
dr.max 570325425f addressing comments on PR #99 (#99) 2019-05-14 11:08:40 -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