Commit Graph

12 Commits

Author SHA1 Message Date
Navid Shaikh f91fb57f9a
kn v0.16.0 release prep (#922)
* Update unit test for invalid concurrency target value

* Vendor v0.16.0 eventing and serving

* Commit the LICENSES generated by hack/update-deps.sh

* Spare third_party dir from license check in hack/build.sh

* Update eventing and serving version for 'kn version'

* Use DeprecatedInjectionAnnotation key for backward compatibility

  Fixes #918
  Use DeprecatedInjectionAnnotation, i.e. "knative-eventing-injection"
  for reconciling broker via namespace labeling and trigger annotations.

  From eventing v0.16.0 release, this key is changed to "eventing.knative.dev/injection"
  however, older eventing installation wont recognize it. So we continue
  using the deprecated key until the sugar-controller would support reconciling
  on either keys.

* Fix(kn version): Display eventing.knative.dev at v1beta1 version

 We've been showing 'v1alpha1' in kn version while we actually
 vendor and refer v1beta1 for eventing.knative.dev

* chore(e2e): Run tests against serving/eventing v0.16.0 release

* Update test for concurrency-target to expect new error message

 the new error message for incorrect concurrency-target value contains "should be at least 0.01"

* Setup sugar-controller for released eventing version setup

 - reuse knative_setup util from common lib for latest-release CI setup

* Fix typo in YAML URL and add subheader for sugar-controller install
2020-07-10 10:41:19 -07:00
Navid Shaikh 4ee2dc4fd3
Use broker injection label key from trigger types (#917)
- do not hard code as there is a change coming it in eventing v0.16 release
2020-07-07 04:14:44 -07:00
Navid Shaikh 887d367861
Refer broker from v1beta1 APIs and add missing e2e tests (#895)
* Move broker injection namespace label, unlabel utilities to lib

* Refer broker from eventing v1beta1 APIs

* Add e2e test for refering default broker as sink

* Fix unit tests
2020-06-19 05:43:25 -07:00
Roland Huß b916a5b3ed
Add grouping for help message + streamlined help messages (#887)
* Add grouping for help message + streamlined help messages

The top-level looks like

kn is the command line interface for managing Knative Serving and Eventing objects

 Find more information about Knative at: https://knative.dev

Serving Commands:
  service     Manage Knative services
  revision    Manage service revisions
  route       List and show service routes

Eventing Commands:
  source      Manage event sources
  trigger     Manage event triggers

Other Commands:
  plugin      Manage kn plugins
  completion  Output shell completion code
  version     Show the version of this client

Use "kn <command> --help" for more information about a given command.
Use "kn options" for a list of global command-line options (applies to all commands).

The following changes have been applied:

* Add CommandGroups for grouping commands together
* Add flexible templating for the help messages
* Moved global options to an own command ('kn options', much like 'kubectl options')
* Aligned wording and typography of help messages

These features has been highly inspired by kubectl grouping & help templating but has been considerably been stripped down to the needs of kn.

Signed-off-by: Roland Huß <roland@ro14nd.de>

* chore: Add missing file

* Update pkg/templates/command_groups.go

Co-authored-by: Matt Moore <mattmoor@vmware.com>

* chore: Add some test for error messages

* fix formatting

* chore: Add test

* moar tests

* Update pkg/kn/commands/completion/completion.go

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

* Update pkg/kn/commands/source/apiserver/delete.go

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

* Update pkg/kn/commands/service/list.go

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

* Update pkg/kn/commands/route/route.go

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

* Update pkg/kn/commands/revision/delete.go

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

* Update pkg/kn/commands/plugin/plugin.go

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

* Update pkg/kn/commands/service/delete.go

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

* Update pkg/kn/commands/revision/delete.go

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

* Update pkg/kn/commands/service/delete.go

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

* regen docs

* chore: Update conventions doc

* Move some direct configuration of rootcmd to NewRootCommand()

* Moved CaptureOutput to "test" package for reuse

Co-authored-by: Matt Moore <mattmoor@vmware.com>
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
2020-06-18 00:06:25 -07:00
Daniel Helfand 3f146b14db
Return Error Message from Using --untag with Nonexistent Tag (#880)
* return error message from using --untag with nonexistent tag

* improve err message for --untag and add e2e test

* change untagRevision to return bool and add traffic e2e tests

* update changelog
2020-06-10 23:22:23 -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
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
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
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
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
dr.max e524610b65
fix(769): various issues with godoc documents (#771) 2020-04-02 01:39:17 -07:00
dr.max df78b8b40c
(refactor) address the e2e extract / refactor of issue #763 (#765)
* (refactor) address the e2e extract / refactor of issue #763

* various updates to address reviewers feedback

* renamed lib/test/integration to lib/test and package to test
2020-04-01 09:21:18 -07:00