Commit Graph

228 Commits

Author SHA1 Message Date
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
Gong Zhang a607b16b0c Rename go files under command group dir (#245)
- Files under service dir
- Files under revision dir
- Files under plugin dir

[issue 229](https://github.com/knative/client/issues/229)
2019-09-06 00:13:03 -07:00
Gong Zhang b649b72694 Fill up test cases for files with low coverage (#399)
To get the test pass for https://github.com/knative/client/pull/245,
need to fill up test cases for files with low code coverage
2019-09-05 03:33:04 -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
Navid Shaikh 10f981ccaa Ensures kn cross platform build works in presubmit tests (#385)
Fixes #364

 - Ensure kn cross platform build works in pre-submit tests
 - Run ./hack/build.sh -x after running existing pre-submit tests
 - defines a function post_build_tests to invoke cross platform builds
 - post_build_tests will be run by test-infra after build tests are compelete
2019-08-26 10:59:17 -07:00
Toshinori Sugita 699ac5e7cb fix lint errors (#388)
* fix typo (misspell)

* ineffectual assignment to err (ineffassign)

* if block ends with a return statement, so drop this else and outdent its block (golint)

* should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)

* struct field LogHttp should be LogHTTP (golint)

* fix last typo
2019-08-24 22:46:13 -07:00
makocchi 04a55b27f2 Remove namespace from args (#386) 2019-08-22 18:00:12 -07:00
Roland Huß 9625b5f4c5 chore(plugins, services, routes): Aligned "Not found" messages (#359)
For the sake of consistency with out own service commands and for kubectl,

`kn plugin list` should print:

```
No plugins found.
```

`kn service list` should print:

```
No services found.
```

and not `No resources found.` like it does now.

Same for `kn routes list`.
2019-08-22 00:23:32 -07:00
Tsubasa Nagasawa d0dc3b75f3 feature(service list): Print NAMESPACE column as the first column when --all-namespaces is specified (#366)
* Make `kn service list --all-namespace` print namespace column

`kn service list` should print NAMESPACE column when specifying `--all-namespace` option, which follows the kubectl convention.

* Put services in default namespace at the top of the list

* Switch output of column definitions by priority field

A priority field is handled as follows:
- priority 0: print namespace column
- priority 1: print default columns
- priority 2: print additional columns for wide option

* Don't use AddFlags to bind all namespaces flag

* Update CHANGELOG

* Remove commented codes

* Fix import path

* Clean up

* Remove unnecessary return

* Swap the order of records
2019-08-21 23:57:33 -07:00
Navid Shaikh d6c798ad65 Adds option in hack/build.sh to build cross platform binaries (#371)
- Use `./hack/build.sh -x` or `./hack/build.sh --build-cross`
 - Doesn't touch any of the existing flow, providing these options will build binaries and exit
2019-08-21 16:16:33 -07:00
Naomi Seyfer 223ff5316a Pass on args to e2e tests for local script (#382) 2019-08-21 15:46:33 -07:00
Adam Harwayne 40631a6e97 Retain the request body when logging HTTP. (#378)
* Retain the request body when logging HTTP.

* hack/build.sh -u

* Add a unit test.

* Unit test redacted headers.
2019-08-21 12:23:33 -07:00