Commit Graph

449 Commits

Author SHA1 Message Date
Lv Jiawei bcf2ec3de8
Check deletionTimestamp for "kn revision delete" (#860)
* Check deletionTimestamp for "kn revision delete"

Fixes: #815

* Update error message for revision delete

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
2020-06-01 04:02:03 -07:00
dr.max e1ad66a60d
* allow plugins to extends all comamnd groups, e.g., kn-service-blah is OK (#834)
* prevent plugins that shadow commands of exsiting groups, e.g., kn-service-create is NOT OK
* list plugins that extend existing groups
* warn plugins that shadow command of existing groups
* add UTs for above
2020-06-01 03:07:03 -07:00
Navid Shaikh c1de0add97
Add --ce-override flag for apiserver and ping sources (#865)
* SinkBinding: Support update and remove of cloud events extensions

 - Add unit tests
 - Update flag description
 - Update parsing utilities for map

* APIServer: Add, update and remove cloud events extensions

 - Add --ce-override flag
 - Add unit tests

* PingSource: Add, update and remove cloud events extensions

  - Add --ce-override flag
  - Add unit tests

* Update CHANGELOG

* Update binding builder method name to CloudEventOverrides

* Fix lint warnings

* Add ceoverrides to unit test objects

* Update PR number in CHANGELOG

* Show ce-override extensions in describe output
2020-06-01 02:39:03 -07:00
Navid Shaikh d8a9692268
Add description for ContainerSource (#864)
for output of `kn source list-types`
2020-05-28 07:56:00 -07:00
Navid Shaikh cdf6f29880
Add --requests and --limits resource flags (#859)
* Add --requests and --limits resource flags

  Fixes #490

  - Add deprecation message for --requests-cpu, --requests-memory,
  --limits-cpu and --limits-memory flag usage.

  - Add error message if new and deprecated, requests and limits flags
    are used together.

* Add resources requests and limits example for service create

* Add mock style unit tests

* Update existing unit tests for deprecated flags

* Add integration tests

* Add CHANGELOG entry

* Fix lint warnings

* Add unit tests for resource flags

* Fix typo for service name in e2e tests

* Refactor resource validation utility into test lib

* Remove commented out code

* Add references about managing resources and GPU in example

* Update image references in examples
2020-05-28 01:45:59 -07:00
Navid Shaikh 8c4a28e466
docs: Update kn service create examples with real image (#862)
Fixes #673
 - uses image: `knativesamples/helloworld`
2020-05-27 17:21:59 -07:00
Martin Gencur c6537a8e84
Update Tekton resources to v1beta1 (#861)
* Update to Tekton v1beta1

* replace PipelineResource with Task

* Pull kn task from github
2020-05-27 06:31:59 -07:00
Roland Huß 93c58d294d
chore: Pinning to k8s version 0.16.4 like Knative serving/eventing does (#857) 2020-05-26 23:58:59 -07:00
Markus Thömmes 4ba1cca91e
Update dependencies, pin k8s deps. (#855) 2020-05-26 00:39:49 -07:00
Daniel Helfand 4b3b971ae5
remove use of os.Exit (#851) 2020-05-25 22:12:48 -07:00
Markus Thömmes 739e63f835
Replace pkg/errors with stdlib errors. (#853)
* Replace pkg/errors with stdlib errors.

* Add changelog entry.

* Fix changelog.
2020-05-25 08:10:47 -07:00
coryrc 2df459577e
Use test-infra direct insertion method (#840)
Now available from knative/test-infra repo directly.
2020-05-25 06:57:47 -07:00
Daniel Helfand 9803cd6efd
fix panic for kn source ping describe with sink uri (#848) 2020-05-20 01:36:58 -07:00
Brian Tannous c7d28d5401
Update kn_completion for ZSH (#844)
Fixes: https://github.com/knative/client/issues/839
2020-05-19 03:09:56 -07:00
Daniel Helfand 0df54bc500
refactor kn service delete --all e2e test (#837) 2020-05-15 04:09:00 -07:00
Navid Shaikh 20e1a79b62
fix(e2e): Create next namespace for e2e if one exists (#835)
* fix(e2e): Create next namespace if one exists

 Do not error out if the namespace to run e2e into exists, try creating
 next one in row. Retry at 20 next namespaces, before erroring out.

* Tag plugin tests as !serving and !eventing

* Debug: Create a test namespace to see if its skipped

* Revert "Debug: Create a test namespace to see if its skipped"

This reverts commit 8b45fcef4d.

* Refactor file utils from e2e tests to test lib
2020-05-14 04:33:59 -07:00
Daniel Helfand 6f615c6595
add kn service delete --all (#836) 2020-05-14 03:51:59 -07:00
Matt Moore 9bbce80ffa
[master] Format markdown (#833)
Produced via:
  `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github | grep -v docs/cmd/)`
/assign maximilien rhuss
/cc maximilien rhuss
2020-05-11 17:22:47 -07:00
Navid Shaikh e05c33447e
fix(e2e): Refactor e2e utils and resource actions (#832)
* fix(e2e): Refactor e2e utils and resource actions

 brings commonly re-used utilities into lib/test so they can be resused
 and e2e can be run selectively for eventing/serving.

* Refactor service and revision e2e test utils into test lib

* Docstrings for exported e2e test utils
2020-05-11 06:09:46 -07:00
Roland Huß 36716c3937
chore: Reworked CLI conventions and include more details (#831)
* chore: Reworked CLI conventions and include more details

* chore: Review changes

* Update conventions/cli.md

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* Update conventions/cli.md

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>

* add changes based on review comments

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
2020-05-09 08:33:45 -07:00
Daniel Helfand 0a65978ceb
skip LatestReadyRevisionName if Revision is pending or unknown (#825) 2020-05-06 22:47:44 -07:00
dr.max 9774d0700a
fixes(#814) allow plugins to extend the 'source' command group (#818)
* fixes(#814) allow plugins to extend the 'source' command group

* introduce a list of command group that can be extended (currently only source)
* check if plugin main group is in that list and execute, otherwise fail
* add e2e test for both plugin that is allowed and not allowed to extend existing group

* * move IsAllowedExtensibleCommandGroup to plugin/verifier.go
* added tests for the public function
* change verifier to use IsAllowedExtensibleCommandGroup to allow plugins for extensible command groups

* moved `InAllowedExtensibleCommandGroups` to plugin.go so that it is
usable in windows builds
2020-05-05 11:09:44 -07:00
Daniel Helfand aa12a67910
correct typo in pull request template (#826) 2020-05-05 09:11:44 -07:00
Murugappan Chetty 644ecb68e5
refactor kn service export to export revisions (#819)
* refactor kn service export to export revisions

* refactor kn service export to export revisions

* refactor kn service export to export revisions

* refactor kn service export to export revisions

* kn service export refactor

* kn service export refactor

* kn service export refactor

* kn service export refactor

* review changes for #819
2020-05-05 02:19:44 -07:00
Roland Huß c41e9fd923
chore: Update changelog for 0.14.0 (#820)
* chore: Update changelog for 0.14.0

* chore: Tune wording in Changelog.adoc

* chore: Update to eventing 0.14.1 and fixed `kn version`
2020-04-21 23:36:40 -07:00
Ying Chun Guo 3c3b029b85
completed remove isController from apiserver source command group (#817) 2020-04-21 09:47:35 -07:00
Ying Chun Guo a730e98802
completed remove isController from apiserver source command group (#817) 2020-04-21 08:43:08 -07:00
Lv Jiawei f936c93698
Check DeleteTimestamp before updating resource (#805)
* Check DeleteTimestamp before updating resource. Include:
service, apiserver source, sink binding, ping source, trigger.
2020-04-21 04:54:50 -07:00
Navid Shaikh 286c6cd0b8
Update link of a PR in CHANGELOG (#813) 2020-04-20 03:02:49 -07:00
Roland Huß df9278743b
chore: Update to Knative serving/eventing 0.14.0 (#810)
* chore: Update to Knative serving/eventing 0.14.0

and also move ApiServerSource to v1alpha2, adapting the option
(from "controller" to "labelSelector")

* fix go.sum

* chore: Update and fix tests

* chore: fix go.sum
2020-04-16 14:27:48 -07:00
Navid Shaikh ccf8b69fc3
chore(e2): Run tests against v0.14.0 release of serving, eventing (#807) 2020-04-15 08:05:48 -07:00
Navid Shaikh 472ed75028
Update CHANGELOG for v0.13.2 (#804) 2020-04-15 01:41:47 -07:00
Navid Shaikh 98282307f6
e2e: Run tekton e2e against pipeline v0.11.1 (#803)
* Use buildah task from master branch and paramterize FORMAT

* Configure pipeline v0.11.1

* DNM: Run tekton e2e in this PR

* Revert "DNM: Run tekton e2e in this PR"

This reverts commit 903f5bec409c90174a37cc84acd561a405ef896e.
2020-04-14 23:40:47 -07:00
Navid Shaikh 48f4359b24
e2e: Foreground delete for revisions and services in e2e (#794)
* e2e: Foreground delete for revisions and services in e2e

 to avoid any race conditions and flakes

* Use --wait instead of --no-wait=false
2020-04-14 18:20:47 -07:00
Navid Shaikh 46ecdcc32f
Make wait, no-wait and async flags per bool var CLI convention (#802)
* Make wait, no-wait and async flags per bool var CLI convention

 Fixes #800

 - Deprecated bool vars can be supported for CLI convention
 - Bind --async flag value to --no-wait
 - Only one flag among [wait, no-wait, async] can be provided, else raise an error

* Simplify conditionals

* Add unit tests for deprecated flag async

* Fix a typo
2020-04-14 12:36:16 -07:00
Ying Chun Guo 2225b4c8dd
Fix resource listing with -oname flag (#799)
* Fix resource listing with -oname flag

* add e2e tests
2020-04-14 07:10:16 -07:00
Shashwathi 88109bd439
Add e2e test for different service and revision label (#766)
* Add e2e test for different service and revision label

- Store results from one call and validate both revision and service labels
- Update var name for more better readability

Signed-off-by: Andrew Su <asu@pivotal.io>

* Test verifies expected labels are exact match to received labels
2020-04-14 02:22:16 -07:00
Lv Jiawei de4c36f937
Show all revisions when run `service describe -v` (#790)
* The `kn service describe -v` command shows repetitive revisions, because
  the revision would be covered by next one.
2020-04-14 02:00:16 -07:00
Navid Shaikh b7a2a09085
Pin serving to v0.13.2 and update version command (#797)
* Pin serving v0.13.2 dep to v0.13.2

* Update version command

 now points to serving v0.13.2 and eventing v0.13.6

* Copy go.sum as generated in CI
2020-04-14 01:26:15 -07:00
Ying Chun Guo d725ef594a
Fix error when output is set to name (#775)
* fix error when output is set to name

* add e2e test

* change to flags/listprint.go
2020-04-13 21:58:15 -07:00
Matt Moore f4c96ef558
[master] Auto-update dependencies (#791)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign maximilien rhuss
/cc maximilien rhuss
2020-04-13 02:10:10 -07:00
Doug Davis 030279be38
Add -a flag as alias for --annotations (#782)
I find that I'm using annotations more and more and since `-a`
wasn't being used I decided we should save people from typing too much

Signed-off-by: Doug Davis <dug@us.ibm.com>
2020-04-10 04:45:05 -07:00
Lv Jiawei deb96303dd
Add "--target-utilization" to manage "autoscaling.knative.dev/targetUtilizationPercentage" annotation (#788)
* Support setting "autoscaling.knative.dev/targetUtilizationPercentage" annotation.
2020-04-09 03:49:03 -07:00
Doug Davis de1248412f
Remove the delete propagation flag (#770)
* Remove the delete propagation flag

In it's current state it now takes me about 25 seconds for the `kn delete`
to complete. Before https://github.com/knative/client/pull/682 it used to be
almost immediate. This is because we now pass in the
`DeletePropagationBackground` flag. I believe this is a mistake, not only
because of the 20+ seconds of additional time to delete things, but IMO
the CLI should talk to the server in the same way regardless of the --wait
flag. That flag should just be a CLI thing to indicate if the user wants the CLI
to wait for the server to complete but not HOW the server should do the delete.

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

* try just tweaking the --no-wait flag

Signed-off-by: Doug Davis <dug@us.ibm.com>
2020-04-08 03:35:01 -07:00
Matt Moore a9c2e4bfe9
[master] Auto-update dependencies (#784)
Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign maximilien rhuss
/cc maximilien rhuss
2020-04-08 02:43:01 -07:00
dr.max 395fc6c3b2
fix(#772) refactored / simplified parameters to KnResultCollector (#773)
* fix(#772) refactored / simplified parameters to KnResultCollector

* added Teardown() call in VersionTest
2020-04-08 02:18:01 -07:00
Navid Shaikh e88ee59d45
Update sink binding create usage string (#785) 2020-04-07 16:51:00 -07:00
Navid Shaikh d1eb9bcb71
Use vendored deps while running e2e locally (#783)
Also set GO111MODULE=on unconditionally
2020-04-07 16:26:08 -07:00
Navid Shaikh 5c56a0710c
Add badges in README (#780)
For go reference, go report, releases, license and slack.
2020-04-07 16:26:00 -07:00
dr.max 70f96a102c
fix(issue #762): correct error message when updating service (#778)
* fix(issue #762): correct error message when updating service

* correct message when updating service and passing many names
* fix issue with TestServiceUpdateWithMultipleImages running create vs update

* * added TestServiceDescribeWithMultipleNames
* added TestServiceCreateWithMultipleNames
* fix error message for service delete since many names can be passed
2020-04-07 12:55:00 -07:00