Commit Graph

241 Commits

Author SHA1 Message Date
dr.max 1f27ecaa92 removes remaining references to 'lookup-plugins-in-path' (#481) 2019-11-11 09:56:21 -08:00
Roland Huß ad02647ddc chore: Update to k8s 1.15.5 and fixing go.sum error (#493) 2019-11-11 02:00:20 -08:00
Roland Huß 07743f8dab chore: Update testing infrastructure (#488) 2019-11-07 06:29:56 -08:00
Doug Davis 39b7313fb0 Improve error message (#486)
While testing I specified this on the `kn` command line:

```
./kn service create echo --concurrency-limit=1 --concurrency-target=1 --env foo=bar --limits-cpu=1000m --limits-memory=1024m --max-scale=1 --min-scale=1 --port=9999 --requests-cpu=250m --requests-memory=64mi --image duglin/echo
```
and it returned:
```
unable to parse quantity's suffix
```

I had no idea which value it didn't like. So this PR makes it so the output
is now this:
```
Error parsing "64mi": unable to parse quantity's suffix
```

Still not perfect since I still had to think way too hard to realize that it
didn't like the lower-case `m`, but that's a different issue.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2019-11-06 13:21:03 -08:00
Navid Shaikh 22c65d65ef chore: Prep for v0.10.0 release (#483)
- Update CHANGELOG
2019-11-06 05:24:02 -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
Roland Huß e6f15f9b58 fix(service describe): Clarify URL labels (#460)
* fix(service describe): Clarify URL labels

Fixes #459.

* fix: integration test
2019-11-05 21:11:02 -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
Ying Chun Guo c5b3f7af0d add serviceaccount to service describe (#472) 2019-11-05 03:11:25 -08:00
Navid Shaikh 44dafbd780 Adds zsh completion (#476)
* Adds zsh completion

 - Adds back zsh completion after vendoring cobra library with a fix
 - Updates the command definition to accept argument either of ['bash', 'zsh']
 - Moves the completion command definition under `pkg/kn/commands/completion`
 - Updates docs
 - Updates CHANGELOG.adoc

* fix(golint): exported function should have comment

* Fixes PR number in CHANGELOG.adoc

* Updates unit tests
2019-11-05 02:42:25 -08:00
dr.max 7ffa49f72d fix English typo: 'an equally' instead of 'a equally' (#469) 2019-11-05 00:40:24 -08:00
Roland Huß d8d0192206 chore: Update to Knative Serving 0.10.0 (#474)
* chore: Update to Knative Serving 0.10.0

* chore: Add missing dep, introduced by codegen test (when installing goimports)

* added missing target dir
2019-11-04 13:02:19 -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
Navid Shaikh dd5b05cd42 Updates spf13/cobra dep to v0.0.5 (#443)
* Updates spf13/cobra dep to v0.0.5

 Fixes #426

 - and a couple of patches on top which aren't merged yet
 	- spf13/cobra#884
	- spf13/cobra#899
 - also updates viper to 1.4.0

* Updates to go.sum

* Updates go.mod

 as a result of `go install golang.org/x/tools/cmd/goimports`
2019-10-30 03:31:11 -07:00
Roland Huß 4ab869aecf chore: Final preps for 0.9.0 release (#463)
* chore: Final preps for 0.9.0 release

* chore: Update knative dependency in `kn version`
2019-10-29 11:19:12 -07:00
Naomi Seyfer aafdb9a238 Refactor describe: printing levels and shared kn code (#430)
* Refactor describe: printing levels and shared kn code

* Test this refactor more

* Comments
2019-10-29 03:08:11 -07:00
Roland Huß b871112e1f chore: Update changelog in prep for 0.8.0 (#461)
Added missing PRs with some substantial change, sorted list from newer to older PRs.
2019-10-29 01:22:11 -07:00
Navid Shaikh a32f5666b5 Vendors serving v0.9.0 (#458)
* Vendors serving v0.9.0

* Updates references per serving v0.9.0 vendoring

 - Updates code and tests to refer the required data structure and method/function calls
 - duckv1beta1 -> duckv1 conditions
 - traffic percent value is now *int64
 - containerConcurrency validation method relocation

* fix(golint): exported function should have comment

 for NonReadyConditionReason function

* Updates check for removing null targets

 fixes the pointer value check

* Updates per review comments
2019-10-27 22:22:36 -07:00
Ying Chun Guo 492f1dce76 add revision information to service list (#441) 2019-10-25 02:40:35 -07:00
dr.max 462973c51f removes zsh completion since it does not work (fixes #426) (#439) 2019-10-23 00:43:27 -07:00
Gong Zhang f77c034c4a Refine route list output (#407)
- Only show NAME/URL/READY

[issue 350](https://github.com/knative/client/issues/350)
2019-10-22 23:33:27 -07:00
Navid Shaikh df04573590 fix(version): Displays supported APIs and version (#453)
* fix(version): Displays supported APIs and version

 Fixes #404

 ```
  ./kn version
Version:      v20191017-local-6328a73-dirty
Build Date:   2019-10-17 09:55:55
Git Revision: 6328a73
Supported APIs:
- serving.knative.dev/v1alpha1 (knative-serving v0.8.0)
 ```

* Removes ServingVersion feeding from ldflags

 - hardcodes the supported APIs as they're supposed to be updated when we bump deps

* Fixes typo in e2e tests

* Uses array for deterministic order of printing supported APIs
2019-10-18 03:35:18 -07:00
Navid Shaikh f03508f74a Adds go mod tidy to update dependencies function hack/build.sh (#455)
- Added `go mod tidy` before `go mod vendor` command
2019-10-17 23:33:18 -07:00
Navid Shaikh 96c8028de1 fix(e2e): Improves the error message upon mismatch of traffic targets (#454)
* fix(e2e): Improves the error message upon mismatch of traffic targets

 Fixes #434
 - The error message now prints the expected/actual length of traffic targets
 - Also prints the actual traffic targets

* Fixes Golint errors

  Golint errors: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...).
2019-10-17 09:32:16 -07:00
Navid Shaikh 73dfd21d21 chore: go mod tidy updates (#450)
Generated by
 ```
 go mod tidy -v
 ```

 Fixes #449
2019-10-16 12:57:15 -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
Navid Shaikh 039cdfcc09 fix(e2e): Uses serving v0.8.1 in custom prow job (#452)
s/v0.7.1/v0.8.1
2019-10-16 03:16:15 -07:00
Ying Chun Guo a252829ceb fix a small error in verify-codegen.sh (#451) 2019-10-16 02:39:15 -07:00
Navid Shaikh 419678a4b8 Updates YAML transitive dependency to v2.2.4 (#448)
As per title, just to make sure we're not vulnerable to CVE-2019-11253.
 See kubernetes/kubernetes#83253.
2019-10-15 14:36:15 -07:00
Roland Huß 53125bcbdb chore: Some minor printout fixes (#442)
* chore: Some minor printout fixes

* test fixes
2019-10-11 09:51:31 -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
Roland Huß e67d207d3b chore(build.sh) Add indicator in watch mode after successful compilation (#432)
* chore(build.sh) Add indicator in watch mode after successful compilation

* chore(build): Update changelog
2019-10-08 04:34:38 -07:00
Roland Huß 80f7f341bb chore(test): Add a ContainsAllIgnoreCase helper method (#433) 2019-10-08 03:40: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
Roland Huß 6ffef8dd88 refactor(knclient): Moved KnClient -> KnServingClient (#420)
This is in preparation of introducting eventing and makes sense anyway.
Also, the GVK update handling has been moved to "util" so that it then
can be also reused by eventing.
2019-09-28 09:21:45 -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
Toshinori Sugita 43f8386b82 fix analyzer warnings (#412)
* remove unused codes (structcheck)(varcheck)

* add error handling (errcheck)

* add error handling (ineffassign)

* fix lint errors (golint)
2019-09-23 03:03:12 -07:00
Tsubasa Nagasawa 94bb1cf8db Use sets utility for saving updated env vars (#409) 2019-09-17 07:53:46 -07:00
Tsubasa Nagasawa b1f5e7d6fe Update release note section in PR template (#410)
Remove unused release note section in PR template and add instruction for updating CHANGELOG.
2019-09-16 06:18:40 -07:00
Roland Huß 34fcd89bcd chore(build): Tuned cross compiling a bit (#405)
* Renamed to --build-cross to --all (as we are not building a cross but all binaries. Could be renamed to --all-bin to be more clear)
* Fixed inclusion of external build-flags.sh script (which was broken when used build.sh with a symbolic label)
* Moved cross compiling to the end (to not interfer with --fast or --codegen)
* Aligned labels (to be short and concise)
2019-09-12 07:39:32 -07:00
Tsubasa Nagasawa 9b52fc8345 Update EnvVars in alphabetical order of Env key name (#389) 2019-09-12 01:12:32 -07:00