* 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>
* 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>
* Update go.mod to specify the module is go1.14
Thus the go commands will default to -mod=vendor
See: https://golang.org/doc/go1.14#go-command
* install goimports as a tool
* drop mod=vendor usage as that's the default with go1.14
* remove comment about using -mod=vendor
* Revert "drop mod=vendor usage as that's the default with go1.14"
This reverts commit 567004d404bb7ebd39ed527dc75759cfc7db672f.
* Revert "remove comment about using -mod=vendor"
This reverts commit 2a71393a2015c1539be1503e0c52cf64283e12d0.
* Revert "install goimports as a tool"
This reverts commit 9616d5e2d2ab0d61e8454b1ace057ec9712e182d.
* use go_run_tool to run goimports
* inline go_run_tool
* include required env var REPO_ROOT_DIR
* 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
* (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
The check of the maximum for concurrency-limit had to be removed as
this is picked up now also from the server side configuration
to which we don't have access. Checking against the default
max is misleading and contra-productive if this could be
different when configured differently by the Knative administrator.
* feat(source): Add 'kn source list'
Fixes#480
- Add 'kn source list' listing the available sources COs
- Use dynamic client to
- find out available source types
- find the COs in given namespace for each source type
- Add --type flag to filter source list based on source type
- Add unit tests
- Add e2e tests
- Add CHANGELOG entry
* Update group for ApiServerSource in tests
* Add kn duck source type for holding common eventing source fileds
- Common infromation from sources are extracted into a struct
for source list command output
- Printer function picks the information from this struct object
and doesn't know the details about extracting this info from multiple
types of sources received
- Group and Version for list is set to empty string and Kind to 'List',
if printed a source list with multiple types of sources in machine readable
format
- Group, Version and Kind for list are kept intact if printed a source list
with same type of source objects in machine readable format
* Update go.sum
* Add WithType builder for listing source
- Separate the flags definition
- WithType builder can be re-used to filter the source types
- Add unit tests
* Update ApiServer source group to apiserversources.sources.knative.dev
* Fix typos and align
Co-authored-by: Roland Huß <roland@ro14nd.de>
* chore(e2e): Optimized tests
Smoke Tests now run before the E2E tests, but in the same cluster
* chore: Removed unneeded test
* fix
* fix
* fix
* fix
* chore: Update to serving & eventing v0.13.0
* refactor(source): Update to Knative eventing 0.13.0
* Moved to "sources.knative.dev" API group
* Replaced CronJobSource with PingSource (and removed unsupported options for service account, requests limits)
* Move to versions:
- SinkBinding v1alpha2
- PingSource v1alpha2
- ApiServerSource v1alpha1
* update to eventing 0.13.1
* go.sum fix
* fixed test
* test updates
* try to enhance error output
* fix test.
* update tests infra to 0.13.1
* chore(e2e): Refactor e2e to better track errors
* Collect results from various `kn` calls to
provide the context
* Changed sub-Run() commands to t.Log() to reduce
the log noise and get file + line information
in the log output
* Removed any Fatal() calls to allows the test
to properly finish
* Only output via t.Log() to get the output at the
proper places and allow Prow to better pick
up the test results.
* Most important: EMOJIS !! 🦆🦆🦆🦆🦆
* chore(e2e): Add more dumpers
* Moar debug
* feature(serving): Update API to serving.knative.dev/v1
Due to an issue with 0.12.0 (a missing constant) the update also includes an update
to the latest knative-serving and knative-eventing dependencies from master
(as reflected in version.go)
Signed-off-by: Roland Huß <roland@ro14nd.de>
* fix(serving): Bogus import removed
* fix(serving): Add missing go.sum entry
- Pin contrib.go.opencensus.io/exporter/stackdriver@59d068f8d8ff5b653916aa30cdc4e13c7f15d56e
- Pin knative.dev/pkg@release-0.11
- Move `Destination` from (knative.dev/pkg) v1alpha1 to duckv1beta1
- Run tests against Eventing v0.11.0
* feat: kn source list-types (builtin types)
- Only lists the builtin source types
- Uses client-go dynamic client for listing CRDs
- Adds DyanmicClient interface to KnParams
- Adds printing options
* chore(lint): Address golint suggestions
* Rebase and update venodr/modules.txt
* Adds unit tests for DynamicClient in types.go
* Add kn source list-types command in smoke tests
* Constants for the CRD GVR and source identifier label key value
GVR as:
- Group: apiextensions.k8s.io
- Version: v1beta1
- Resource: customresourcedefinitions
Label as:
{"duck.knative.dev/source": "true"}
* Add tests for dynamic client
* Add description about SinkBinding source type
as - "Binding Pattern for ContainerSource"
* Remove unused imports
* Adds unit tests for list-types command processing
* More unit tests for flags
* Adds e2e tests for kn source list-types
- also test the YAML output
* Sort the source types while listing them
- Update the unit tests accordingly
* Add examples
* Add unit tests for CreateDynamicTestKnCommand
* Fix typo in unit tests
* golint fixes
* Updates to vendor/modules.txt after rebase
* Remove the extra lines
* Eventing setup in CI
- Update test-infra
- Use library functions for setting up released and latest Eventing
- Set up Eventing 0.10.2 and nightly release in `latest-release` and default e2e tests CI job respectively
* Fix typo in variable name and update formatting
* Updates spf13/cobra dep to v0.0.5
Fixes#426
- and a couple of patches on top which aren't merged yet
- spf13/cobra#884
- spf13/cobra#899
- also updates viper to 1.4.0
* Updates to go.sum
* Updates go.mod
as a result of `go install golang.org/x/tools/cmd/goimports`
* Vendors serving v0.9.0
* Updates references per serving v0.9.0 vendoring
- Updates code and tests to refer the required data structure and method/function calls
- duckv1beta1 -> duckv1 conditions
- traffic percent value is now *int64
- containerConcurrency validation method relocation
* fix(golint): exported function should have comment
for NonReadyConditionReason function
* Updates check for removing null targets
fixes the pointer value check
* Updates per review comments
Fixes#364
- Ensure kn cross platform build works in pre-submit tests
- Run ./hack/build.sh -x after running existing pre-submit tests
- defines a function post_build_tests to invoke cross platform builds
- post_build_tests will be run by test-infra after build tests are compelete
* Update serving to 0.8. Try building.
* Find the right serving version
* Change our own import path to knative.dev to match
* Remove dependency on old version of client
* Update yaml template
* Add sleep to test to deal with race
* fix merge conflict
* Update vendor modules
* refactor(plugins): Improved and simplified verifier and plugin list
* Added proper executable check for current user
* Refactor plugin_list to make it more straightforward
* Seperate errors and warnings
* Don't return an error when no plugin is installed and `plugin list` is called
* Simplified tests
* Check assumption that a prefix is given in verify()
* fix(plugins): Fixed broken homedir expansion
* fix(plugin): Adapted to proper permission handling
E.g. if u-x, g+x and the user has the group of the file, but is also owner of the file then he is not allowed to execute the file.
* test(plugins): Added checks for the execution check for plugins
* chore(plugins): optimized tests to reflect the real unix behaviour
* chore(plugins): Moved plugin seenMap to top-level verify method.
Also, allow symlinks without warnings.
* refactor(plugins): Split up some methods in plugin_verifier to make them shorter
* fix: Tuned `plugin list` for better handling when no plugin directory exists