Commit Graph

282 Commits

Author SHA1 Message Date
David Simansky a736af7129
Combine update deps actions format manually (#1484)
* upgrade to latest dependencies

bumping knative.dev/eventing ff4bc40...5f69768:
  > 5f69768 upgrade to latest dependencies (# 5817)
  > a6a819d upgrade to latest dependencies (# 5812)
bumping knative.dev/networking c2191da...91e7d04:
  > 91e7d04 upgrade to latest dependencies (# 531)
  > 16ef524 upgrade to latest dependencies (# 529)
  > cc26c45 Update actions (# 530)
  > 0c6b765 Deprecate httpProtocol: "Disabled" in config-network (# 528)
bumping knative.dev/pkg fa2f8f1...3463dd7:
  > 3463dd7 upgrade to latest dependencies (# 2315)
  > a5bb759 upgrade to latest dependencies (# 2314)
  > e61a20d Update actions (# 2313)
  > 0e24b49 Format go code (# 2312)
bumping knative.dev/hack 815cd31...47ac3b0:
  > 47ac3b0 Split build tags that are in a comma separated list (# 83)
  > 8687668 [# 50] Add error message when Bash < 4 (# 79)
  > 8d79600 Fixes # 81 (# 82)
  > 51582ce fix misspelling functionallity -> functionality (# 78)
  > 675e1fd Correctly specify the user when creating clusterrolebinding for kind (# 80)
bumping knative.dev/serving 7c6d4bc...30087cd:
  > 30087cd upgrade to latest dependencies (# 12145)
  > e5d8560 Format go code (# 12139)
  > c9b2e25 upgrade to latest dependencies (# 12141)
  > ebdd09e Update actions (# 12140)
  > caced61 Update net-certmanager nightly (# 12138)
  > c6f1707 Add logic to retry pause/resume for pod freezer (# 12049)
  > 0780c10 Trust k8s readiness signal (# 12086)
  > 0592224 Update net-kourier nightly (# 12135)
  > 1cac17a Fix HTTP Redirect test for Contour (# 12124)
  > 8ecc7f9 Update net-istio nightly (# 12134)
  > f37a630 Update net-certmanager nightly (# 12133)
  > 04efc1e Update net-kourier nightly (# 12128)
  > 8cc9b0d upgrade to latest dependencies (# 12132)

* Update actions
2021-10-18 08:56:36 -07:00
David Simansky c7bad9f123
Fix domain mapping E2E test config (#1476)
* Fix domain mapping E2E test config

* Pin GKE Kube version to 1.20
2021-10-13 03:20:47 -07:00
Roland Huß 61b8a75414
Update versions for 0.26.0 (#1459)
* Deprecate `lookup-path` option and updated relevant documentation

Lookup in path is now the default for all plugins.
This option will be removed eventually in a future version,
when path lookup is enabled uncoditinally and can't be turned of.

* Update versions for 0.26.0
2021-09-22 02:11:17 -07:00
Gunjan Vyas 5d4b4f3759
Fix windows e2e plugin tests (#1457)
* Fix windows e2e plugin tests

* Suggested changes
2021-09-21 09:54:37 -07:00
Martin Gencur 7e90dca8f3
Tekton - use ClusterRoleBinding v1 (#1440)
* Tekton test - ClusterRoleBinding v1

* make it compatible with Kubernetes 1.22

* TMP: Test Tekton in presubmits

* Revert "TMP: Test Tekton in presubmits"

This reverts commit 8996ac7692.
2021-08-30 07:56:28 -07:00
Martin Gencur 95193bd7e5
TestServiceExport works with images specified by digest (#1435)
* TestServiceExport works with images specified by digest

* Do not expect image name in TestSourceContainer test

* it might not be available if the test image is passed as image digest
2021-08-30 03:50:28 -07:00
Lionel Villard 035150ec4c
update versions to 0.25 (#1425) 2021-08-10 18:18:59 -07:00
Gunjan Vyas ce790b40d6
Adding --tls option to domain create command (#1419)
* Adding --tls option to domain create command

* Adding client test for builder

* Update CHANGELOG.adoc

Co-authored-by: David Simansky <dsimansk@redhat.com>

* Edited domain create usage message

* Update docs/cmd/kn_domain_create.md

Co-authored-by: Roland Huß <rhuss@redhat.com>

* Update pkg/serving/v1alpha1/client.go

Co-authored-by: Roland Huß <rhuss@redhat.com>

* Update docs and usage message

* Changing test domain name in e2e for tls test

* fix e2e domain create test case

Co-authored-by: David Simansky <dsimansk@redhat.com>
Co-authored-by: Roland Huß <rhuss@redhat.com>
2021-08-10 05:09:13 -07:00
David Simansky fc7e87667f
Add support for multi-containers (#1382)
* Add support for multi-containers

* Update examples

* Fix UpdateContainers to match by name

* Add experimental note & tests

* Rename flag to --extra-containers

* Fix formatting

* Fix flag renaming leftovers

* Update pkg/kn/flags/podspec_test.go

Co-authored-by: Roland Huß <rhuss@redhat.com>

Co-authored-by: Roland Huß <rhuss@redhat.com>
2021-08-09 12:25:12 -07:00
Gunjan Vyas 9d1bfc6197
Adding class option to broker create (#1402)
* Adding --class flag to broker create command

* Updated broker class usage

* Updated broker create examples
2021-08-06 06:36:20 -07:00
Roland Huß a252d9b38d
Add an update timestamp to trigger the creation of a revision when needed. (#1364)
* Add a update timestamp anytime a new revision should be triggered. Previously client side revision names was this trigger but since we switched to server-side revision naming by default that didn't work anymore (and hasn't worked with server-side revision naming before, too).

Fixes #1318.

* fix e2e test

* add some unit tests

* Update error handling + added some tests

* fixed compile error in test

* lint fixes
2021-07-26 12:17:16 -07:00
Gunjan Vyas b05a1114b3
Adding base64 data handling to ping update command (#1392) 2021-07-26 02:59:15 -07:00
Martin Gencur c145ecaf26
Use namespaced kubectl for sa,role,rolebinding in tests (#1396) 2021-07-22 05:06:03 -07:00
Martin Gencur 2d6cab730d
Run tests as project admin (#1384)
* Create Broker explicitly rather than by labeling namespace

* creating explicity is allowed for users with project admin permissions
in the given project

* Use Role instead of ClusterRole to work with Sources

* this allows for running the tests as project admin users and don't
require cluster-admin permissions

* Separate SourceList test for cluster admin and regular user

* Instructions for running E2E as project admin

* Fix imports

* Define output as a new variable in source_list_crd_test

* Fix golint

* Reference an issue created for source list-types
2021-07-14 00:53:31 -07:00
David Simansky dfc8665d12
Remove standalone DomainMapping setup (#1370) 2021-07-08 08:00:23 -07:00
Martin Gencur 157d568bcb
Do not cleanup on failure in Tekton tests (#1369)
* Cleanup Tekton tests only on success

* TMP: Run in presubmits

* Skip Istio addon in Tekton tests

* Revert "TMP: Run in presubmits"

This reverts commit d050971465.
2021-07-08 05:13:23 -07:00
Dave Protasowski 0bbb3ec9d9
update versions to 0.24 (#1360)
* update versions

* upgrade integration tests
2021-06-29 12:00:17 -07:00
Zbynek Roubalik a086cc9707
Add `env-value-from` flag & keep order of env vars in created/updated services (#1328)
* Add --env-value-from & preserve env var order

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* add e2e test for checking Service Env Vars

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* update changelog

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* refactor UpdateEnvVars()

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* apply review suggestions

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* fix typo

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* improve test cases names

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-29 01:48:13 -07:00
Hyounggyu Choi 217df5ccf5
Make e2e test run over other networks (#1339) 2021-06-08 12:52:41 -07:00
Ville Aikas 3cc608f9b1
bump presubmit to .23 (#1323) 2021-05-18 23:55:15 -07:00
Martin Gencur adb6bdff74
Fully qualified test images (#1307)
* Use fully qualified image references in helloworld Dockerfile

* TMP: Run tekton tests in pre-submit

* remove this when the tekton tests pass

* TMP: Use mgencurs fork so that buildah uses the updated Dockerfile

* TMP: Fix running in pre-submit

* Revert "TMP: Fix running in pre-submit"

This reverts commit 35694f067e.

* Revert "TMP: Use mgencurs fork so that buildah uses the updated Dockerfile"

This reverts commit b7ad15e4d8.

* Revert "TMP: Run tekton tests in pre-submit"

This reverts commit 36d3a95c1b.
2021-05-10 05:40:00 -07:00
David Simansky e5b19e12ab
Update Eventing Sources API to v1 (#1299)
* Update Eventing Sources API to v1

* Update vendor dir

* Fix imports formatting

* Move PingSource client to v1beta2

* Fix sink resolve

* Fix serving version string

* Use Eventing version 0.22.1 in e2e tests
2021-05-03 03:12:58 -07:00
Yevhen Vydolob 563f1d9294
Fix service/revision list output with '-o' param (#1276)
* Fix service/revision list output with '-o' param

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>

* Update CHANGELOG

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>

* Simplify output flag check

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>

* Respect '-o' in all list commands

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>

* Fix imports

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>

* Fix e2e test

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>

* Fix e2e test

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>

* Remove unnecessary import

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>

* Fix import

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>

* Fix tests

Signed-off-by: Yevhen Vydolob <yvydolob@redhat.com>
2021-04-13 07:53:00 -07:00
David Simansky 33deb82a98
chore(ci): Update E2E latest release versions for Serving & Eventing (#1285) 2021-04-08 09:49:51 -07:00
David Simansky 10ea0df157
Add DomainMapping CRUD commands (#1267)
* Add DomainMapping CRUD commands

* fix: Reflect review feedback

* fix: Fix prealloc lint error

* fix: Add specific reference resolution

* fix: Remove Kubernetes support in ref

* chore: Add context param to client functions
2021-04-01 08:53:23 -07:00
Martin Gencur 43b669fe9f
Pass revision to git-clone Tekton task - fix nightly Tekton tests (#1270)
* Pass revision to git-clone Tekton task

* the branch main branch has been renamed from "master" and the default
value for the git-clone task is no longer valid

* TMP: Test Tekton in-presubmit

* Revert "TMP: Test Tekton in-presubmit"

This reverts commit 23649c9a71.
2021-03-19 07:39:53 -07:00
Kaustubh Pande 431637a1d9
add support for namespace for all commands that takes --sink option (#1264) 2021-03-18 06:41:54 -07:00
Kaustubh Pande 2ad8dfe483
add --prune & --prune-all options to delete all the unreferenced revisions (#1217) 2021-03-15 02:26:00 -07:00
David Simansky 95ccaeb648
Use common Eventing setup from hack library (#1258)
* Use common Eventing setup from hack library

* fix: Keep eventing core though
2021-03-10 02:24:25 -08:00
David Simansky ca5299334e
Use net-istio provided version in E2E setup (#1256)
* WIP: Use net-istio provided version in E2E setup

* fix: Fix version string

* fix: Fix header

* chore: Cleanup istio setup script
2021-03-10 00:51:25 -08:00
Markus Thömmes 95b0db5b96
Drop master references to knative repos (#1254) 2021-03-09 03:42:25 -08:00
Tonia Elengikal a9687c6417
kn source-list types: adding column to specify built-in source (#1246)
* # This is a combination of 9 commits.
# This is the 1st commit message:
adding BUILT-IN SOURCE column for kn source list-types

# The commit message #2 will be skipped:

#	changing list test to check for BUILT-IN SOURCE column

# The commit message #3 will be skipped:

#	changing e2e source list test to check for BUILT-IN SOURCE column

# The commit message #4 will be skipped:

#	adding CHANGELOG entry

# The commit message #5 will be skipped:

#	kn source list-types: changing BUILT-IN SOURCE to BUILT-IN and moving DESCRIPTION column to the end

# The commit message #6 will be skipped:

#	changing BUILT-IN SOURCE to BUILT-IN in changelog

# The commit message #7 will be skipped:

#	Update CHANGELOG.adoc
#
#	Co-authored-by: David Simansky <dsimansk@redhat.com>

# The commit message #8 will be skipped:

#	kn source list-types: changing column header to S, values to X, and moving to second column

# The commit message #9 will be skipped:

#	fixing CHANGELOG merge conflict

* adding BUILT-IN SOURCE column for kn source list-types
2021-03-09 02:45:25 -08:00
Navid Shaikh d49194648b
docs: About e2e prow jobs (#1250) 2021-03-05 15:43:21 -08:00
Murugappan Chetty 609d1741f3
kn export defect to honor mode (#1212)
* kn export defect to honor mode

* add test for export mode without revisions

* change default to export

* add export as default

* change tests for export mode change
2021-03-04 06:00:15 -08:00
David Simansky ffe385a34e
chore: Update CRDs API version to v1 (#1248)
* chore: Update CRDs API version to v1

* fix: Fix e2e test

* chore: Add changelog entry
2021-03-04 02:23:15 -08:00
David Simansky 3e0f108ba3
chore: Update E2E setup to latest release (#1242) 2021-02-24 08:03:47 -08:00
Roland Huß 5f68d61295
update: Change default to server-side generated revision names (extended) (#1240)
* update: Change default to server-side generated revision names

Fixes #1144

* update: Fix wait loop for synthetic events for which the generations are already in sync

* fix assertion as a service label change does not create a new revision

* fix: --cluster-local does not create a new revision but just changes a service's label

* chore: Fixed formatting

* update: Check generation in update already before doing a watch

* fixed lint issue

* fix test assertions
2021-02-23 23:16:46 -08:00
Markus Thömmes d647e44938
Upgrade a few assorted dependencies (#1220)
* Update spf13 deps

* Upgrade gotest.tools and correctly use versioned module

* Regenerate docs
2021-02-12 05:55:50 -08:00
Hyounggyu Choi d5dd22fd2b
Allow to specify build platform for test images (#1210) 2021-02-02 06:36:33 -08:00
Ville Aikas f15f2755d8
update to k8s 0.19.7, go v1.15, fix gnostic (#1206)
* update to k8s 0.19.7, go v1.15, fix gnostic

* oops, did not run ./hack/build.sh

* Fix unit tests that broke because of k8s 1.19 update

* Update asserting in test to adapt to new jsonpath output behaviour

Looks like that strings are quoted now in arrays.

* fix one more assert

Co-authored-by: Roland Huß <roland@ro14nd.de>
2021-01-28 04:35:31 -08:00
Navid Shaikh 16ec3c1023
Rename configUID label to ConfigurationUID (#1199)
followed up by https://github.com/knative/serving/pull/10579
2021-01-20 23:38:53 -08:00
Navid Shaikh dc52d5bc8a
Do not print serviceUID and configUID labels in service export result (#1194)
* Ignore serviceUID and configUID labels in service export result

 While exporting the service using `service export` command, ignore
 the service labels with keys 'configUID' and `configUID`
 see https://github.com/knative/serving/pull/10539 for further details.

* Fix the var names per golint recommendation

* Ignore the serviceUID and configUID labels from revision labels

* Add e2e for verifying configUID and serviceUID labels are absent

* Add CHANGELOG
2021-01-20 01:07:53 -08:00
Navid Shaikh 174e41b628
client release v0.20.0 prep (#1189)
* Update deps for release v0.20.0

* Update version command

* Update CHANGELOG

* Run tests against serving and eventing v0.20.0

* Run tests against serving and eventing v0.20.0
2021-01-14 01:19:32 -08:00
Ying Chun Guo 45162fb5d8
Add command group for ContainerSource (#1016)
* add container source create and delete

* add update and list commands

* add describe command

* add e2e test

* add more tests

* changes to address review comments
2020-12-02 05:56:51 -08:00
Navid Shaikh f108673aa4
Run e2e-tests against eventing nightly (#1151)
since the ping source update issue is now fixed
  see https://github.com/knative/eventing/pull/4597
      https://github.com/knative/eventing/issues/4584
2020-11-27 03:02:35 -08:00
Navid Shaikh ccb5abb4ee
chore(e2e): Run latest release e2e job against v0.19.x (#1131)
of serving and eventing
2020-11-24 09:06:35 -08:00
Navid Shaikh 0689e0527a
Run e2e CI job against eventing v0.19.1 since nightly is broken (#1136)
The ping source update for sink isnt working as expected.
 see https://github.com/knative/eventing/issues/4584
2020-11-24 06:36:34 -08:00
David Simansky b72e4be300
feat: Add service import command (#1065)
* feat: Add service import command

* fix: Fix e2e test

* fix: Add retry when retrieving Configuration

* fix: Reflect review feedback

* fix: Fix error message

Co-authored-by: Roland Huß <rhuss@redhat.com>

* fix: Add missing mock tests

* fix: Polish unit test assertions

* fix: Mark import as experimental

* chore: Add changelog entry

* Update CHANGELOG.adoc

Co-authored-by: Roland Huß <rhuss@redhat.com>

* fix: Remove deprecated flag

Co-authored-by: Roland Huß <rhuss@redhat.com>
2020-11-09 06:04:09 -08:00
Navid Shaikh 26867f154d
feat: Add channel sink prefix (#1092)
* Add channel sink prefix

* Add unit and e2e tests

* Add CHANGELOG

* Fix e2e tests
2020-11-09 01:49:09 -08:00
Murugappan Chetty c60b85150c
Export test refactor (#1069)
* vendor changes for importing serving test

* refactor export test

* vendor changes

* lint changes

* add comments and address review comments

* review comments for #1069

* rebase

* remove vendor/license

* remove vendor/license
2020-11-02 07:21:35 -08:00
Roland Huß 8ca97c7920
Feature: "kn service apply" (#964)
* feat: "kn service apply"

This commit introduces a client-side apply with a plain JsonPatchMerge. This is more limited than a StrategicPatchMerg as it does not allow to merge lists (they are just overwritten). Also is not a real 3-way merger that would lead to a conflict when both the, the server-side and the provide update overlapp in fields that updated, compared to the shared original configuration. This is a problem of  JsonThreeWayMerger itself, as pointed out in https://github.com/kubernetes/kubernetes/pull/40666#pullrequestreview-502804243.

This limitation is shared with kubectl, which suffers from the same issue if using `kubectl apply` with a custom resource (i.e. with everything that has schema that is not registered within kubectl).

Tests are missing, too, but will come soon

* chore: Add tests for 'kn apply'

* refactor: Removed PatchService from pulic API interface

* fix: Display of service URL at the end, when no changes apply

* chore: Add initial E2E test

* chore: Implemented review suggestions

* More tests
* Example for kn service apply
* Remove commented-out code

* lint fixes

* fix formatting of kn service apply doc

* fixing go.sum

* chore: Update deps
2020-11-02 00:36:35 -08:00
Scott Nichols d1552ee0a3
updating to use the hack repo (#1084)
* updating to use the hack repo

* eof

* you need to run update deps after codegen to pick up any new deps.

* do not reinvent update-deps.

* must be winter
2020-10-30 11:41:35 -07:00
Navid Shaikh abb75e4da2
fix(tekton e2e): Fix CONTAINER_REGISTRY name generation (#1074)
* fix(tekton e2e): Fix CONTAINER_REGISTRY name generation

 var `E2E_BASE_NAME` is no longer available

* debug: Run tekton tests

* Revert "debug: Run tekton tests"

This reverts commit dbe125ee04.
2020-10-26 08:38:41 -07:00
Navid Shaikh 40a840367a
chore(e2e): Run e2e against eventing v0.18.3 (#1063) 2020-10-15 15:01:56 -07:00
Navid Shaikh ce1f43cce2
fix(e2e): Remove "serving.knative.dev/route" revision label (#1067)
Dont expect mentioned key on the revision labels in service
  expect tests now. The test is skipped for serving v0.18 release
  and configured to only against current serving master.
  see #https://github.com/knative/serving/pull/9710
2020-10-15 13:15:56 -07:00
Josh Soref 4939c5ede3
Fix various misspellings and linter items (#1057)
* spelling: additional

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: bindings

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: blocked

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: bootstrap

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: channel

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: channel

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: commands

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: comparison

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: configuration

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: controller

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: convert

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: desired

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: dynamic

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: entry

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: execute

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: explicit

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: hardcoded

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: information

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: inject

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: item

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: kubectl

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: latest

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: message

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: namespace

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: namespaces

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: output

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: overriding

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: parameters

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: revision

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: separated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: separator

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: service

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specified

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specifies

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: splitting

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: subscription

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: trigger

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unknown

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unstructured

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: workflow

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* chore: Address golinter complaint for (c *MockKnServingClient) GetBaseRevision

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* chore: update changelog for spelling fixes (#1057)
2020-10-12 21:24:30 -07:00
kaustubh d9d52346e7
feat: List available channel types (#1027)
* add channel list-types

* add kn channel list-types doc
2020-10-06 13:17:20 -07:00
Navid Shaikh 6baab2eda4
fix(e2e): Run eventing e2e tests only against nightly and fix service export tests (#1046)
* fix(e2e): Run eventing e2e tests only against master

* fix(e2e): [service export] Service links are disabled by default

 see https://github.com/knative/serving/pull/9685
2020-10-06 09:17:21 -07:00
Arghya Sadhu 5025137f5a
add alias to commands (#1041) 2020-10-06 03:57:21 -07:00
Navid Shaikh ce519b520b
feat: Subscription CRUD (#1013)
* feat: Add subscription CRUD

 - Add kn subscription command group and CRUDL sub-commands
 - create/update uses following flag names for better alignment:
  - --sink for subscriber
  - --sink-reply for reply
  - --sink-dead-letter for dead-letter-sink
 - Add 'subscriptions' and 'sub' aliases
 - Introduce shared library `knative.dev/client/lib/printing`
   to print Sink object in describe output

* Set default channel type messaging.knative.dev/v1beta1:Channel

 i.e. if no prefix is given to `--channel`, consider it of `Channel` type

* Update e2e tests

* Update channel flag description
2020-10-01 09:44:29 -07:00
Arghya Sadhu e8ae0e1537
adding annotation-service and annotation-revision to kn create/update (#1029) 2020-09-30 07:48:29 -07:00
Navid Shaikh 769a5c0f1b
chore(e2e): Run e2e against serving/eventing v0.18.0 (#1036) 2020-09-30 05:12:29 -07:00
Zhimin Xiang 9b210e3be1
[Release-0.18] Pin knative deps to release-0.18 (#1025)
* Pin pkg to release-0.18 version

* ./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh

* bump k8s version to 1.18.8

* Fix the brokerage of importing latest serving

* exclude script/test-infra md from md check
2020-09-23 11:58:41 -07:00
Martin Gencur f4e43c82d4
Print logs from PipelineRun pods when Tekton tests fail (#1019) 2020-09-22 01:17:36 -07:00
David Simansky 719269e891
fix: Fix autoscaling annotations in Service metadata (#1021)
* fix: Fix autoscaling annotations in Service metadata

* chore: Add test cases

* fix: Rerun codegen

* chore: Split UpdateAnnotations to dedicated functions
2020-09-22 00:06:37 -07:00
Martin Gencur 1607bf8c0c
Remove -mod=readonly from the helloworld's Dockerfile (#1017)
The go.mod file was removed in
4ea31c444a
, and breaks building using Tekton.

The error is as follows:
STEP 3: COPY ./test/test_images/helloworld/ .
STEP 4: RUN CGO_ENABLED=0 GOOS=linux go build -mod=readonly -v -o server
build flag -mod=readonly only valid when using modules
subprocess exited with status 1
subprocess exited with status 1
error building at STEP "RUN CGO_ENABLED=0 GOOS=linux go build
-mod=readonly -v -o server": exit status 1
2020-09-17 16:03:44 -07:00
Himanshu Ranjan 6c7fc7ca70
Add changes for --scale-init support (#990)
* Add changes for --scale-init support

* Added test cases

* Add test case in e2e tests

* minor fix

* Test case failure fix

* Incorporated review comments

* Add service update test cases

* Incorporate review comments
2020-09-15 02:51:41 -07:00
Markus Thömmes 8f7088f0c0
Add linting config and fix issues. (#1001) 2020-09-11 05:41:00 -07:00
Murugappan Chetty 77564112df
add e2e for h2c (#1000)
* add e2e for h2c

* add e2e for h2c

* add e2e for h2c

* add symlink for grpc example

* add symlinks

* add symlink
2020-09-11 03:32:00 -07:00
David Simansky e7b74a9863
fix: Fix service export annotations (#1004)
* fix: Fix service export annotations

* fix: Regen code

* fix: Skip test until 0.18 is available

* fix: Skip on specific version only
2020-09-10 01:19:50 -07:00
Navid Shaikh 5ed353d36b
feat(channel): Manage knative eventing channels (#967)
* feat(channel): Manage knative eventing channels

- Support specifying the type of channel to create using --type.
 - Default is to use messaging layer configuration for channels
- Channel type aliases via kn config and alias for InMemoryChannel
 - User can now configure channel type aliases in kn config and specify
   alias to GVK mappings for easy reference on CLI and refer with `--type` flag
 - User can also use inbuilt alias 'imc' for InMemoryChannel

* Let channel reconcile, sleep for 5 secs after creation

* Add imcv1 and imcv1beta1 aliases

* Rename imcv1 alias to imc
2020-08-25 09:25:49 -07:00
Murugappan Chetty 4ea31c444a
build test images for e2e (#974)
* build test images before e2e

* build test images before e2e

* build test images for e2e

* build test images for e2e

* build test images for e2e

* build test images for e2e

* use built test image in smoke test

* use built test image in smoke test

* change tests to use built test image

* change tests to use built test image

* change tests to use built test image

* change tests to use built test image

* add common base image for all purpose

* build images for e2e

* rebase with master

* add non root base image

* add non root base image
2020-08-20 04:42:13 -07:00
Navid Shaikh c39025f7ca
Vendor serving and eventing at v0.17.0 (#984)
* Vendor serving and eventing at v0.17.0

* Update version commmand output

* Run latest release e2e tests against serving/eventing v0.17.0
2020-08-20 03:22:13 -07:00
Himanshu Ranjan 980a6a9469
Fix exit code on service delete and revision delete (#971)
* Fix exit code 0 upon service delete

* Mentioned bug fix in CHANGELOG.adoc

* Add error check test for service not found

* Fix for kn revision delete failure exit code and add test cases

* Testing changes in test cases for failure in intergration tests

* Fix test case error causing integration test failure
2020-08-06 03:41:28 -07:00
tianfeiyu 7f2de9eb9d
fix: `kn source list` command print spelling problems (#963) 2020-08-05 02:49:28 -07:00
Chris Suszynski 7b2abc7a56
Use Tekton Catalog GA structure for tasks (#966) 2020-08-04 08:34:28 -07:00
Mike Petersen 4a3cf24550
Deprecates --max-scale/--min-scale for more consistent naming (#958)
* Depreciates --max-scale/--min-scale for more consistent naming

* Added back old flags and marked hidden
2020-08-03 16:58:27 -07:00
Michal Vinkler 582e48c32e
allow test image to be customized (#957) 2020-07-28 09:31:59 -07:00
Roland Huß 490fe574cc
feat: Add plugin listing to "kn --help" (#929)
* feat: Add plugin listing to "kn --help"

This works on all levels. Test needs to be expanded still.

Fixes #266

* chore: Fix test

* Add test and ported #910 over.

* changelog update

* fix test

* Fix test

* fix integration tests

* fix test

* chore: Add some explanatory comments

* fix test
2020-07-14 13:38:33 -07:00
Navid Shaikh 2e1a863815
Revisit sink prefixes: Support only 'ksvc' prefix and drop 'svc', 'service' support for knative service (#896)
* Update description for sink flag

 - Add examples for broker, service and URI
 - Add note about default prefix and service alias

* Update the sink flag description

* Update cli conventions doc

* Update the sink prefixes mapping

 - 'ksvc' prefix for knative services
 -  Remove 'svc' or 'service' prefixes mapping for knative services

* Hint in err msg to use 'ksvc' if used prefixes 'svc' or 'service'

* Update CHANGELOG

* Update source list e2e tests to refer ksvc prefix

* Update sink flag description
2020-07-14 00:46:18 -07:00
kaustubh ad145a89d8
Add E2E test cases for "kn source list". (#924)
* add invalid filter test case

* add invalid test case

* add source list test, output yaml format

* fix sourcelist failed test case
2020-07-11 06:21:37 -07:00
Mike Petersen e1c48e6f7a
Added the option to use --scale for setting MinScale and MaxScale to the same value (#914)
* Added the option to use --scale for setting MinScale and MaxScale to the
same value

* Updated service create/update to resolve test issues

* Removed scale from the annotation section - there isn't a scale
annotation

* Renamed test service name so that it doesn't match a previous test

* Addressed most issues/changes

* Added tests for multiple flags being used at the same time

* Cleaned up the update tests

* Added negative value tests and cleaned up tests in create_test.go
2020-07-11 02:33:37 -07:00
David Simansky 41e49b98c5
feat: Add --filename flag to service create command (#913)
* feat: Add --file flag to service create cmd

* fix: Fix linter warnings

* fix: Remove unecessary changes

* fix: Reflect review feedback

* fix: Change flag --file to -f,--filename

* fix: Reflect review feedback

* fix: Move test cleanup to correct place

* fix: Refactor name param restrictions

* fix: Fix flag name string in func
2020-07-11 02:03:37 -07:00
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 1a8cf96997
Setup eventing extension sugar controller (#920)
We'll need sugar controller for reconciling broker for tests
 which labels namespace and annotates the triggers.

 Currently, sugar controller is not part of the eventing nightly release setup
 by test-infra libs. This changeset adds install of same for nightly
 CI setup.
2020-07-07 12:37:44 -07:00
David Simansky 1f59f5341c
Add broker create, delete and list cmds (#894)
* Add broker create, delete and list cmds

* fix: Fix copyright headers

* fix: Fix linter warnings

* Update pkg/kn/commands/broker/create.go

Co-authored-by: Roland Huß <rhuss@redhat.com>

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

Co-authored-by: Roland Huß <rhuss@redhat.com>

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

Co-authored-by: Roland Huß <rhuss@redhat.com>

* feat: Add broker describe command

* fix: Fix copyright header

* fix: Fix linter issues

* fix: Fix broker describe test

* fix: Fix order of eventing cmds

* chore: Add e2e tests

* fix: Fix e2e tests annotation

* fix: Reorder e2e tests methods

* feat: Add synchronous broker delete option

* fix: Fix broker describe example

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

* fix: Fix variable name

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

* fix: Fix broker list example formatting

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

* fix: Fix eventing client func name

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

* fix: Reflect changes from PR review suggestions

* fix: Fix formatting of cmd examples

* fix: Fix formatting of cmd examples & trailing spaces

* fix: Polish eventing client docs

* fix: Fix examples alignment

Co-authored-by: Roland Huß <rhuss@redhat.com>
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
2020-06-23 02:43:26 -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
Murugappan Chetty f869b44d66
add kn export type (#856)
* add kn export type

* add kn export type

* add kn export type

* Update pkg/apis/client/register.go

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

* e2e test for kn export type

* e2e test for kn export type

* add new type for kn export

* rebase

* rebase

Co-authored-by: Roland Huß <rhuss@redhat.com>
Co-authored-by: Matt Moore <mattmoor@vmware.com>
Co-authored-by: Roland Huß <roland@ro14nd.de>
2020-06-18 02:33:25 -07:00
Roland Huß c7426459be
Refactor main flow and introduce explicit plugin and config handling (#877)
* Refactor main flow, plugin and configuration handling

* The plugin handling has been moved out of the `KnDefaultCommand` constructor where it was executed as a side-effect. The original code from `kubectl` suffers from the same issue that plugin handling is not a top-level concern but was very likely introduced as an after-thought. Instead, the plugin handling is done now by a `PluginManager` which is explicitly called in `main()`.
* Configuration and bootstrap option handling is centralized in the package `option`. After the bootstrap happened, the content of the configuration file, as well as any other global configuration, can be obtained from methods on  `config.GlobalConfig`. Also, all flag handling is delegated to cobra so that no own parsing is needed.
* Many of the logic in `pkg/kn/commands/plugin` for plugin management has been moved up to `pkg/kn/plugin` as this code is not only relevant for `plugin list` but also for the bootstrap process.

* fix: invalid subcommands will lead to a proper error message

* Update pkg/kn/config/types.go

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

* Update pkg/kn/plugin/manager.go

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

* Update hack/generate-docs.go

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

* Update hack/generate-docs.go

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

* chore: Add missing links

* chore: recert to shas in links in developer guide for now.

Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
2020-06-15 09:15:24 -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
Chi Zhang 3c5ceff655
update test-infra to stop using serving.yaml (#876) 2020-06-04 23:32:18 -07:00
Navid Shaikh c1ab4ae863
Update flag names to --request and --limit (#872)
* Update flag names to --request and --limit

 - Use singular flag names and support comma separated or repeated flag values
 - Update tests and docs

* Update CHANGELOG

* Update the flag description and examples

* Remove release 0.15.0 header from CHANGELOG
2020-06-03 04:04:18 -07:00
Navid Shaikh af2d4c8f2a
chore(e2e): Run tests against serving and eventing 0.15 release (#868) 2020-06-02 02:05:16 -07:00
Daniel Helfand 834ee79049
do not check for plugin executable if none on path (#846) 2020-06-02 01:38:16 -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 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
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
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