Commit Graph

441 Commits

Author SHA1 Message Date
Gunjan Vyas a1079df154
Adding completion for remaining Eventing resources (#1567)
* Added completion for trigger

* Added tests for trigger

* Added container sources completion

* Added tests for container source completion

* Add completion helper for apiserver sources

* Added tests for apiserver sources

* Added completion for binding sources

* Added tests for sink binding completion

* Added completion for ping source

* Added tests for ping source completion

* Added completion for channel

* Added completion for subscription

* Added tests for channels

* Added tests for subscription completion

* Kn params initialization fix and resource name fix in tests
2022-01-18 01:08:32 -08:00
Gunjan Vyas f6434549da
Fix for panic during channel list (#1568)
* Fix for panic during channel list

* Added changelog entry
2022-01-13 05:07:12 -08:00
Gunjan Vyas d8670f5762
Added completion for domain command (#1562)
* Added completion for domain command

* Added tests for domain completion
2022-01-12 06:19:51 -08:00
Gunjan Vyas 07d0cd75c7
Added completion for route name (#1561)
* Added completion for route

* Added tests for route completion
2022-01-10 10:12:59 -08:00
Gunjan Vyas c5dfb08f81
Added completion for revision resource (#1560)
* Added completion for revision resource

* Added unit tests for revision autocompletion

* Fixed merge conflicts
2022-01-10 06:58:59 -08:00
Gunjan Vyas c6997da944
Added autocompletion for broker (#1559)
* Added autocompletion for broker

* Added broker completion tests

* Renamed imports
2022-01-10 04:33:59 -08:00
Gunjan Vyas 63142983ac
Added autocompletion for service name (#1547)
* Added autocompletion for service name

* Added unit tests

* Added error handling for panic if no namespace flag added to command

* Removed target field from config

* Modified signature for completion functions
2022-01-04 04:31:33 -08:00
Michael Gasch 29a529a6d0
docs: Fix broker class in create command (#1541)
Closes: #1540
Signed-off-by: Michael Gasch <mgasch@vmware.com>
2021-12-10 07:31:29 -08:00
Gunjan Vyas 972eec2043
Fixed panic when traffic split to unavailable revision (#1533)
* Fixed panic when traffic split to unavailable revision

* Added Changelog entry

* Added unit tests

* Removed duplicate test case
2021-11-30 07:06:09 -08:00
Gunjan Vyas 8fd19e6bea
Add --tag flag to service create and allow traffic split <100 when @latest is specified (#1514)
* Add --tag flag to service create

* added comments

* Added tests

* handled @latest tag in traffic split

* added unit tests

* added e2e tests

* added comments

* simplified code

* add e2e tests for error cases

* Add handling for non latest revisions with mutation bool
2021-11-29 05:31:04 -08:00
David Simansky 2b1e77de20
Align autoscaling annotations in tests (#1531)
* Align autoscaling annotations in unit tests

* Fix code style

* Fix e2e tests
2021-11-26 05:34:51 -08:00
Boaz Shuster 0e89cfccbe
Fix env, annotation and labels flags in service create/update/apply (#1516)
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-11-25 00:32:16 -08:00
Gunjan Vyas 4316d0345f
Fixed panic in kn service describe (#1529)
* Fixed panic in kn service describe

* Added changelog entry

* Update CHANGELOG.adoc

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

Co-authored-by: David Simansky <dsimansk@redhat.com>
2021-11-23 07:49:50 -08:00
Murugappan Chetty 8e3a09cf7f
update status of commands (#1508)
* update status of commands

* update status of commands

* update status of commands

* update status of commands

* update status of commands

* update status of commands

* update status of commands
2021-11-09 01:51:43 -08:00
Gunjan Vyas da6f164dbb
Remove lookup-plugins flag (#1506)
Co-authored-by: Roland Huß <roland@ro14nd.de>
2021-11-02 10:26:41 -07:00
David Simansky c1e35893f7
Fix config init for non-writable locations (#1502)
Co-authored-by: Roland Huß <roland@ro14nd.de>
2021-11-02 09:19:41 -07:00
Boaz Shuster 09d48d5f4c
Create a default config file if not exists (#1472)
If the config file doesn't exist create one with default settings.
I used the settings that are given in this link:
https://github.com/knative/client/blob/main/docs/README.md#options

Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
2021-11-02 03:03:40 -07:00
Gunjan Vyas 48fedfdd87
Removing deprecated flags (#1498)
* Removing deprecated flags

* reverted lookup flag

* added comment back
2021-11-01 09:55:23 -07:00
Roland Huß e7e5372594
Mark deprecated options as 'hidden' (#1500)
so that they do not appear in the help messages
2021-11-01 08:00:23 -07:00
David Simansky 5197287f08
Reword missing API error to mention client update (#1497)
* Reword missing API error to mention client update

* Reflect review feedback

* Add changelog entry & fix other links

* Remove mention of latest version
2021-11-01 07:20:23 -07:00
Roland Huß db3bcbc6b0
Rename `--extra-containers` to `--containers` (#1499)
and make `--extra-containers deprecated`
2021-11-01 04:39:22 -07:00
Gunjan Vyas d8d0ee1e6e
Calculate traffic split when N-1 revisions are specified (#1483)
* Calculate traffic split when N-1 revisions are specified

* Added test cases for traffic split

* enhanced error messages and added example

* added e2e test

* refactored verifyInput function

* Update docs/cmd/kn_service_update.md

Co-authored-by: Navid Shaikh <shaikhnavid14@gmail.com>

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

Co-authored-by: Navid Shaikh <shaikhnavid14@gmail.com>

* added unit test for revision list error

Co-authored-by: Navid Shaikh <shaikhnavid14@gmail.com>
2021-10-29 13:24:59 -07:00
Roland Huß 33666193cf
Rename --concurrency-target and --concurrency-utilization (#1490)
* Rename --concurrency-target and --concurrency-utilization

The new option names are --scale-target and --scale-limit, respectively

Both options are still available but deprecated. Reasoning is that both
options really belong to the 'scale' option group as they influencen
the scaling behaviour.

* rebased and added changelog
2021-10-27 02:40:01 -07:00
David Simansky 2939f36bbd
Fix `domain describe` reference (#1477)
* Fix domain describe reference

* Add unit test coverage
2021-10-26 02:47:21 -07:00
Roland Huß 03045c8195
Move `--autoscale-window` to `--scale-window` (#1489)
* Move `--autoscale-window` to `--scale-window`

and deprecate `--autoscale-window`

* regenerate docs

* fix issue that --scale-window was not picked up

* add some test

* add some additional test
2021-10-26 02:12:20 -07:00
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
devrajmaker c8110f1cd9
Update delete_test.go (#1471) 2021-10-05 00:53:52 -07:00
Gunjan Vyas 2a182cc7c7
Changing the Default retry value (#1463)
* Changing the Default retry value

* Moved default retry variable to pkg/config

* Removing MaxRetries constants

* Use UpdateServiceWithRetry function during service create

* remove all instances of MaxUpdateRetries
2021-10-01 07:56:07 -07:00
Roland Huß a7a0534f44
Automatically set the proper version for the serving and eventing dependencies (#1462)
for `kn version`. This is now directly extracted from go.mod and
saves one manual step when doing the release.
2021-09-23 03:30:13 -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
Boaz Shuster 539a5a97a6
Add option to allow enviornment variables using file (#1433)
* Add `GetEnvsFromFile` to `util`
* Add to `podspec` flags `--env-file` and `EnvFile` to `PodSpec`.
* If `env-file` is specified load env vars from file to memory,
  convert them into ordered map and pass them to UpdateEnvVars function
  by setting custom args for each one of them instead of using command line args.

Signed-off-by: Boaz <boaz.shuster.github@gmail.com>
2021-09-21 11:41:38 -07:00
Christoph Deppisch 09f14b1056
Fix describe/list commands with json/yaml output format (#1278)
* Fix describe/list commands with json/yaml output format

Makes sure to always set proper GroupVersionKind on unstructured objects and lists to avoid marshalling errors when printing in json/yaml output format.

* Deliberately decide to add GVK only to list/read operations in the tests

* rebased and cleaned up

* add some unit tests

Co-authored-by: Roland Huß <rhuss@redhat.com>
2021-09-21 05:32:37 -07:00
David Simansky 47558c1c65
Remove `DeprecatedImageDigest` field (#1454) 2021-09-17 06:27:31 -07:00
Gunjan Vyas 94c8d33b51
Adding retry loop to update (#1441)
* Adding retry loop to service update

* Added UpdatePingSourceWithRetry method

* Added UpdateTriggerWithRetry function

* Added unit test for UpdatePingSourceWithRetry

* Added unit tests for UpdateTriggerWithRetry

* Refactoring changes

* Added UpdateSubscriptionWithRetry method

* Added retry loop to domain mapping command

* Added retry loop to container command

* Added unit tests for mock types

* Add Changelog entry

* Updated changelog and refactored update function

* Updated variable names
2021-09-13 05:53:32 -07:00
Abirdcfly 4a0ac33dcc
fix kn trigger list command to show correct v1/service sink output (#1428)
* fix kn trigger list command to show correct v1/service sink output

* Update pkg/kn/commands/flags/sink.go

Co-authored-by: Murugappan Chetty <itsmurugappan@gmail.com>

Co-authored-by: Murugappan Chetty <itsmurugappan@gmail.com>
2021-08-18 03:44:08 -07:00
David Simansky 28a340cce7
Prepare changelog and version for 0.25 release (#1423) 2021-08-10 06:38:12 -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
Roland Huß 4691210013
Deprecate `lookup-path` option and updated relevant documentation (#1422)
* 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.

* Review fixes

* remove trailing whitespace

* readd config to make test coverage happy
2021-08-10 03:54:12 -07:00
Paul Schweigert f8a8284915
look up plugins on PATH by default (#1412) 2021-08-10 00:00: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
David Simansky 1bf6c12074
Fix unit tests to use NAMESPACE value in k8s cluster env (#1421) 2021-08-06 09:57:20 -07:00
Paul Schweigert 60c740f1e3
Fixing bug when looking up plugins on path with slash in argument (#1415)
* fixing bug when looking up plugins on path with slash in argument

* test for dropping slash substrings

* use path separator

* more tests, using pathseparator in tests
2021-08-06 09:00:20 -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
Gunjan Vyas 8eda0e0f45
Server errors should not be tainted by client error messages (#1406)
* Server errors should not be tainted by client error messages

* Adding more test cases for status errors

* Adding Changelog entry

* k8s api errors should be processed first
2021-08-06 05:16:20 -07:00
David Simansky b3431e34c0
Fix unit tests clash with local kubeconfig (#1418)
* Fix unit tests clash with local kubeconfig

* Add unit tests

* Format source code

* Add more tests to cover types.go

* Add more tests to cover namespaced.go
2021-08-05 06:12:53 -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
Chris Suszynski a7df7c76a0
Skip non modified event first while waiting for ready (#1390)
* Reproduction of #1389

* Fixing #1389

* Removal of panic in test

* Cover the "impossible" missing generation case
2021-07-21 12:20:38 -07:00
Gunjan Vyas bef27e9e82
Adding test cases for serving pkg (#1376) 2021-07-20 06:32:13 -07:00
Gunjan Vyas e4f18fa7f8
Adding tests for commands package (#1377) 2021-07-20 03:14:12 -07:00