Commit Graph

186 Commits

Author SHA1 Message Date
David Simansky 4cccb5f683
Update changelog for 1.5 release (#1680)
* Update changelog for 1.5 release

* Update CHANGELOG.adoc

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

Co-authored-by: Navid Shaikh <shaikhnavid14@gmail.com>
2022-05-31 16:28:37 +00:00
Eng Zer Jun 736c7c24ef
test: use `T.TempDir` to create temporary test directory (#1660)
* test: use `T.TempDir` to create temporary test directory

This commit replaces `ioutil.TempDir` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `ioutil.TempDir`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>

* docs: update CHANGELOG.adoc

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-04-21 11:53:30 +00:00
Gunjan Vyas b858dab2b4
Added subpath functionality to --mount flag (#1655)
* Added subpath functionality to --mount flag

* Added mount subpath test

* Added e2e tests for volume subpath mount

* Updated changelog
2022-04-18 14:12:13 +00:00
Gunjan Vyas bb055ee1a4
Added scale-metric flag to configure metric name (#1653)
* Added scale-metric flag to configure metric name

* Updated flag description

* code gen fix

* Added test for coverage

* Updated Changelog
2022-04-18 09:15:12 +00:00
David Simansky 8ac7a827ba
Update changelog for 1.3 release (#1619) 2022-03-08 03:05:06 -08:00
David Simansky 958bd51f4a
Update changelog for 1.2 release (#1576)
* Update changelog for 1.2 release

* Fix broker entry

* Fix eventing entry
2022-01-25 02:08:48 -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
Paul Schweigert 569e027d98
Remove deprecated Hugo frontmatter generation for docs (#1563)
* removes deprecated hugo frontmatter generation

* changelog

* PR number

* remove emptyString
2022-01-10 08:40:59 -08:00
Roland Huß 55b72fb2ce
Update changelog (#1550) 2021-12-15 09:35:30 -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 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
David Simansky 3d43c13e3e
Update changelog for 1.0 release (#1504)
* Update changelog for 1.0 release

* Add missing PR link
2021-11-02 16:39:24 +01: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ß 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
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
Carlos Santana 1cb893e481
Fix changelog reference for pull request 1433 (#1473) 2021-10-05 03:29:53 -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
David Simansky 4760e52704
Update changelog for 0.26 release (#1456) 2021-09-21 04:54:37 -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
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
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
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
Gunjan Vyas 712e0e4af1
Adding support for darwin/arm64 (#1401)
* Adding support for darwin/amd64

* Updating go version to 1.16 in go.mod
2021-07-27 17:14:16 -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
Murugappan Chetty 0c3e236006
make command as array instead of string (#1380)
* make command as array instead of string

* make command as array instead of string

* make command as array instead of string

* make command as array instead of string

* make command as array instead of string

* make command as array instead of string
2021-07-13 13:32:31 -07:00
David Simansky 64915102a0
Update changelog for 0.24.0 release (#1356)
* Update changelog for 0.24.0 release

* Fix entries ordering
2021-06-29 02:25:13 -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
Markus Thömmes 95dc71c631
Prettify printing of webhook warnings (#1353) 2021-06-24 07:04:46 -07:00
David Simansky fc4bc4ffab
Revert "Refactor waiting loop to use resourceVersion (#1321)
* Revert "Refactor waiting loop to use resourceVersion (#1301)"

This reverts commit 9f6ec3194f.

* Remove changelog entry
2021-05-18 05:21:15 -07:00
David Simansky be8f246b79
Update changelog for release v0.23.0 (#1315)
* Update changelog for release v0.23.0

* Add changelog entry PR#1301

* Fix entries ordering

* Fix PingSource entry
2021-05-17 14:26:24 -07:00
Pratham Murkute faee441528
Fix for serviceaccounts "default" not found flaky issue (#1306) 2021-05-11 15:09:46 -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
Roland Huß 3f1a238124
chore: Prepare for release 0.22.0 (#1282) 2021-04-06 12:37:48 -07:00
ericmillin 804895fe66
Fix memory leak on closed watch channel (#1263)
* Fix timer leak on closed watch channel

* Update changelog

* Stop watch timer on Wait exit

Co-authored-by: Roland Huß <roland@ro14nd.de>
2021-04-06 11:36:39 -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
Matej Vasek c62842355a
Use context.Context in API methods (#1274)
* Refactor: add ctx param to KnServingClient funs

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Passing ctx from knServingClient to ServingV1Interface

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Making wait function cancellable

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Test using background ctx

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Using cmd.Context() in pkg/kn/commands

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Handling SIGINT and SIGTERM

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Refactor: add ctx param to KnEventingClient funs

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Passing ctx from knServingClient to knative.dev interfaces

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Using cmd.Context() in pkg/kn/commands

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Test using background ctx

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup style

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Removing unnecessary dependency

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Refactor: add ctx param to KnChannelsClient funs

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Passing ctx from knServingClient to knative.dev interfaces

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Using cmd.Context() in pkg/kn/commands

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Refactor: add ctx param to KnSubscriptionsClient funs

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Passing ctx from subscriptionsClient to knative.dev interfaces

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Using cmd.Context() in pkg/kn/commands

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Refactor: add ctx param to KnSinkBindingClient funs

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Passing ctx from knBindingClient to knative.dev interfaces

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Using cmd.Context() in pkg/kn/commands

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Test using background ctx

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Refactor: add ctx param to KnDynamicClient funs

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Passing ctx from knDynamicClient to knative.dev interfaces

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Using cmd.Context() in pkg/kn/commands

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Test using background ctx

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Refactor: add ctx param to KnAPIServerSourcesClient funs

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Passing ctx from APIServerSourcesRecorder to knative.dev interfaces

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Using cmd.Context() in pkg/kn/commands

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Test using background ctx

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Refactor: add ctx param to KnContainerSourcesClient funs

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Passing ctx from containerSourcesClient to knative.dev interfaces

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Using cmd.Context() in pkg/kn/commands

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Test using background ctx

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Refactor: add ctx param to KnPingSourcesClient funs

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Passing ctx from pingSourcesClient to knative.dev interfaces

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Using cmd.Context() in pkg/kn/commands

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Test using background ctx

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Removing ctx param from RawClient()

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* ctx for watch/polling

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix per review request

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Refactor: extract ctx

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Refactor: Namespace not requiring ctx

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Revert "Handling SIGINT and SIGTERM"

This reverts commit 9598646fda.

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Update CHANGELOG

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Add test for Wait()

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* Add test for Wait()

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-03-26 09:23:20 -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
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
Murugappan Chetty 72f260257e
add changelog for 1212 (#1249) 2021-03-04 10:57:16 -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
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
Roland Huß e94ee7b05d
chore: Update for release 0.21.0 (#1238)
* chore: Update for release 0.21.0

* Update CHANGELOG.adoc

Co-authored-by: Navid Shaikh <navids@vmware.com>
2021-02-23 10:50:46 -08:00
David Simansky 671ee229f3
feat: Add `--context` flag to choose specific context from kubeconfig (#1234)
* feat: Add  flag to choose specific context from kubeconfig

* chore: Generate docs

* chore: Add changelog entry

* fix: Review feedback

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

* chore: Add --cluster flag to specify cluster from kubeconfig

* chore: Generate docs

* chore: Update changelog

Co-authored-by: Roland Huß <rhuss@redhat.com>
2021-02-23 00:54:46 -08:00